GSAM I/O areas
If you provide an optional I/O area, it must contain one of these values.
- INP for an input data set
- OUT for an output data set
- OUTA for an output data set with ASA control characters
- OUTM for an output data set with machine control characters
For GN, ISRT, and GU calls, the format of the
I/O area depends on whether the record is fixed-length, undefined-length (valid only for BSAM), or
variable-length. For each kind of record, you have the option of using control characters.
The formats of an I/O area for fixed-length or undefined-length records are:
- With no control characters, the I/O area contains only data. The data begins in byte 0.
- With control characters, the control characters are in byte 0 and the data begins in byte 1.
If you are using undefined-length records, the record length is passed between your program and
GSAM in the PCB field that follows the key feedback area. When you are issuing an
ISRT call, supply the length. When you are issuing a GN or
GU call, GSAM places the length of the returned record in this field. This length
field is 4 bytes long.
The formats for variable-length records differ because variable-length records include a length field, which other records do not have. The length field is 2 bytes. Variable-length I/O areas, like fixed-length and undefined-length I/O areas, can have control characters.
- Without control characters, bytes 0 and 1 contain the 2-byte length field, and the data begins in byte 2.
- With control characters, bytes 0 and 1 still contain the length field, but byte 2 contains the control characters, and the data starts in byte 3.