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 EDIT<br />

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

NEXTWORD (output order)<br />

Specifies that the input to NEXTWORD is to be inserted into the output line. If<br />

the output line already contains text, one blank is inserted into the output line<br />

prior to the data.<br />

position (output order)<br />

Specifies that the data be placed in the output line beginning at the character<br />

indicated by position. Ifposition is larger than the current length of the output<br />

line, the existing output line is padded with the character defined by the PAD<br />

global order and the data added after the padding characters. If the output line<br />

created is already longer than position, the existing text beginning at position is<br />

overlaid.<br />

For example consider the following message on the input stream to EDIT:<br />

CAN BE FUN WITH EDIT!<br />

With the following edit script:<br />

/PIPES/ 1<br />

1.* 7<br />

PIPES is written to the output stream beginning at position 1. Then, the entire<br />

input stream is read using 1.* and written to the output stream beginning in<br />

position 7. The resulting output data is:<br />

PIPES CAN BE FUN WITH EDIT!<br />

Consider CAN BE FUN WITH EDIT! as the input stream to the following edit<br />

script:<br />

PAD /*/<br />

1.* 5<br />

In this case the entire input stream is written to the output stream beginning at<br />

position 5. The first four positions are padded with asterisks (*) which was<br />

defined as the pad character. The resulting output data is:<br />

****CAN BE FUN WITH EDIT!<br />

Now consider the following edit script which receives CAN BE FUN WITH EDIT!<br />

on the input stream:<br />

/MANIPULATING MESSAGES IS HARD/ 1<br />

1.* 23<br />

First MANIPULATING MESSAGES IS HARD is written to the output. Then, all the<br />

data received on the input stream is read by the input order 1.* and written to<br />

the output at position 23. Because MANIPULATING MESSAGES IS HARD is longer<br />

than 23 characters, the data read and the resulting output by 1.* 23 overlays<br />

the existing output data resulting in the following text on the output stream:<br />

MANIPULATING MESSAGES CAN BE FUN WITH EDIT!<br />

SETGMT (output order)<br />

SETGMT sets the IFRAUGMT value of the output message. The order is<br />

carried out only if the input available is exactly eight bytes.<br />

UCHARS (output order)<br />

Sets a 16-byte "user char" area. In PIPE EDIT, UCHARS is equivalent to the<br />

previously-existing IFRAUSRC, except that UCHARS accepts a value shorter<br />

than 16 characters (no padding occurs) or truncates a value longer than 16<br />

characters.<br />

UFLAGS (output order)<br />

Sets a 2-byte "user flags" area. In the MRT, this field accepts a string of up to<br />

16 characters consisting of 0s, 1s, and Xs. These correspond to the requirement<br />

to clear, set, or leave as-is the corresponding bit in the byte being referenced. In

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

Saved successfully!

Ooh no, something went wrong!