HiLMAs reference
Back

Input/Output instructions

Next

FSTARTBR

FSTARTBR numfile,KEY=key[,KEYLEN=key-length,MODE=BACK/BACKLAST]

 

Description

This statement Start a browse of a file (corresponds to Dynamic access in COBOL); no record is fetched by this statement: it only change the pointer to the next record to be Read (or Write, in some cases).

numfile is a numeric constant (from 1 to 20) used in FOPEN statement to handle the file.
key is the variable containing the key if the file is a KSDS or a RRDS or a CMS file
key-length is the optional length of this key

Let's summarize now how to use this instruction:

For a VSAM file (MVS/TSO/DOS/CICS):

  • Specify only KEY= (without KEYLEN=) for a full key start browse; KEY is a string variable for a KSDS, an integer meaning slot number for a RRDS and an integer meaning a record-RBA for a ESDS (if you know the correct RBA)
  • Specify both KEY= and KEYLEN= for a partial key start browse
  • use MODE=BACKLAST (with a dummy key) to browse the file from the last record backward
  • use MODE=BACK with the desired key to browse backward from the desired record
  • default is browse forward, i.e. MODE= without value; MODE is not managed in CICS
  • remember that in CICS environment FSTARTBR should be ended by FENDBR

For a CMS file (CMS):

  • KEY= is a integer variable containing the record number.

Parameter specifications

Parameter Name  Mode Type coding Remark
1 numfile Input numeric constant from 1 to 20
  KEY= Input String C or X or const. If file is a KSDS
  KEY= Input Integer F If file is a RRDS or a CMS file
  KEYLEN= Input Integer F or H for a partial key
  MODE= fixed word BACK or BACKLAST only VSAM batch

 

Examples

 


Back Start Next
FREWRITE Top FENDBR