BMXACTLN
is a halfword binary value which contains the actual length of the data received
or transmitted in this field.
BMXDATA
is the address of the field data.
In the XBMIN exit, BMXDATA points into a work area which BMS has obtained
for input mapping purposes. When the exit returns control, this work area is
copied to the application data structure associated with this map.
In the XBMOUT exit, BMXDATA points into a terminal input/output area (TIOA)
in which BMS has generated an output datastream. When the exit returns
control, the TIOA is disposed of in accordance with the disposition of the
TERMINAL (the default), SET, or PAGING option specified on the SEND MAP
request.
BMXATTR
is only relevant in the XBMOUT exit. It is the address of the attributes (if any)
which BMS has placed in the output datastream preceding this field.
BMXMAPOF
is the offset of the field in the map. For example, if a map is defined as
MYMAP DFHMDI SIZE=(12,40)
and a field in this map is defined as
FLDA DFHMDF POS=(5,1)
the offset of this field (relative to zero) is 160 in decimal notation. In this
example, BMXMAPOF would contain the value X'00A0'.
BMXBUF
is the offset of the field in the device buffer. Usually—that is, when the map
dimensions are the same as the current screensize in use by the device—this
value will be the same as that of BMXMAPOF. However, using the example
given in the BMXMAPOF description above, if MYMAP is sent to a device
currently using a 24 by 80 screensize, the offset of the field in the device buffer
(again relative to zero) is 320 in decimal notation. In this example, BMXBUF
would contain the value X'0140'.
Programming the XBMIN exit
This section contains some considerations specific to the XBMIN exit.
The actual data length (in BMXACTLN) may be less than the length defined in the
map (in BMXMAPLN). This could happen, for example, if a terminal operator does
not completely fill a data entry field. In this case, BMS will have right- or left-justified
the data in the field and padded the field with blank or zero characters. This
justification and padding occurs before the exit is invoked. Your exit program can,
by checking the bit settings in the BMXFDFB field, determine how BMS performed
justification and padding for the field.
The actual data length (in BMXACTLN) may be greater than the length defined in
the map (in BMXMAPLN). This could happen, for example, if a map contains an
unprotected field which is not immediately followed by another field. This allows the
terminal operator to enter data past the end of the field. When this occurs, the data
field is truncated by BMS according to the length defined for the field in the map.
However, BMXACTLN contains the length of data found in the inbound datastream.
Chapter 1. Global user exit programs 37