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.

KEEPLAST<br />

Specifies that the last message in a sequence of duplicated messages is written<br />

to the output stream.<br />

PAD<br />

Specifies the padding character to be used when comparing fields extending<br />

beyond the end of the data in the examined message.<br />

PAD must be followed by a single delimited character or a single hex<br />

character.<br />

The default PAD value is hex zero ('00'X).<br />

position.length<br />

The starting position and number of characters to be compared.<br />

Position indicates the starting character within the line. Position can be any<br />

positive number.<br />

Length is an unsigned positive number indicating the number of characters<br />

from position to be compared. An asterisk (*) can be specified <strong>for</strong> length<br />

indicating that all characters after position are to be used. Position without<br />

length and the period (.) separator cause length to default to 1.<br />

If length is larger than the available characters, all available characters are used<br />

and the compared field is padded with the value specified by PAD.<br />

The default is to compare the entire message line (1.*).<br />

Up to eight position.length pairs can be specified.<br />

Usage Notes<br />

DELDUPES delays the stream. Each message <strong>for</strong> the primary output stream is held<br />

by DELDUPES until a nonmatching message is found. When ALL or KEEPLAST is<br />

specified, each message <strong>for</strong> the secondary stream is delayed until another matching<br />

message is received. When KEEPFIRST is specified, messages <strong>for</strong> the secondary<br />

stream are not delayed.<br />

Examples<br />

Example: Display Last Logtime<br />

This displays a report of last time each person was logged:<br />

PIPE < LOGTIMES<br />

| SORT 1.18<br />

| DELDUPES KEEPLAST 1.18<br />

| CONSOLE<br />

If LOGTIMES contains:<br />

DOE, JOHN 11/02/18 13:25:04<br />

SMITH, FRED 11/02/18 13:29:21<br />

COLLINS, MARY 11/02/23 17:01:55<br />

DOE, JOHN 11/02/23 09:00:00<br />

HOWE, TOM 11/02/23 04:14:20<br />

JONES, FRED 11/02/23 11:16:44<br />

COLLINS, MARY 11/03/01 10:15:40<br />

Then, the output to the console shows the latest entry <strong>for</strong> each person:<br />

PIPE DELDUPES<br />

Chapter 2. Pipeline Stages and Syntax 69

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

Saved successfully!

Ooh no, something went wrong!