List-directed, sequential WRITE statements transfer data from binary to character form by using the data types of the corresponding I/O list item to determine the form of the data. The translated data is then written to an external file.
In general, values transferred as output have the same forms as values transferred as input.
Table 10-1 shows the default output formats for each intrinsic data type.
Table 10-1 Default Formats for List-Directed Output
|Data Type||Output Format|
1 VMS, U*X
2 Where w is the length of the character expression
By default, character constants are not delimited by apostrophes or quotation marks, and each internal apostrophe or quotation mark is represented externally by one apostrophe or quotation mark.
This behavior can be changed by the DELIM specifier (in an OPEN statement) as follows:
Each output statement writes one or more complete records.
A literal character constant or complex constant can be longer than an entire record. In the case of complex constants, the end of the record can occur between the comma and the imaginary part, if the imaginary part and closing right parenthesis cannot fit in the current record.
Each output record begins with a blank character for carriage control, except for literal character constants that are continued from the previous record.
Slashes, octal values, null values, and repeated forms of values are not output.
If the file is connected for unformatted I/O, list-directed data transfer is prohibited.
Suppose the following statements are specified:
The following records are then written to external unit 1:
DIMENSION A(4) DATA A/4*3.4/ WRITE (1,*) 'ARRAY VALUES FOLLOW' WRITE (1,*) A,4
ARRAY VALUES FOLLOW 3.400000 3.400000 3.400000 3.400000 4
For More Information: