Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

INTO option

The INTO option specifies an element or aggregate variable into which the logical record is read. The INTO option can be used in the READ statement for any INPUT or UPDATE file.

If the variable is an aggregate, it must be in connected storage. Certain uses of unaligned nonvarying bit strings are disallowed (for details, see Data transmitted).

The INTO variable can be an element string variable of varying length. For VARYINGZ strings, each record contains a null terminator. For VARYING strings, if the SCALARVARYING option of the ENVIRONMENT attribute was specified for the file, each record contains a 2-byte prefix that specifies the length of the string data.

If SCALARVARYING was not declared on input, the string length is calculated from the record length and attached as a 2-byte prefix (for VARYING strings). For VARYING bit strings, this calculation rounds up the length to a multiple of 8 and therefore the calculated length might be greater than the maximum declared length.

The following example specifies that the next sequential record is read into the variable RECORD_1:

  read file (Detail) into (Record_1);

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)