HP 3000 Manuals

VGETFILEINFO [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

VGETFILEINFO 

Returns information about forms file to an application.

Syntax 

     VGETFILEINFO {comarea,infobuf,infobuflen}

Parameters 

comarea          Must be comarea name specified when the forms file was
                 opened with VOPENFORMF. If not already set, the
                 following comarea items must be set before calling
                 VGETFILEINFO:

                 cstatus          Set to zero.

                 comarealen       Set to total number of two-byte words
                                  in comarea.

                 VGETFILEINFO may set the following comarea item:

                 cstatus          Set to nonzero value if call
                                  unsuccessful.

infobuf          A record through which you pass the request for forms
                 file information and to which the intrinsic returns the
                 specified information.  This parameter must be
                 initialized to spaces before filling in your request and
                 calling VGETFILEINFO. The layout of infobuf is shown in
                 Table 6-11.  The two required fields of infobuf pass
                 user-supplied parameters to VGETFILEINFO as follows:

                 numofentries     Specifies how many times you want the
                                  information repeated (information is
                                  returned only about the forms file
                                  associated with comarea; if you specify
                                  a number greater than one, you get
                                  duplicate information).

                 entrylength      Indicates how many two-byte words of
                                  information (maximum 19 as shown in
                                  Table 6-11) you want about the file.

                 Remember that infobuf must be initialized to spaces
                 before filling in the parameters.

infobuflen       Two-byte integer variable set to number of two-byte
                 words in infobuf.

Discussion 

This intrinsic accesses an internal table and places information about
the open forms file into infobuf.  You tell VGETFILEINFO how much
information you want about the file.

          Table 6-11.  File Information Buffer 

-------------------------------------------------------------------------------------------------
|                   |              |                                |                           |
|     Data Type     |   Position   |            Contents            |         Comments          |
|                   |              |                                |                           |
-------------------------------------------------------------------------------------------------
|                   |              |                                |                           |
| Integer           | 1            | numofentries                   | Required                  |
| (Two-byte)        |              |                                |                           |
|                   |              |                                |                           |
|                                                                                               |
|                   |              |                                |                           |
|                   | 2            | entrylength                    | Required                  |
|                   |              |                                |                           |
-------------------------------------------------------------------------------------------------
|                   |              |                                |                           |
| Integer Array     | 3-4          | File version number            | A date/time stamp,        |
| (Four-byte)       |              |                                | recorded at last forms    |
|                   |              |                                | file compile.             |
|                   |              |                                |                           |
-------------------------------------------------------------------------------------------------
|                   |              |                                |                           |
| Integer           | 5            | Number of forms in file        |                           |
| (Two-byte)        |              |                                |                           |
|                   |              |                                |                           |
|                                                                                               |
|                   |              |                                |                           |
|                   | 6            | Maximum number of fields       | In any one form           |
|                   |              |                                |                           |
|                                                                                               |
|                   |              |                                |                           |
|                   | 7            | Maximum data buffer size in    | Of any one form, plus up  |
|                   |              | two-byte words                 | to one additional         |
|                   |              |                                | two-byte word.            |
|                   |              |                                |                           |
|                                                                                               |
|                   |              |                                |                           |
|                   | 8            | Number of save fields in file  |                           |
|                   |              |                                |                           |
-------------------------------------------------------------------------------------------------
|                   |              |                                |                           |
| Character Array   | 9-16         | Name of head form in file      | Last byte of position 16  |
|                   |              |                                | is unused                 |
|                   |              |                                |                           |
|                                                                                               |
|                   |              |                                |                           |
|                   | 17-18        | Global error enhancement       | Combination of I, H, U,   |
|                   |              |                                | B, 1-8, or NONE.          |
|                   |              |                                |                           |
|                                                                                               |
|                   |              |                                |                           |
|                   | 19-20        | Global window enhancement      | Combination of I, H, U,   |
|                   |              |                                | B, 1-8, or NONE.          |
|                   |              |                                |                           |
-------------------------------------------------------------------------------------------------
|                   |              |                                |                           |
| Integer           | 21           | Position of window             | Line number, 0-24.  The   |
| (Two-byte)        |              |                                | line 1; zero (0) means no |
|                   |              |                                | window.                   |
|                   |              |                                |                           |
-------------------------------------------------------------------------------------------------

Example 

COBOL

     DATA DIVISION.
            :
            :
     WORKING-STORAGE SECTION.
     01 INFOBUF.
         05   NUMBER-OF-ENTRIES                         PIC S9(4) COMP.
         05   ENTRY-LENGTH                              PIC S9(4) COMP.
         05   ENTRY-TABLE OCCURS 1 TIMES.
              10 FILE-VERSION                           PIC S9(8) COMP.
              10 NUMBER-OF-FORMS                        PIC S9(4) COMP.
              10 MAX-FIELDS                             PIC S9(4) COMP.
              10 MAX-BUFSIZE                            PIC S9(4) COMP.
              10 SAVE-FIELDS                            PIC S9(4) COMP.
              10 HEAD-FORM                              PIC X(15).
              10 FILLER                                 PIC X.
              10 ERROR-ENHANCE                          PIC X(4).
              10 WINDOW-ENHANCE                         PIC X(4).
              10 WINDOW-POSITION                        PIC S9(4) COMP.
     01 INFOBUFLEN                                      PIC S9(4) COMP VALUE 21.
           :
           :
     PROCEDURE DIVISION.
           :
           :
         MOVE SPACES TO INFOBUF.
           :
           :
         MOVE 1 TO NUMBER-OF-ENTRIES.
         MOVE 19 TO ENTRY-LENGTH.
         CALL "VGETFILEINFO" USING COMAREA, INFOBUF, INFOBUFLEN.

The example shown above illustrates the data declaration of infobuf and
infobuflen and the passing of parameters to VGETFILEINFO. Note that
before the intrinsic is called, infobuf is initialized to spaces (not 
zeros).  The intrinsic copies 19 two-byte words of information about the
open forms file into infobuf.



MPE/iX 5.0 Documentation