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.

BNH031I NETVIEW GLOBAL VARIABLE INFORMATION<br />

BNH103I COMMAND ISSUED AT: 01/21/10 11:52:31<br />

BNH061I<br />

BNH033I TASK GLOBAL VARIABLES FOR MARK<br />

BNH036I GLOBAL VARIABLE NAME: GLOBAL VARIABLE VALUE:<br />

BNH061I --------------------- ----------------------<br />

BNH039I TCPLSOCK *..2206<br />

BNH039I TCPADDR 9.67.50.1<br />

BNH039I TCPUSER NV65<br />

BNH039I TCPSTACK TCP32<br />

BNH035I NUMBER OF VARIABLES FOUND: 4<br />

BNH061I<br />

BNH037I NETVIEW GLOBAL VARIABLE INFORMATION COMPLETE<br />

Example: Update Current Group Members<br />

The following process updates the current group (currGrp) members if the current<br />

group has not been updated by another task.<br />

/* VARLOAD example: Update members <strong>for</strong> "current group" */<br />

/* */<br />

/* Problem: Value of "currGrp" can be changed at any time */<br />

/* by some other task. */<br />

/* */<br />

’GLOBALV GETC currGrp’<br />

say ’Current group name is’ currGrp<br />

’PIPE (NAME BLDGRP)’, /* Find the members of this group */<br />

’| NETV LIST ASSIGN=GROUP,GROUP=’currGrp, /*LIST members..*/<br />

’| LOCATE 1.6 /DSI640/ 1.6 /DSI641/’,/* isolate data lines*/<br />

’| EDIT 22.* 1’, /* remove "headers" */<br />

’| JOINCONT //’, /* make into one line*/<br />

’| VAR MEMBERS’ /* ...and save */<br />

UpDate.1 = ’/GRPops/’ ││ members /*<strong>for</strong>mat of VARLOAD*/<br />

UpDate.2 = ’/currGrp=currGrp/’││ currGrp<br />

UpDate.0 = 2<br />

/* Update.2 contains multiple references to currGrp. */<br />

/* CurrGrp is being used in three ways: the first references*/<br />

/* the common global dictionary (see options on VARLOAD */<br />

/* below) the second references the local dictionsary and */<br />

/* the third is resolved immediately by REXX. */<br />

/* */<br />

/* */<br />

/* Since this is a COMMON GLOBAL, we check to be sure that */<br />

/* other task did not change CURRGRP while we were working. */<br />

/* */<br />

/* COLLECT is important in the following PIPE. */<br />

/* */<br />

/* Updates of variables from a multi-line message are made */<br />

/* together. All comparisons <strong>for</strong> the lines of the message */<br />

/* are done be<strong>for</strong>e nay updates. If any comparison fails, */<br />

/* no updates are done from that MLWTO. There<strong>for</strong>e we collect*/<br />

/* related updates into one multi-line message. */<br />

/* */<br />

’PIPE (NAME SETGRP END %)’,<br />

’| STEM UpDate.’,<br />

’| COLLECT’, /* COLLECT IMPORTANT! */<br />

’| A: VARLOAD COMMON’,<br />

’| EDIT "Update successful:" 1 WRITELINE COPY *’,<br />

’| CONSOLE’,<br />

’% A:’,<br />

’| EDIT "Entire update failed:" 1 WRITELINE COPY *’,<br />

PIPE VARLOAD<br />

Chapter 2. Pipeline Stages and Syntax 257

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

Saved successfully!

Ooh no, something went wrong!