[attr := ] OUTPUT(recordset [, [ format ] [,file [thorfileoptions ] ] [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
[attr := ] OUTPUT(recordset, [ format ] ,file , CSV [ (csvoptions) ] [csvfileoptions ] [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
[attr := ] OUTPUT(recordset, [ format ] , file , XML [ (xmloptions) ] [xmlfileoptions ] [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
[attr := ] OUTPUT(recordset, [ format ] , file , JSON [ (jsonoptions) ] [jsonfileoptions ] [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
[attr := ] OUTPUT(recordset, [ format ] ,PIPE( pipeoptions [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
[attr := ] OUTPUT(recordset [, format ] , NAMED( name ) [,EXTEND] [,ALL] [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
[attr := ] OUTPUT( expression [, NAMED( name ) ] [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
[attr := ] OUTPUT( recordset , THOR [, NOXPATH ] [, UNORDERED | ORDERED( bool ) ] [, STABLE | UNSTABLE ] [, PARALLEL [ ( numthreads ) ] ] [, ALGORITHM( name ) ] );
attr | Optional. The action name, which turns the action into a definition, therefore not executed until the attr is used as an action. |
recordset | The set of records to process. This may be the name of a dataset or a record set derived from some filter condition, or any expression that results in a derived record set. |
format | Optional. The format of the output records. If omitted, all fields in the recordset are output. If not omitted, this must be either the name of a previously defined RECORD structure definition or an "on-the-fly" record layout enclosed within curly braces ({}), and must meet the same requirements as a RECORD structure for the TABLE function (the "vertical slice" form) by defining the type, name, and source of the data for each field. |
file | Optional. The logical name of the file to write the records to. See the Scope & Logical Filenames section of the Language Reference for more on logical filenames. If omitted, the formatted data stream only returns to the command issuer (command line or IDE) and is not written to a disk file. |
thorfileoptions | Optional. A comma-delimited list of options valid for a THOR/FLAT file (see the section below for details). |
NOXPATH | Specifies any XPATHs defined in the format or the RECORD structure of the recordset are ignored and field names are used instead. This allows control of whether XPATHs are used for output, so that XPATHs that were meant only for xml or json input can be ignored for output. |
UNORDERED | Optional. Specifies the output record order is not significant. |
ORDERED | Specifies the significance of the output record order. |
bool | When False, specifies the output record order is not significant. When True, specifies the default output record order. |
STABLE | Optional. Specifies the input record order is significant. |
UNSTABLE | Optional. Specifies the input record order is not significant. |
PARALLEL | Optional. Try to evaluate this activity in parallel. |
numthreads | Optional. Try to evaluate this activity using numthreads threads. |
ALGORITHM | Optional. Override the algorithm used for this activity. |
name | The algorithm to use for this activity. Must be from the list of supported algorithms for the SORT function's STABLE and UNSTABLE options. |
CSV | Specifies the file is a field-delimited (usually comma separated values) ASCII file. |
csvoptions | Optional. A comma-delimited list of options defining how the file is delimited. |
csvfileoptions | Optional. A comma-delimited list of options valid for a CSV file (see the section below for details). |
XML | Specifies the file is output as XML data with the name of each field in the format becoming the XML tag for that field's data. |
xmloptions | Optional. A comma separated list of options that define how the output XML file is delimited. |
xmlfileoptions | Optional. A comma-delimited list of options valid for an XML file (see the section below for details). |
JSON | Specifies the file is output as JSON data with the name of each field in the format becoming the JSON tag for that field's data. |
jsonoptions | Optional. A comma separated list of options that define how the output JSON file is delimited. |
jsonfileoptions | Optional. A comma-delimited list of options valid for an JSON file (see the section below for details). |
PIPE | Indicates the specified command executes with the recordset provided as standard input to the command. This is a "write" pipe. |
pipeoptions | The name of a program to execute, which takes the file as its input stream, along with the options valid for an output PIPE. |
NAMED | Specifies the result name that appears in the workunit. Not valid if the file parameter is present. |
name | A string constant containing the result label. This must be a compile-time constant and meet the attribute naming requirements. This must be a valid label (See Definition Name Rules) |
EXTEND | Optional. Specifies appending to the existing NAMED result name in the workunit. Using this feature requires that all NAMED OUTPUTs to the same name have the EXTEND option present, including the first instance. |
ALL | Optional. Specifies all records in the recordset are output to the ECL IDE. |
expression | Any valid ECL expression that results in a single scalar value. |
THOR | Specifies the resulting recordset is stored as a file on disk, "owned" by the workunit, instead of storing it directly within the workunit. The name of the file in the DFU is scope::RESULT::workunitid. |
The OUTPUT action produces a recordset result from the supercomputer, based on which form and options you choose. If no file to write to is specified, the result is stored in the workunit and returned to the calling program as a data stream.
Field names in an "on the fly" record format {...} must be unique or a syntax error results. For example:
OUTPUT(person(), {module1.attr1, module2.attr1});
will result in a syntax error. Output Field Names are assumed from the definition names.
To get around this situation, you can specify a unique name for the output field in the on-the-fly record format, like this:
OUTPUT(person(), {module1.attr1, name := module2.attr1});