Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Output destination

&pagelevel(5)&pagelevel

The output destination is defined by the OUTPUT operand. It can be:

  • the SYSOUT (default setting) or SYSLST system file

  • a user file or library element

  • a list variable

When variables are output, each variable value corresponds to an output line.

User file or library element

If output is rerouted to a user file or library element, each set of variable contents becomes a data record.

For files, the user can determine whether they are to be overwritten or extended. “Overwrite” means that the contents of the file are deleted. The first set of variable contents that is output becomes the first data record in the file. “Extend” means that the new data records are appended to the end of the file.

List variable

The output of variable contents can be rerouted to a complex variable of the list type. This list variable must not be both the source and destination of output.

If the list variable does not yet exist, it is declared implicitly with the data type *STRING and SCOPE = *CURRENT.

If the list variable exists, it is either overwritten or extended, depending on the supplementary operand WRITE-MODE.

“Overwrite” means that the old list element contents are deleted and the new contents are assigned to the list elements one after the other. One of the variable values that is output is assigned to each list element.

“Extend” means that the list variable is dynamically extended. For each variable value that is output, a new list element is appended to the list.