Data Transfer Method E [ 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 E
This data transfer method moves data to and from fields referenced in the
form and allows your application to specify data type conversions. This
method differs from Method D in that transferred data can come from more
than one buffer. Use method E when you need to transfer data between a
form and multiple buffers in the application.
The application passes the field address contained in the application
data space, the field length, and the data conversion operation that is
to be performed. For the HP 3000 MPE/V operating system, the address you
pass must be within plus or minus 32000 of the databuf address, and must
map to a location within the same data segment as databuf. The address
must also be DB-relative.
You indicate this kind of data transfer by assigning the value 60 or 70
to the subparameter descrpttype. Assign the value 60 if you want to
identify fields by number. Assign the value 70 if you want to identify
fields by name.
The values you must supply to use this data mapping method are:
descrpttype Supply the value 60 to identify fields by
number.
Supply the value 70 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 that represents the
number of active field entries in the table.
fldentry Identifies the table defined by your
application.
fldloc Supply a four-byte integer that represents the
byte address of the field in the application
data space. If you supply a zero, Hi-Li
assumes the field is in databuf and the
location of the field in the application data
space is determined by applying the offset of
the referenced field in the form data buffer to
databuf.
fldlen Supply a four-byte integer to represent the
number of bytes you want to move. If you
supply a zero, the length of the referenced
field in the form data buffer is used by
default. If you supply a negative 1, no data
is moved between the application and the form.
rtnfldlen A four-byte integer. The number of field data
bytes actually moved is returned here.
typcnvcode Supply a four-byte integer to indicate the data
type conversion you want performed. The
conversions that you can use are:
0 = no conversion
1 = two-byte integer conversion
2 = four-byte integer conversion
3 = four-byte HP3000 format floating point
(real) conversion
4 = eight-byte HP3000 format floating point
(long) conversion
5 = reserved for four-byte IEEE format floating
point (real) conversion
6= reserved for eight-byte IEEE format floating
point (long) conversion
fldid If you have given descrpttype a value of 60,
supply a four-byte integer that identifies a
field. An integer greater than zero indicates
a field number; an integer less than zero
indicates screen order.
If you have given descrpttype a value of 70,
supply a 32-byte character array that
represents the USASCII name of the field.
Examples
COBOL:
01 datadescrpt.
05 descrptype 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 fldloc pic s9(8) comp.
10 fldlen pic s9(8) comp.
10 rtnfldlen pic s9(8) comp.
10 typcnvcode pic s9(8) comp.
10 fldid pic x(32).
FORTRAN: INTEGER*4 DATADESCRPT(64)
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)
INTEGER*4 FLDLOC(12,5)
INTEGER*4 FLDLEN(12,5)
INTEGER*4 RTNFLDLEN(12,5)
INTEGER*4 TYPCNVCODE(12,5)
EQUIVALENCE (DATADESCRPT(5), FLDLOC),
+ (DATADESCRPT(5), FLDLEN),
+ (DATADESCRPT(5), RTNFLDLEN),
+ (DATADESCRPT(5), TYPCNVCODE)
CHARACTER*16 FLDID(3,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
fldloc : integer;
fldlen : integer;
rtnfldlen : integer;
typcnvcode : integer;
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