HP 3000 Manuals

HPDGETENV [ High-Level Screen Management Intrinsic Library (Hi-Li) Reference Manual ] MPE/iX 5.0 Documentation


High-Level Screen Management Intrinsic Library (Hi-Li) Reference Manual

HPDGETENV 

Retrieves configuration elements of the current execution environment.

Syntax 

HPDGETENV globalpak, returnpak, mode, envbufdescrpt, envbuf 

Parameter Descriptions 

globalpak                 A compound parameter that passes information
                          between intrinsics.  For a complete description
                          of this parameter, see "Global Parameters" in
                          Chapter 3.

returnpak                 A compound parameter that passes information
                          back from the intrinsic to the application.
                          For a complete description of this parameter,
                          see "Global Parameters" in Chapter 3.

mode                      A four-byte integer that identifies the element
                          for which you are receiving current
                          configuration information.  You can use the
                          following values:

                          1 = interface library version

                          2 = forms file native language identifier

                          3 = auto test option

                          4 = device token

                          5 = form token

envbufdescrpt             A four-byte integer.  It is used in those cases
                          where your application is allowed to specify
                          the amount of information that is to be
                          retrieved and how that information is to be
                          arranged within the envbuf parameter.

                          Note:  The output format of the most of the
                          available configuration retrievals is fixed, in
                          which case this parameter is ignored.

envbuf                    A compound parameter passed from the intrinsic.
                          This is the area into which the requested
                          element configuration is returned.  The data
                          structure you supply for this parameter depends
                          on the mode you have specified:

  (If)        Element                                (Supply) 
  Mode                                            Length/Format 

---------------------------------------------------------------------------------------

1        Library version   An eight-byte character array

2        Native language   A four-byte integer.  The forms file must be open to use
                           this mode.  See the Native Language Support Reference Manual 
                           for the applicable codes.

3        Auto test option  A four-byte integer.  The forms file must have been opened
                           or the device enabled to use this mode.  The following
                           values are returned:

                           0 = disabled
                           1 = enabled

4        Device token      An array of 10 four-byte integers.  If the device is not
                           enabled, the information returned is undefined.  The array
                           is defined as follows:

                           The first integer in the array contains the file number
                           assigned to the open device.  A zero is returned if the
                           device is not open.

                           The second integer in the array contains the system logical
                           device number assigned to the open device.  A zero is
                           returned if the device is not open.

                           The third integer in the array contains the device type
                           identifier of the open device.  A zero is returned if the
                           device is not open.

                           See Table D-1 in Appendix D for a list of device type
                           identifiers that you can specify.

                           The remainder of the array is undefined.

5        Form token        A 200-byte record defined as:
         currentformname   A 32-byte character array that contains the name of the form
                           currently being processed.

         nextformname      A 32-byte character array that contains the name of the next
                           form to be processed.

         currentformopt    A four-byte integer that indicates whether the current form
                           is a repeating form, and if so, whether it is to be appended
                           to itself.  The values returned are:

                                0 = normal sequence, do not repeat or append
                                1 = repeat current form
                                2 = repeat current form and append it to itself

         nextformopt       A four-byte integer that indicates whether the screen is to
                           be cleared when the next form is displayed or whether the
                           next form is to be appended to the current form.  It also
                           indicates whether the form, if appended, is to be frozen on
                           the screen.  The values returned are:

                                0 = clear screen, do not freeze or append
                                1 = append next form to current form
                                2 = freeze current form and append
                                    next form to it.

         databuflen        A four-byte integer that indicates the data buffer length,
                           in bytes, of the current form.

         screenlen         A four-byte integer that indicates the screen length, in
                           lines, of the current form.

                           The remainder of the record is undefined.

The forms file must be open to use Mode 5.

Discussion 

HPDGETENV is a special-purpose intrinsic meant for advanced programming
applications.  It allows your application to retrieve information about
the current environment.  You can request information about the
environment for the following five elements:

   1.  Library version - This allows your application to determine which
       version of Hi-Li software is installed.

   2.  Native language identification - This allows your application to
       retrieve the NLS code assigned to the open forms file.

   3.  Auto Test - This allows you to determine if terminal interaction
       is executing in auto test mode.

   4.  Device token - This allows you to receive particular information
       about the open terminal.  If the terminal you are querying is not
       enabled, the information returned is undefined.

   5.  Form token - This allows you to receive particular information
       about the current form.



MPE/iX 5.0 Documentation