ASAM I/O areas


An application program must identify an I/O area in working storage to contain the data to read from or write to each ASAM data set. The format of this I/O area uses standard conventions:

  • If the record format is variable, the first two positions of the I/O area contain the length of the record.
  • If the data set contains control characters, the first position contains the control character for fixed and undefined record types and the third position contains the control character for variable record formats.

The length of the rest of the ASAM I/O area depends on the length of the data to store in (or retrieve from) the ASAM data set.

For an OPEN function, the ASAM I/O area can contain the following operands:

INP

input

OUT

standard output

OUTA

output with ISO/ANSI control characters

OUTM

output with machine control characters

The following example shows a typical ASAM I/O area in COBOL. The area contains three character-type fields (4 bytes, 16 bytes, and 32 bytes, respectively):

IDENTIFICATION DIVISION.
...
DATA DIVISION.
WORKING-STORAGE SECTION.
01   ASAMAREA.
     02 ASAMFLD1 PICTURE X(4).
     02 ASAMFLD2 PICTURE X(16).
     02 ASAMFLD3 PICTURE X(32).

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*