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

X-format item

The spacing (or X) format item specifies the relative spacing of data values in the data stream.

Read syntax diagramSkip visual syntax diagram>>-X--(field-width)--------------------------------------------><
 
field-width
Specifies an expression that is evaluated and converted to an integer value, which must be nonnegative, each time the format item is used. The integer value specifies the number of characters before the next field of the data stream, relative to the current position in the stream.

On input, the specified number of characters are spaced over in the data stream and not transmitted to the program.

For example:

  get edit (Number, Rebate)
         (A(5), X(5), A(5));

The next 15 characters from the input file, SYSIN, are treated as follows: the first five characters are assigned to Number, the next five characters are ignored, and the remaining five characters are assigned to Rebate.

On output, the specified number of blank characters are inserted into the stream.

In the example:

  put file(Out) edit (Part, Count) (A(4), X(2), F(5));

Four characters that represent the value of Part, then two blank characters, and finally five characters that represent the fixed-point value of Count, are placed in the file named Out.


Terms of use | Feedback

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