Purpose
To specify a pipe as a target for records.
Format
/OUTPIPE pipe_identifier [disposition] pipe_type [pipe_attribute …]where
pipe_identifier | = | {pipe_name } {pipe_descriptor OPEN} {– } |
disposition | = | {OVERWRITE} {APPEND } |
pipe_type | = | {STREAM CRLF } {STLF } {STCR } {FIXED record_length [record_alignment] } {VARIABLE [LITTLEENDIAN] [record_alignment]} {VARIABLE DISTRIBUTABLE } {FORTRANUNFORMATTED } |
pipe_attribute | = | {compress_attribute} {encoding_attribute} {field_delimiters } {partition_scheme } {record_numbering } |
record_alignment | = | {ALIGNED2 } {ALIGNED4 } {UNALIGNED} |
compress_attribute | = | {COMPRESSED [SOURCECOMPRESSIONFORMAT|BZIP2|GZIP] [HIGHCOMPRESSION] } {UNCOMPRESSED } |
encoding_attribute | = | ENCODING encoding_value [BOM] |
encoding_value | = | {SOURCEENCODING} |
{encoding } {character_set } |
||
field_delimiters | = | [FIELDSEPARATOR separator] [enclosedby_setting] |
enclosedby_setting | = | {ENCLOSEDBY leading_character [,trailing_character]} {NOTENCLOSED } |
record_numbering | = | RECORDNUMBER [START recnum_start] [EACHPARTITION] |
Arguments
pipe_name |
The pathname of the pipe that is to receive records from the task. For details on specifying a file path, see File Name and Syntax Requirements . |
pipe_descriptor | The descriptor of the open pipe, which is to receive records from the task. |
– | Indicator for standard output. Tells dmexpress to pipe target records to standard output. |
record_length | The length in bytes associated with the following /OUTPIPE target record type clauses: FIXED. |
encoding |
The encoding argument can be used for encoding a text field of data with one of the following built-in character sets: ASCII, EBCDIC, Locale, UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, or UTF-32LE. Note: When Locale is specified, the encoding used is that which is defined by the system locale where Connect ETL runs. This encoding value can be specified as a built-in character set keyword without quotes or as a string as outlined in File Name and Syntax Requirements . For additional information, see the following Connect help topics: "Data encoding" and "Text data type." |
character_set |
The character_set argument can be used for encoding a text field of data with one of the ICU library character sets. This character set value must be specified as a string as outlined in File Name and Syntax Requirements . For additional information, see the following Connect help topics: "Data encoding" and "Text data type." |
separator |
A single byte or multibyte character string that separates adjacent fields in delimited text records. You can specify the character string in single-quoted or double-quoted format as outlined in Constants. At runtime, field separators are treated as follows:
|
leading_character | The character in the field-delimited text records that optionally precedes the data in each delimited field. |
trailing_character | The character in the field-delimited text records that optionally follows the data in each delimited field. |
recnum_start | The number assigned to the first record in the file, for record numbering. The minimum value is zero. The default is 1. |
Location
The option may appear anywhere in the task definition.
Defaults
When no outputs are present, Connect ETL writes its output to standard output.
Field Separator
The default field separator for the output is the same as the single byte or multibyte field separator of the first input that is different than UNIXSORTDEFAULT. If all inputs have either a UNIX default separator or no separator, then the default output field separator is a space. If none of the inputs are delimited, the output is not delimited.
Pipe Type
For information on supported pipe types, see Source and Target File Types and Records.
Record Alignment
When you do not provide the record alignment, the attribute is taken from the first source specified via /INFILE, /INPIPE, or /INBUFFER.
Compression
When neither COMPRESSED nor UNCOMPRESSED is specified, the attribute is taken from the first source specified via /INFILE or /INPIPE.
When COMPRESSED is specified without SOURCECOMPRESSIONFORMAT, BZIP2 or GZIP, Connect ETL generates output compressed in gzip format.
The HIGHCOMPRESSION option will minimize the size of the target data, but this may impact the performance. By default, the decision is made to optimize for speed.
Encoding and Byte Order Mark (BOM)
Use the ENCODING option to describe the character encoding of your target pipe. The encoding is used to generate stream record terminators as well as any field delimiters or enclosing characters specifed. An encoding of LOCALE uses the system’s character set.
When no encoding is specified, a non-XML target pipe will have the same encoding as the first non-XML source file or pipe, if present. Otherwise, the non-XML target encoding defaults to ASCII. If UTF-16 or UTF-32 is specified for a non-XML target pipe, the byte order will be determined by the byte order of the first non-XML source file or pipe. However, if the first non-XML source file or pipe is not a variation of UTF-16 or UTF-32, respectively, the byte order is assumed to be big-endian.
When BOM is specified, Connect ETL will create a byte order mark on your target pipe. More information regarding Unicode encodings and the Byte Order Mark can be found at http://unicode.org/faq/utf_bom.html.
Notes
The /OUTPIPE option defines a pipe as a target for records.
Number of Output Pipes
Connect ETL writes the output records to one or more pipes. The number of output pipes is not restricted by Connect ETL. For each output pipe, use a separate /OUTPIPE option.
Existence of Output Pipe
The target pipe for receiving Connect ETL output records must be created prior to running the task.
Record Length
In the /OUTPIPE option, you must provide record length values for the following pipe types: FIXED.
Field Separator
A field-delimited text record consists of consecutive fields, with adjacent fields separated by single byte or multibyte separator characters. When you want the field separator to be different than the default, specify the output separator through the separator argument.
When the ENCLOSEDBY characters are different from input, a target reformat is required.
Record Alignment
If you want all records in an output pipe to be aligned on 2-byte boundaries, supply the ALIGNED2 keyword except for fixed format records of even length. If you want records to be aligned on 4-byte boundaries, supply the ALIGNED4 keyword except for fixed format records whose length is a multiple of 4 bytes.
Record Numbering
When you want to add a record number to the records in the pipe, specify the RECORDNUMBER argument. To start the numbering at other than 1, provide START recnum_start.
If you do not specify a /REFORMAT option for the pipe, Connect ETL will automatically add a record number to the beginning of each record. The number appears as a 10- digit, unsigned decimal number. When the records in the pipe are field-delimited text records, leading zeroes in the number do not appear and a field separator follows the number.
If you do provide a /REFORMAT, Connect ETL does not automatically add a record number. See /REFORMAT for details on how to add the record number to a reformatting.
Compressed Files
If COMPRESSED is specified with SOURCECOMPRESSIONFORMAT, then the output is compressed in the same compression format as the first compressed source specified with /INFILE or /INPIPE. SOURCECOMPRESSIONFORMAT is not allowed when there is no compressed source specified with either /INFILE or /INPIPE.
When COMPRESSED is specified with BZIP2, Connect ETL generates a compressed bzip2 file as documented at http://www.bzip.org.
When COMPRESSED is specified with GZIP, Connect ETL generates a compressed gzip file that conforms to the RFC 1952 standard.
Encoding
When SOURCEENCODING is specified as the encoding_value, the encoding specified for the task sources is applied to the task targets. As SOURCEENCODING is a keyword, no quotes are required.
Nullable fields
When a NULL value is output to a field in a pipe, the result is an empty field. This is defined as a field of length 0 for a delimited field, and space padded for a fixed length field. For a field of binary data type, each byte of the field will be set to hex value "20".
Examples
/OUTPIPE sort1.out stlf
/OUTPIPE out_data variable aligned2
/OUTPIPE output_utf8_txt stream crlf encoding utf-8
The output pipe output_utf8_txt is to receive task output as MS-DOS text records – records that are terminated by a combination of carriage return and linefeed. The record terminators, enclosing characters and field delimiters are to be encoded in UTF-8.