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

Transmission of data-list items

If a data-list item is of complex mode, the real part is transmitted before the imaginary part.

If a data-list item is an array expression, the elements of the array are transmitted in row-major order; that is, with the rightmost subscript of the array varying most frequently.

If a data-list item is a structure expression, the elements of the structure are transmitted in the order specified in the structure declaration.

For example, the statements

  declare 1 A (10),
          2 B,
          2 C;
  put file(X) list(A);

result in the output being ordered as follows:

  A.B(1) A.C(1) A.B(2) A.C(2) A.B(3)
      A.C(3)...

If, however, the declaration is:

  declare 1 A,
            2 B(10),
            2 C(10);

the same PUT statement results in the output ordered as follows:

  A.B(1) A.B(2) A.B(3) ... A.B(10)
  A.C(1) A.C(2) A.C(3) ... A.C(10)

If an input statement for list- or edit-directed transmission assigns a value to a variable in a data list, the assigned value is used if the variable appears in a later reference in the data list. For example:

  get list (N,(X(I) do I=1 to N),J,K,);
       substr (Name, J,K));

When this statement is executed, values are transmitted and assigned in the following order:

  1. A new value is assigned to N.
  2. Elements are assigned to the array X as specified in the repetitive specification in the order X(1),X(2),...X(N), with the new value of N specifying the number of assigned items.
  3. A new value is assigned to J.
  4. A new value is assigned to K.

Terms of use | Feedback

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