The PUT statement creates a record of saves as a stream that can be saved to a dataset or string.
When saving data to a dataset, the syntax of the PUT statement is as follows:
PUT FILE Statement
| Component | Description |
|---|---|
FILE |
Target file. (Default value: SYSIN file) |
data-specification |
Refer to Data Specification. |
SKIP (expression) |
Sets a number of lines to skip. (Default value: 1) |
LINE (expression) |
Sets a value of lines to move. To use the LINE option, a file must have the PRINT attribute. |
PAGE |
Starts a new page. The default start line value is 1. To use the PAGE option, a file must have the PRINT attribute. |
When saving data to a string, the syntax of the PUT statement is as follows:
PUT STRING Statement
| Component | Description |
|---|---|
STRING |
Target string. |
data-specification |
Refer to Data Specification. |