Previous Topic Next topic Print topic


Referencing Arrays and Aggregate Structures

Arrays and aggregate structures can be referenced in their entirety by referring to them by their array or structure name, or individual subfields or members can be referenced using the conventional PL/I syntax, as in REC_NAME.FIELD. A subfield can be referenced directly as long as its name is unique.

A specified range of an array can be evaluated using the following command-line syntax:

EVALUATE array-name [m:n]

or

EVALUATE array-name (m:n)

where m is the starting point of the array range and n is the ending point of the array range.

An asterisk (*) specifies that all elements of a dimension are to be evaluated. For example:

EVALUATE array-name[*,3:5]

or

EVALUATE array-name(*,3:5)

displays the third through fifth columns of all the rows in a two-dimensional array.

Specifying only the array name for PL/I will cause the evaluation of every element of every dimension of the array. Similarly, specifying a structure, record, or group name will cause the evaluation of every member of the group.

Previous Topic Next topic Print topic