REREAD
REREAD
instructs the program to reread a record in the data. It is available only
within an INPUT PROGRAM
structure and is generally used to define data using
information obtained from a previous reading of the record.
REREAD [FILE=file]
[COLUMN=expression]
Example
INPUT PROGRAM.
DATA LIST /KIND 10-14 (A).
DO IF (KIND EQ 'FORD').
REREAD.
DATA LIST /PARTNO 1-2 PRICE 3-6 (DOLLAR,2) QUANTITY 7-9.
END CASE.
ELSE IF (KIND EQ 'CHEVY').
REREAD.
DATA LIST /PARTNO 1-2 PRICE 15-18 (DOLLAR,2) QUANTITY 19-21.
END CASE.
END IF.
END INPUT PROGRAM.
BEGIN DATA
111295100FORD
11 CHEVY 295015
END DATA.