Fields and Flags, VSAM Batch

Use AMB-defined data fields and S-COBOL flags in your program.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
Field or Flag Name Associated Calls Description
APS-END- PROCESS

DB-PROCESS

Flag that terminates a DB-PROCESS loop. Example: TRUE RESET-OBTAIN

ddname-RRN

DB-OBTAINDB-PROCESSDB-ERASE DB STORE

Field that controls relative record number (RRN) of a retrieved or stored RRDS file record; generates value for the RELATIVE KEY clause of the SELECT statement.

Ddname is the external file name specified in the subschema.

Generated field definition isddname-RRN PIC 9(09)

RESET-OBTAIN

DB-OBTAIN DB-PROCESS

Flag that resets browse to beginning of file.

Example: TRUE RESET-OBTAIN

RRDS and ESDS support:

  • In RRDS processing, VSAM generates ddname-RRN, deriving the RRN (relative record number) of the current retrieved record. This allows access to a specific RRN. The field value is the RRN of each retrieved or stored record, and is updated after every successful READNEXT operation.
  • Assign a RRN value to ddname-RRN prior to a DB-STORE, if the SELECT statement ACCESS clause is either RANDOM or DYNAMIC.
  • An ESDS file is opened in I/O mode.