HP 3000 Manuals

HPDGETDESIGN [ 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

HPDGETDESIGN 

Retrieves design information for a particular forms file component.

Syntax 

HPDGETDESIGN globalpak_II, returnpak, mode, keydescrpt, keysbuf, 
infobuflen, infobuf 

Parameter Descriptions 

globalpak_II              A compound parameter.  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 tells the intrinsic
                          the specific forms file component for which you
                          want design information retrieved.

                               mode     retrieve    retrieval key
                                        info for

                               1      file          forms file

                               2      form          forms file
                                                    and form

                               3      field         forms file,
                                                    form and field

                               4      field         forms file,
                                                    form and field

                          negative value in this parameter tells
                          HPDGETDESIGN to close the forms file after it
                          completes the retrieval.

keydescrpt                An array of four-byte integers that gives the
                          intrinsic a description of the retrieval keys.
                          A zero (0) indicates that the key is in number
                          format and a one (1) indicates that the key is
                          in name format.  See the Discussion for this
                          intrinsic for an example of how you might set
                          up the keydescrpt array.

keysbuf                   A compound parameter that provides a list of
                          retrieval keys for the intrinsic.  Each entry
                          in the list corresponds to a retrieval entry in
                          the keydescrpt parameter.  Retrieval keys that
                          are specified in name format are 32-byte
                          character arrays (except for file names, which
                          are 88 bytes).  They contain a USASCII
                          component name that is left justified.

                          Retrieval keys that are specified in number
                          format are four-byte integers.  If the value is
                          positive, the number is the one assigned the
                          component by the design facility.  If the value
                          is negative, the number indicates the order of
                          the component within the design.

infobuflen                A four-byte integer that tells the intrinsic
                          the length in bytes of the infobuf parameter.

infobuf                   The area into which the information you have
                          requested is returned from the intrinsic.  The
                          format of the information returned is specific
                          to the type of design component you requested:
                          file, form, or field.  Format is also
                          determined by the design facility that was used
                          to create the forms.  See Table 3-2 for
                          complete information about how information and
                          formats are returned from the intrinsic.  The
                          amount of information returned is determined by
                          either the applicable format or the contents of
                          infobuflen, whichever is less.

Discussion 

HPDGETDESIGN is a special-purpose intrinsic that lets you extract design
information about a FORMSPEC/V forms file.  Use this intrinsic to
document forms files or to generate source code data structures such as
copylibs.

Because HPDGETDESIGN is a special-purpose intrinsic, you must allocate a
separate copy of the globalpak parameter to pass to the intrinsic.  You
cannot pass this copy of globalpak to any of the other Hi-Li intrinsics.

For efficiency, the intrinsic opens the forms file for you.  If you want
to close the file, use a negative number for the value of the mode 
parameter.

The keydescrpt parameter tells HPDGETDESIGN the format, number or name of
the retrieval key.  For example, if you are retrieving information about
a field, you might set up the keydescrpt array in your application as
follows:

 *  Assign 1 to the first integer in the array to indicate the first key
    (file) is in name format.

 *  Assign 0 to the second integer in the array to indicate the second
    key (form) is in number format.

 *  Assign 1 to the third integer in the array to indicate the third key
    (field) is in name format.

Table 3-2 lists the infobuf subparameters and shows how information and
formats of FORMSPEC/V forms files are returned from the intrinsic.  The
value of mode is treated as an absolute number.

1.  File Information Retrieval (mode = 1)

          Table 3-2.  INFOBUF Formats 
--------------------------------------------------------------------------------------------
|                                         |                                                |
| fileversion                             | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 4                                 |
|                                         |                                                |
|                                         | File version number that is a data/time stamp. |
|                                         | It is recorded when the forms file was last    |
|                                         | compiled.                                      |
|                                         |                                                |
| numforms                                | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 8                                 |
|                                         |                                                |
|                                         | Number of forms in the file.                   |
|                                         |                                                |
| maxnumflds                              | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 12                                |
|                                         |                                                |
|                                         | Maximum number of fields in any one form.      |
|                                         |                                                |
| maxdatabuflen *                         | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 16                                |
|                                         |                                                |
|                                         | Maximum data buffer size in bytes.             |
|                                         | It may be overstated by two bytes.             |
|                                         |                                                |
| numsaveflds                             | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 20                                |
|                                         |                                                |
|                                         | Number of save fields in file.                 |
|                                         |                                                |
| headform                                | 32-byte character array                        |
|                                         |                                                |
|                                         | infobuflen = 52                                |
|                                         |                                                |
|                                         | Name of head form in file.                     |
|                                         |                                                |
| globerrenh                              | 8-byte character array                         |
|                                         |                                                |
|                                         | infobuflen = 60                                |
|                                         |                                                |
|                                         | Global error enhancement.                      |
|                                         | This is a combination of                       |
|                                         | I, H, U, B, 1-8, or NONE.                      |
|                                         |                                                |
| globwindowenh                           | 8-byte character array                         |
|                                         |                                                |
|                                         | infobuflen = 68                                |
|                                         |                                                |
|                                         | Global window enhancement.                     |
|                                         | This is a combination of                       |
|                                         | I, H, U, B, 1-8, or NONE.                      |
|                                         |                                                |
| windowposition                          | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 72                                |
|                                         |                                                |
|                                         | The line on the screen where                   |
|                                         | the window appears.  This is                   |
|                                         | line number 0-24.  The line                    |
|                                         | closest to the top of the form is 1.           |
|                                         | Zero (0) means no window.                      |
|                                         |                                                |
--------------------------------------------------------------------------------------------

2.  Form Information Retrieval (mode = 2)

--------------------------------------------------------------------------------------------
|                                         |                                                |
| formname                                | 32-byte character array                        |
|                                         |                                                |
|                                         | infobuflen = 32                                |
|                                         |                                                |
|                                         | Form name.                                     |
|                                         |                                                |
| formnum                                 | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 36                                |
|                                         |                                                |
|                                         | Form number.  This number represents           |
|                                         | the order of the form within the file          |
|                                         | and may change if the forms file is            |
|                                         | recompiled.                                    |
|                                         |                                                |
| numflds                                 | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 40                                |
|                                         |                                                |
|                                         | The number of fields in the form.              |
|                                         |                                                |
| databuflen *                            | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 44                                |
|                                         |                                                |
|                                         | The data buffer length in bytes.               |
|                                         |                                                |
| nextform                                | 32-byte character array                        |
|                                         |                                                |
|                                         | infobuflen = 76                                |
|                                         |                                                |
|                                         | The name of the next form.                     |
|                                         |                                                |
| repeatopt                               | four-byte character array                      |
|                                         |                                                |
|                                         | infobuflen = 80                                |
|                                         |                                                |
|                                         | Repeat option.  It can be N, A, or R.          |
|                                         |                                                |
| nextformopt                             | four-byte character array                      |
|                                         |                                                |
|                                         | infobuflen = 84                                |
|                                         |                                                |
|                                         | Next form option.  It can be C, A, or F.       |
|                                         |                                                |
--------------------------------------------------------------------------------------------

Field Information Retrieval (mode = 3)

--------------------------------------------------------------------------------------------
|                                         |                                                |
| formname                                | 32-byte character array                        |
|                                         |                                                |
|                                         | infobuflen = 32                                |
|                                         |                                                |
|                                         | The name of a form.                            |
|                                         |                                                |
| fldname                                 | 32-byte character array                        |
|                                         |                                                |
|                                         | infobuflen = 64                                |
|                                         |                                                |
|                                         | Field name.                                    |
|                                         |                                                |
| scrnorder                               | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 68                                |
|                                         |                                                |
|                                         | The field number according to its              |
|                                         | order on the screen.                           |
|                                         |                                                |
| fldnum                                  | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 72                                |
|                                         |                                                |
|                                         | The field number according to the              |
|                                         | order in which it was created.                 |
|                                         |                                                |
| fldlen *                                | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 76                                |
|                                         |                                                |
|                                         | Field length in bytes.                         |
|                                         |                                                |
| databufoffst                            | four-byte integer                              |
|                                         |                                                |
|                                         | infobuflen = 80                                |
|                                         |                                                |
|                                         | Position of the field in the data buffer,      |
|                                         | offset from one.                               |
|                                         |                                                |
| fldenh                                  | eight-byte character array                     |
|                                         |                                                |
|                                         | infobuflen = 88                                |
|                                         |                                                |
|                                         | Field enhancement.  It is a combination        |
|                                         | of I, H, U, B, S, 1-8, or NONE.                |
|                                         |                                                |
| datatype                                | four-byte character array                      |
|                                         |                                                |
|                                         | infobuflen = 92                                |
|                                         |                                                |
|                                         | Data type of field.  This can be CHAR,         |
|                                         | DIG, IMPn, MDY, DMY, YMD, or NUM(n)            |
|                                         |                                                |
| fldtype four-byte character array       |                                                |
| infobuflen = 96                         |                                                |
|                                         |                                                |
| Field type.  It can be O, R, P, or D.   |                                                |
|                                         |                                                |
--------------------------------------------------------------------------------------------

4.  Field Information Retrieval (mode = 4)

--------------------------------------------------------------------------------------------
|                                         |                                                |
| fieldinitstring                         | A character array equal to the field           |
|                                         | length or the length defined in                |
|                                         |                                                |
|                                         | infobuflen, whichever is less.                 |
|                                         | This array returns a character string          |
|                                         | equal to the field's initial value.            |
|                                         |                                                |
--------------------------------------------------------------------------------------------

* = size in characters (bytes)

When you request a format, you get all the formats of a length up to and
including the length you specify in infobuflen.  For example, if you
request a form retrieval and pass an infobuflen of 16, you see
information for the first four parameters; fileversion, numforms, 
maxnumflds, and maxdatabuflen.



MPE/iX 5.0 Documentation