GET (Get a Record) Macro

GET makes the next sequential logical record from an input file available for processing in either an input area or in a specified work area.

It is used for any input file in the system, and for any type of record. If GET is used with a file containing checkpoint records, the checkpoint records are bypassed automatically.

Format

Read syntax diagramSkip visual syntax diagramnameGETfilename(1), workname,(0)

Requirements for the caller

AMODE:
24
RMODE:
24
ASC Mode:
Primary

Parameters

filename | (1)
This operand must be the same as the name of the DTF macro for the file from which the record is to be retrieved. The name can be specified as a symbol or in (special or ordinary) register notation (to make your program self-relocating). The high-order bits of the register must be zero, or unpredictable results might occur.
workname | (0)
This operand specifies a work area name or a register (in either special or ordinary register notation) containing the address of the work area. The work area address should never be preloaded into register 1.

The operand is used if the corresponding DTF contains the WORKA=YES operand, indicating that the records are to be processed in a work area. You must define the work area in your program. You can do this using a DS instruction, for example.

Specifying a work area causes GET to move each individual record from the input area to the work area.

If the operand is specified, all GETs for the named file must use either a register or a workname.

The workname operand is not valid for the 3881. Also, you cannot specify the WORKA operand in the DTFCD for the 3881.