HP 3000 Manuals

Screen Field Referencing [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Reference Manual Vol. 1

Screen Field Referencing 

You can reference a screen field by:

   *   Name.

   *   Absolute field number.

   *   Relative field number.

You can reference a substring of a non-numeric screen field, with any of
these methods.

Reference by Name 

You can reference a screen field by using the dictionary field
specification name assigned to the field.  If you use this form of
referencing, you must specify the screen name as a qualifier except in
the cases listed below.  This forms a fully qualified screen field
reference.

If the same dictionary field specification name is associated with more
than one field on the same screen, you can only reference the first field
by name.  The first field is the field with the lowest field number.

If the dictionary field specification allows more than one occurrence,
you can only use referencing by name for the first screen field that is
assigned to the field specification name.

Formats 

     S-name.screen 
     S-name.window 
     S-name[start_pos,number_of_chars].screen 
     S-name[start_pos,number_of_chars].window 

Limitations 

Note that HP ALLBASE/4GL only maintains one set of screen field buffers
at any one time.  The existing contents of the screen buffers are lost
when HP ALLBASE/4GL displays a subsequent screen.  HP ALLBASE/4GL allows
you to use a function called from a screen field to display a further
screen.  If you do this, any further screen references in the logic block
displaying the original screen will become references to the current
screen, and not the original screen.  Under these conditions, you should
reference screen fields by number, or limit referencing by name to
references in the logic commands listed under exceptions below.

Exceptions 

Under the following circumstances, you don't need to specify the screen
name as a qualifier to the field name:

   *   When you specify the screen field as one of the following on the
       screen field details screen:

              - the default data movement field identifier,

              - the primary data movement field identifier,

              - other data movement identifiers.

       In this case, you can omit the screen name.  If you do specify a
       screen name it must be the name of the current screen.

   *   Some HP ALLBASE/4GL logic commands allow you to reference screen
       fields by name without using the screen name.  This allows you to
       use a single function with a number of different screens, each
       having one or more fields with the same name.  When used in this
       way, the command associated with the screen field reference always
       refers to the current screen.

       Logic commands that permit this option are:

              CLEAR

              FIELD

              MOVE

              SHOW

              TIE

Reference by Absolute Number 

You can reference screen fields by their absolute field number.  The
first field on the screen is field number one.

When HP ALLBASE/4GL displays a window on a screen, the fields in the
window are renumbered automatically.  The numbering of the window fields
starts from the highest field number on the main screen plus one.  HP
ALLBASE/4GL renumbers the window fields in the order that they were
originally defined.

Formats 

     *Snn 
     *Snn[start_pos,number_of_chars]

where nn is the screen field number.

Reference by Relative Number 

You can reference screen fields as a field number relative to the current
screen field.

This technique allows you to reference the current field, or any other
field up to nine fields before or after the current field.

Formats 

     * (= contents of the current field)
     *+n
     *-n
     *[start_pos,number_of_chars]
     *+n[start_pos,number_of_chars]
     *-n[start_pos,number_of_chars]

where n is a number from 1 to 9.



MPE/iX 5.0 Documentation