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.

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

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

/* Uncomment the following section to display more detailed */<br />

/* in<strong>for</strong>mation on each job. */<br />

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

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

/* Display output (detailed) */<br />

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

/*<br />

DOj=1TOjobline.0 /* Go thru matched job info.*/<br />

jobnum = SUBSTR(jobline.j,4,5) /* Get job number. */<br />

/* */<br />

’PIPE NETV MVS $DJ’jobnum’,LONG’, /* Put JES display in pipe. */<br />

’ | CORR 30’, /* Wait <strong>for</strong> JES response. */<br />

’ | TAKE 1’, /* Terminate wait when */<br />

, /* response received. */<br />

’ | SEP’, /* Split up lines of MLWTO */<br />

’ | DROP 1’, /* Discard first line only */<br />

’ | TAKE 1’, /* Keep next line */<br />

’ | SAFE cmdsafe APPEND’<br />

END<br />

/* Store <strong>for</strong> later display. */<br />

’PIPE SAFE cmdsafe’, /* Display detailed output. */<br />

’ | CONS ONLY’<br />

*/<br />

/* Do not automate or log. */<br />

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

/* 2nd Parm is CANCEL */<br />

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

IF SUBSTR(arg2,1,1) = ’C’ then<br />

DO<br />

DOj=1TOjobline.0 /* Go thru all matched jobs.*/<br />

jobnum = SUBSTR(jobline.j,4,5) /* Get job number. */<br />

’PIPE NETV MVS $CJ’jobnum’,P’, /* Cancel job, purge output */<br />

’ | CORR 30’, /* Wait <strong>for</strong> JES response. */<br />

’ | TAKE 1’, /* Terminate wait when */<br />

, /* response received. */<br />

’ | SAFE cmdsafe APPEND’ /* Store <strong>for</strong> later display. */<br />

END<br />

’PIPE SAFE cmdsafe’, /* Display output from JES */<br />

’ | CONS ONLY’ /* cancel or display cmds. */<br />

/* Do not automate or log. */<br />

END<br />

GETOUT: /* Exit. */<br />

EXIT<br />

Output from the JES2JOB display command list follows:<br />

NCCF NETVIEW CNM01 OPER1 05/02/10 17:20:30 A<br />

* CNM01 JES2JOB REOR* D<br />

| CNM01<br />

JOB00049 REORGE EXECUTING A PRIO 10 8609<br />

JOB00055 REORGAA EXECUTING A PRIO 10 8609<br />

JOB00056 REORGB EXECUTING A PRIO 10 8609<br />

JOB00057 REORGC EXECUTING A PRIO 10 8609<br />

JOB00050 REORGE AWAITING EXECUTION A PRIO 10 DUPLICATE ANY<br />

JOB00051 REORGE AWAITING EXECUTION A PRIO 10 DUPLICATE ANY<br />

JOB00054 REORGA AWAITING HARDCOPY PRIO 1 CANCEL ANY<br />

Figure 31. JES2JOB Display Command Output Example<br />

Output from the JES2JOB cancel command list follows:

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

Saved successfully!

Ooh no, something went wrong!