Record Description for the Variable-length Records:
When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 following the FD entry for the file. The variable part is defined with the OCCURS...DEPENDING clause.
FD VARIABLE-FILE
RECORD CONTAINS 40 TO 92 CHARACTERS
BLOCK CONTAINS 933 TO 1024 CHARACTES
LABEL RECORDS AERA ATANDARDA
RECORDING MODE IS V
VALUS OF INDENTIFICATION IS "VARFILE".
01 VARIABLE-RECORD.
02 ACCOUNT-NUMBER PIC 9(6).
02 NAME PIC X(20).
02 NO-OF-PAYAMENTS PIC 9.
02 PAYMENTS OCCURS 1 TO 5 TIMES DEPENDING ON
NO-OF-PAYMENTS INDEXED BY TAB-INDEX.
03 DATE-OF-PAYAMENT 9(6).
03 AMOUNT-OF-PAYMENT 9(5)V99.