Frankly, I do not understand, what is not clear in this issue?
List-Directed Output
The LIST option specifies list-directed output.
The PUT LIST statement causes each value specified by the output list to be written to the stream file without the use of a format item. Each value to be output is converted to a character-string value using the normal rules for converting to a character string given in the section Data Type Conversions.
If the original output value is a bit string, the resulting character string is enclosed in quotation marks and a B is appended to its right end.
With PUT LIST and PUT DATA, if a variable of type AREA or a structure containing elements of type AREA is used as an argument, <...> is output as its contents. This is because the actual contents of the contents of AREA in these cases is not readable.
Data-Directed Output
The DATA option specifies data-directed output.
The PUT DATA statement is equivalent to the PUT LIST statement, with the following differences:
An output-list item can be a scalar, element, array, or structure reference, not an expression. The reference may contain structure qualifiers and subscripts, but may not be locator qualified.
The dataname of each reference is written along with the value. This is done in the form dataname=value. If the value is an array, each element is written with its array name and the actual value of its subscript(s). If the value is a structure, each elementary member is written with its dataname fully qualified and with all subscripts at the end.
The dataname=value combinations are separated by spaces except when writing to a PRINT file, when each such item will be aligned on a TAB stop. A semicolon is written following the last value.
The data values are written, in most cases, just as they are in PUT LIST. However, for character data, the data value is always enclosed in quotes when it is written out.
A based variable in the output-list must be declared with an explicit pointer.
Since
the data value is always enclosed in quotes then internal quotes MUST BE DOUBLED. Clear as a bell.
Javas and Pythons come and go, but JCL and SORT stay forever.