Data specifications in GET and PUT statements specify the data to be transmitted.
>>-+-+------+--(-| data-list |-)----------------------+-------->< | '-LIST-' | +-DATA--+--------------------------+---------------+ | | .-,--------------. | | | | V | | | | '-(----data-list-item-+--)-' | | .----------------------------------------. | | V | | '-EDIT----(-| data-list |-)--(-| format-list |-)-+-' data-list .-,----------------------------. V | |----+-data-list item-----------+-+-----------------------------| '-(-data-list--type-3-DO-)-' format-list .-,--------------------. V | |----+-format-item------+-+-------------------------------------| +-n--format-item---+ '-n--(format-list)-'
If a GET or PUT statement includes a data list that is not preceded by one of the keywords LIST, DATA, or EDIT, LIST is the default.
On output, a data list item for edit-directed and list-directed data specifications can be an element expression, an array expression, or a structure expression. For a data-directed data specification, a data-list item can be an element, an array, or a structure variable. It must not be locator-qualified. It can be qualified (that is, a member of a structure) or string-overlay-defined.
The data types of a data-list item can be any computational data (except for GET statements it must not have the VALUE attribute), and in PUT statements, the data type might also be POINTER. If the data type is non-computational, the contents of the item will be transmitted as if the item had been specified by applying the HEX built-in function applied to the item (and for PUT DATA, the hex value will be enclosed in quotation marks followed by a suffix of BX).
An array or structure variable in a data-list is equivalent to n items in the data list, where n is the number of element items in the array or structure. For edit-directed transmission, each element item is associated with a separate use of a data-format item.
When the last repetitive specification is completed, processing continues with the next data-list item.
Each repetitive specification must be enclosed in parentheses, as shown in the syntax diagram. If a data specification contains only a repetitive specification, two sets of outer parentheses are required, because the data list is enclosed in parentheses and the repetitive specification must have a separate set.
get list (((A(I,J)
do I = 1 to 2)
do J = 3 to 4));
There are three sets of parentheses, in addition to the set used to delimit the subscripts. The outermost set is the set required by the data specification. The next set is that required by the outer repetitive specification. The third set of parentheses is required by the inner repetitive specification.
do J = 3 to 4;
do I = 1 to 2;
get list (A (I,J));
end;
end;
A(1,3), A(2,3), A(1,4), A(2,4)