COBOL VB File: RECORD VARYING Clause

The below is the sample COBOL program snippet to write logic for VB files.


FD  I-BACKUP-BILL-FILE
RECORDING MODE IS V
RECORD IS VARYING FROM 1 TO 14600 CHARACTERS
DEPENDING ON BP-REC-LENGTH.
01  I-BP-REC           PIC X(14600).
..

and, BP-REC-LENGTH can be defined as …..

01 BP-REC-LENGTH     PIC 9(4)  Value Zero Comp Sync.

For VB files the above code is simple and efficient.

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.