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

Examples<br />

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

Example: Setting Variables<br />

To set the first five data elements in the 'DATA.' stem to the values A, B, C, D, and<br />

E, run the following REXX COMMAND LIST:<br />

/* REXX COMMAND LIST */<br />

’PIPE < MYDATA’<br />

’| VARLOAD’<br />

Where MYDATA contains:<br />

/DATA.1/A<br />

/DATA.2/B<br />

/DATA.3/C<br />

/DATA.4/D<br />

/DATA.5/E<br />

Example: Comparing and Setting Variables<br />

To set the first five data elements in the 'DATA.' stem to the values A, B, C, D, and<br />

E only when they currently contain the value contained in the variable STATUS,<br />

run the following REXX COMMAND LIST:<br />

/* REXX COMMAND LIST */<br />

’PIPE < MYDATA’<br />

’| VARLOAD’<br />

Where MYDATA contains:<br />

/DATA.1=STATUS/A<br />

/DATA.2=STATUS/B<br />

/DATA.3=STATUS/C<br />

/DATA.4=STATUS/D<br />

/DATA.5=STATUS/E<br />

Example: Copying Task Globals<br />

In the following example, task global values are copied from the target task to the<br />

local dictionary. The copied values are then output to the console.<br />

/* VARLOAD Example: Copy task globals from target task */<br />

arg opid<br />

IF opid = ’’ THEN opid = ’TOM’<br />

’PIPE (NAME COPYTGLB)’,<br />

’| CORRCMD /’opid’: QRYGLOBL TASK VARS=TCP*’, /* "opid"*/<br />

’| SEPARATE’,<br />

’| LOCATE 1.7 /BNH039I/’, /* just the DATA please */<br />

’| EDIT "/" NEXT’, /* change <strong>for</strong>mat to suit*/<br />

’WORD 2 NEXT’,<br />

’"/" NEXT’,<br />

’45.* NEXT’,<br />

’| CONSOLE’, /*show the records to the nice folks*/<br />

’| VARLOAD TASK’ /* put them in my dictionary*/<br />

’QRYGLOBL TASK VARS=TCP* /* confirm update*/<br />

exit<br />

The console output might look like this:<br />

* NTV7E COPYTCP TOM<br />

’ NTV7E /TCPLSOCK/*..2206<br />

’ NTV7E /TCPADDR/9.67.50.1<br />

’ NTV7E /TCPUSER/NV65<br />

’ NTV7E<br />

’ NTV7E<br />

/TCPSTACK/TCP32

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

Saved successfully!

Ooh no, something went wrong!