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.

Additional <strong>NetView</strong> Pipeline Examples<br />

PIPEMSG CLIST<br />

&CONTROL ERR<br />

****************************************************************<br />

** CLIST TO READ THE MESSAGE FROM THE SAFE, BREAK THE MLWTO **<br />

** INTO MULTIPLE LINES, SELECT THE FIRST FEW LINES AND **<br />

** DISPLAY RESULTS **<br />

****************************************************************<br />

PIPE SAFE *<br />

| SEPARATE<br />

| TAKE 2<br />

| CONSOLE<br />

&EXIT<br />

Output from the pipeline follows:<br />

Notice the two separate action messages on the screen. When the mount request is<br />

satisfied, MVS sends a DOM that matches the original message. This matches both<br />

of these messages and both are de-emphasized by the DOM. You can add a<br />

COLLECT stage to your pipeline to make a 2-line MLWTO, which also matches the<br />

DOM.<br />

Transferring a Large Variable to Another Task<br />

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

NCCF NETVIEW CNM19 OPER6 04/14/10 16:50<br />

* CNM19 MVS S BLDTAPE<br />

" CNM19 IEF290E BLDTAPE BLDTAPE SYSUT2 NEEDS 1 UNIT(S) FOR<br />

" CNM19 VOLUME PRIVAT- 1<br />

Figure 26. Modified Job BLDTAPE Example<br />

An operator can transfer a REXX variable that is longer than 256 bytes to another<br />

task by using PIPE commands at both the sender and receiver tasks.<br />

The sender, OPER3, runs the EXECSEND REXX command list that contains a PIPE<br />

command. First, the PIPE command loads the content of LONGVAR into the<br />

pipeline using the VAR stage. The pipe tells the OPER6 task to invoke a command<br />

list named EXECRECV with the EXCMD command. EXCMD is a command that is<br />

sensitive to the current pipeline message and sends it to OPER6.<br />

The command list that is submitted by OPER3 is shown in the next example:<br />

/* REXX COMMAND LIST EXECSEND */<br />

ADDRESS NETVASIS<br />

/*******************************************************************/<br />

/* CREATE A VARIABLE NAMED LONGVAR WHICH IS LONGER */<br />

/* THAN 256 CHARACTERS */<br />

/*******************************************************************/<br />

LONGVAR = ’LOOK AT THIS LONG MESSAGE THAT I CREATED. IT IS WELL’||,<br />

’ OVER 256 CHARACTERS. AAAAAAAAAAAAAAA BBBBBBBBBBBBBBB ’||,<br />

’CCCCCCCCCCCCCCC DDDDDDDDDDDDDDD EEEEEEEEEEEEEEE FFFFFF’||,<br />

’FFFFFFFFF GGGGGGGGGGGGGGG HHHHHHHHHHHHHHH IIIIIIIIIIII’||,<br />

’III JJJJJJJJJJJJJJJ KKKKKKKKKKKKKKK LLLLLLLLLLLLLLL MM’||,<br />

’MMMMMMMMMMMMM NNNNNNNNNNNNNNN OOOOOOOOOOOOOOO PPPPPPPP’||,<br />

’PPPPPPP QQQQQQQQQQQQQQQ’<br />

/*******************************************************************/<br />

/* READ THE VARIABLE INTO THE PIPELINE. */<br />

/* EXCMD TO OPER6 BOTH THE NAME OF THE CLIST */<br />

/* EXECRECV AND THE PIPELINE CONTENTS */<br />

/*******************************************************************/<br />

’PIPE VAR LONGVAR’,<br />

’| NETVIEW EXCMD OPER6,EXECRECV’

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

Saved successfully!

Ooh no, something went wrong!