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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PIPE SEPARATE<br />

SEQUENCE<br />

Specifies that the lines are output to the output streams in sequence. The first<br />

line is output to the primary output stream. The second line is output to the<br />

secondary output stream, and so on, <strong>for</strong> as many output streams as are<br />

defined. All remaining lines are passed as single-line messages to the last<br />

defined output stream.<br />

If only the primary output stream is defined, all lines are output to that<br />

stream. If only a secondary stream is defined, <strong>for</strong> example, when specifying<br />

NOT SEPARATE, all lines, except the first line, are output to the secondary<br />

stream.<br />

Usage Notes<br />

Examples<br />

212 <strong>Programming</strong>: <strong>Pipes</strong><br />

v SEPARATE cannot be the first stage.<br />

v SEPARATE directly affects the way that messages in the pipeline are displayed,<br />

logged, and searched by other stages.<br />

v SEPARATE can be useful preceding stages that search <strong>for</strong> matches to a delimited<br />

string within a record.<br />

v SEPARATE has no effect on single-line messages.<br />

Example: Breaking a Multiline Message into Single-Line<br />

Messages<br />

To issue the D NET,CDRMS command, allow time <strong>for</strong> asynchronous messages to<br />

return from VTAM, and break the multiline messages into single-line messages,<br />

enter:<br />

PIPE NETVIEW D NET,CDRMS<br />

| CORRWAIT 10<br />

| SEPARATE<br />

| CONSOLE<br />

Example: Breaking a Multiline Message, Selecting from and<br />

Displaying the Results<br />

This example issues a TASKUTIL command, separates multiline messages into<br />

single lines, selects messages with occurrences of OPER1 or OPER2, collects them<br />

into a multiline message, and displays them.<br />

PIPE NETVIEW TASKUTIL<br />

| SEPARATE<br />

| LOCATE /OPER1/ /OPER2/<br />

| COLLECT<br />

| CONSOLE<br />

Example: Separating Data Lines from Control and Label Lines<br />

This example shows how to separate data lines from control and label lines into<br />

two pipeline streams.<br />

PIPE (END %)<br />

| ... /* stages creating input stream */<br />

| A: SEPARATE DATA<br />

| ... /* stages processing data lines */<br />

%A:<br />

| ... /* stages processing control/label lines */

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

Saved successfully!

Ooh no, something went wrong!