The following examples provide scenariors for using the OPSJESX Function.
This example will print the job name and job ID of all duplicated jobs.
rtvl = OPSJESX("S","HELDJOB(DUPL)")
if OPSRC = 0 then
do i = 1 to OPSJESX.0
say word(OPSJESX_JQTR.i,1) word(OPSJESX_JQTR.i,2)
end
This example will print the job name and job ID of all jobs where the job name either contains word TEST or contains three characters.
rtvl = OPSJESX("S","JOBNAME(*TEST*,'???')")
if OPSRC = 0 then
do i = 1 to OPSJESX.0
say word(OPSJESX_JQTR.i,1) word(OPSJESX_JQTR.i,2)
end
This example will print the job name, job ID, class, and J2TR section if exists. It uses filters for class (from A to K, class Z and from 1 to 3) and owner starting with AB. The output variable name is O. Also J2TR section is created and the output is limited to 25 jobs.
rtvl = OPSJESX("S","CLASS(A-K,Z,1-3) OWNER(AB*)",
"STEM(O) SECTION(J2TR) MAX(25)")
if OPSRC = 0 then
do i = 1 to O.0
parse var O_JQTR.i jobName jobID . class .
say jobName jobID class
if symbol("O_J2TR."||i) = "VAR" then
say O_J2TR.i
say
end
This example will:
rtvl = OPSJESX("S","JOBTYPE(APPC, TSU, STC) PRIORITY(15)",
"JESSUBSYS(JES3) MAX(0) SECTIONS(J3TR)")
if OPSRC = 0 then
do i = 1 to OPSJESX.0
say word(OPSJESX_JQTR.i,1)
if symbol("OPSJESX_J3TR."||i) = "VAR" then
say OPSJESX_J3TR.i
say
end
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |