28.11.2012 Views

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PIPE SORT<br />

Syntax<br />

SORT:<br />

SORT<br />

PAD '00'X<br />

PAD 'nn'X<br />

A<br />

D<br />

▼ position.length<br />

Command Description<br />

The SORT stage reads messages from the input stream and writes them to the<br />

output stream in a specified order. Only the first line of each message is examined.<br />

To sort lines within a message, the SEPARATE stage must be included prior to<br />

SORT. If messages contain identical sort fields, they retain their input stream order<br />

when passed to the output stream.<br />

Streams<br />

Be<strong>for</strong>e any data is written to the output stream, all data is read from the input<br />

stream until the input stream disconnects. This causes the stream to be delayed.<br />

Stream Type Number Supported<br />

Input 1<br />

Output 1<br />

Termination Conditions<br />

SORT terminates when both the input stream and output stream disconnect.<br />

Operand Descriptions<br />

A Specifies that the messages are sorted in ascending order. That is, messages<br />

where the sort fields are lower EBCDIC values are output be<strong>for</strong>e those with<br />

higher EBCDIC values.<br />

D Specifies that the messages are sorted in descending order. That is, messages<br />

where the sort fields are higher EBCDIC values are output be<strong>for</strong>e those with<br />

lower EBCDIC values.<br />

PAD<br />

Specifies the character, in hex, to be used to pad sort fields when the fields<br />

specified extend beyond the end of the message being sorted. The default is to<br />

pad with the null character (X'00'). The message itself if not modified.<br />

For example, if the following two messages were sorted with SORT PAD ’C1’X A<br />

17.4:<br />

This is message one<br />

This is message number two<br />

The two sort fields are:<br />

oneA<br />

numb<br />

PIPE SORT<br />

Chapter 2. Pipeline Stages and Syntax 213

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!