HP 3000 Manuals

Data Transfer Method C [ 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

Data Transfer Method C 

This data transfer method lets you move a subset of data from or to the
fields referenced in the form.  Use this method if your application
initializes information from both the forms file and the application
buffer, or if you want to return a selected subset of data to your
application.  You indicate this method by specifying the value 20 or 30
for the descrpttype subparameter.  Use 20 if you want to identify fields
by number and 30 if you want to identify fields by name.

The offset and length of each field in the application data buffer is
implicitly defined by the form.  This means the application buffer must
have the same layout as the form.

The subparameters you must supply to use this data mapping method and
their values are:

descrpttype               Supply a value of 20 to identify fields by
                          number.

                          Supply a value of 30 to identify fields by
                          name.

buflen                    A four-byte integer.  This subparameter is not
                          used by Hi-Li for this method, but must be
                          passed anyway.

rtnbuflen                 A four-byte integer.  This subparameter is not
                          used by Hi-Li for this method, but must be
                          passed anyway.

entrycnt                  Supply a four-byte integer to represent the
                          number of active field entries in the table.

fldentry                  Identifies the table in your application.

fldid                     If you supplied the value 20 for descrpttype,
                          supply a four-byte integer which identifies the
                          field.  If the integer is greater than zero, it
                          indicates the field number.  If the integer is
                          less than zero, it indicates screen order.

                          If you supplied the value 30 for descrpttype,
                          supply a 32-byte character array that is the
                          USASCII name of the field.

Examples 

        COBOL:
                    01 datadescrpt.
                       05  descsrpttype      pic s9(8) comp.
                       05  buflen            pic s9(8) comp.
                       05  rtnbuflen         pic s9(8) comp.
                       05  entrycnt          pic s9(8) comp.
                       05  fldentry   occurs 5 times.
                          10  fldid         pic x(32).

        FORTRAN:
                    INTEGER*4     DATADESCRPT(44)
                    INTEGER*4     DESCRPTTYPE
                    INTEGER*4     BUFLEN
                    INTEGER*4     RTNBUFLEN
                    INTEGER*4     ENTRYCNT
                    EQUIVALENCE (DATADESCRPT(1), DESCRPTTYPE),
                   +            (DATADESCRPT(2), BUFLEN),
                   +            (DATADESCRPT(3), RTNBUFLEN),
                   +            (DATADESCRPT(4), ENTRYCNT)
                         CHARACTER*32  FLDID(1,5)
                         EQUIVALENCE (DATADESCRPT(5), FLDID)

For an example of how a record structure can be manipulated in FORTRAN,
see the COLLECT_TXNS subroutine in the FORTRAN example program in
Appendix C.

        Pascal:     type
                      fldentry_rec = record
                        fldid           : packed array [1..32] of char;
                          end;

                    datadescrpt_rec = record
                      descrpttype     : integer;
                      buflen          : integer;
                      rtnbuflen       : integer;
                      entrycnt        : integer;
                      fldentry        : array [1..5] of fldentry_rec;
                        end;

                    var
                      datadescrpt         : datadescrpt_rec;



MPE/iX 5.0 Documentation