PUT list-directed
In list-directed data transmission, how data values are converted and written out depends on the value type and file attributes.
The values of the data-list items are converted to character representations (except for graphics) and transmitted to the data stream. A blank separates successive data values transmitted. For PRINT files, items are separated according to program tab settings (see PRINT attribute).
Arithmetic values are converted to character.
Binary data values are converted to decimal notation before being placed in the stream.
For numeric character values, the character value is transmitted.
Bit strings are converted to character strings. The character string is enclosed in quotation marks and followed by the letter B.
Character strings are written out as follows:
- If the file does not have the attribute PRINT, enclosing quotation marks are supplied, and contained single quotation marks or apostrophes are replaced by two quotation marks. The field width is the current length of the string plus the number of added quotation marks.
- If the file has the attribute PRINT, enclosing quotation marks are not supplied, and contained single quotation marks or apostrophes are unmodified. The field width is the current length of the string.
Mixed strings are written out as follows:
- If the file does not have the attribute PRINT, SBCS quotation marks and the letter M are supplied. Contained SBCS quotes are replaced by two quotes.
- If the file has the attribute PRINT, the enclosing quotation marks and letter M are not supplied, and contained single quotation marks are unmodified.
Graphic strings are written out as follows:
- If the file does not have the attribute PRINT, SBCS quotation marks, and the letter G are supplied. Because the enclosing quotation marks are SBCS, contained graphic quotation marks are represented by a single graphic quotation mark (unmodified).
- If the file has the attribute PRINT, the enclosing quotation marks and letter G are not supplied, and graphic quotation marks are represented by a single graphic quotation mark (unmodified).