



If more than one record description entry is associated with file-name-1, these records automatically share the same storage area; that is, they are implicitly redefined. After a READ statement is executed, only those data items within the range of the current record are replaced; data items stored beyond that range are undefined. Figure 16 illustrates this concept. If the range of the current record exceeds the record description entries for file-name-1, the record is truncated on the right to the maximum size. In either of these cases, the READ statement is successful and an I-O status (04) is set indicating a record length conflict has occurred.
The FD entry is: FD INPUT-FILE LABEL RECORDS OMITTED.
01 RECORD-1 PICTURE X(30).
01 RECORD-2 PICTURE X(20).
Contents of input area when READ statement is executed:
_______________________________ ABCDEFGHIJKLMNOPQRSTUVWXYZ1234 _______________________________
Contents of record being read in (RECORD-2):
____________________ 01234567890123456789 ____________________
Contents of input area after READ is executed:
01234567890123456789?????????? | | | | |________|
(these characters in input area are undefined)
Figure 16. READ Statement with Multiple Record Description
© Copyright IBM Corp. 1991, 1998
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.