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.

Usage Notes<br />

PIPE EDIT, UFLAGS is equivalent to the previously-existing IFRAUSRB, except<br />

that UFLAGS accepts a value shorter than 2 characters (no padding occurs) or<br />

truncates a value longer than 2 characters.<br />

WTOKEY<br />

For the Message Revision Table (MRT), WTOKEY sets the key field associated<br />

with the WTO system macro, which is the WQEKEY in system macro<br />

IHAWQE.<br />

v Code one edit phrase or one global order on each source line because edit<br />

scripts consisting of many edit phrases can be difficult to read. Together with<br />

appropriate commentary, your edit script is easy to understand. See sample<br />

CNME2011 (SESMGET) <strong>for</strong> an example of this type of coding.<br />

v When converting date and time values using CNVDT or CNVDT0, if the input<br />

data is longer than the specified input <strong>for</strong>mat, only a substring of the input data<br />

is compared and converted. The remainder remains as-is in the output.<br />

For example, the following statements convert the first 8 characters, the date<br />

portion, of the Greenwich Mean Time, to the date <strong>for</strong>mat specified by the<br />

DEFAULT command:<br />

PIPE ...|EDIT IFRAUGMT ZDT<br />

CNVDT (’MM/DD/YY’ DATE) NEXT|...<br />

The last 9 characters remain in their original input <strong>for</strong>mat in the output.<br />

In date conversion, the first, or leading, characters of the input are converted. In<br />

time conversion, the last, or trailing characters of the input are converted. For<br />

example, the following statements convert the time portion of the GMT:<br />

PIPE ...|EDIT IFRAUGMT ZDT CNVDT<br />

(’HH:MM:SS’ TIME) NEXT|...<br />

Examples<br />

Additional examples can be found in CNMS1101.<br />

Example: Selecting a Word<br />

The following edit script selects the fifth word in the input line and places it as the<br />

next entry in the output line:<br />

WORD 5<br />

NEXT<br />

If the input line processed by this script is DSI001I MESSAGE SENT TO NETOP2,<br />

NETOP2 is placed in the output line. If the output line currently contains text,<br />

NETOP2 is added without an intervening blank.<br />

Example: Creating a Command<br />

In this example, the edit phrase changes the results from a LIST STATUS=TASKS<br />

command into commands to start all the reported resources. The LIST<br />

STATUS=TASKS command returns lines of the following <strong>for</strong>mat:<br />

TYPE: <strong>OS</strong>T TASKID: RESOURCE: A01A441 STATUS: NOT ACTIVE<br />

Each LIST STATUS=TASKS line is processed by the following edit script:<br />

/START TASK=/ 1<br />

WORD 5<br />

NEXT<br />

PIPE EDIT<br />

Chapter 2. Pipeline Stages and Syntax 119

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

Saved successfully!

Ooh no, something went wrong!