Here is what I am doing.
I run a batch job that submits multiple other batch jobs to the internal
reader. There could be 2 to 20 of these run (KPDSR2). No way to know
ahead of time. I used the same jobname to not flood the initiators too
badly. These jobs have many steps so I can't run all the data in one
job stream as I get past the number of job steps per job limit here.
KPDSR2
KPDSR2
..
When these are all done, I want to extract each of these job's JESYSMSG
output for further analysis of their COND CODES, allocation info, etc.
to a file using SDSF Batch.
The below gets me the first job using SDSFBATCH.
//ISFIN DD *
ST
OWNER KPDAVIS
FILTER JOBNAME EQ KPDSR2
FIND KPDSR2
++?
FIND JESYSMSG
++S
PT FILE OUTDD
PT 1 9999
PT CLOSE
My problem is that I don't quite know how to get to the next KPDSR2 job
and get its
JESYSMSG to append to the current OUTDD. I figure I can do "END" "END"
to back out of the panel to the job selection screen, but if I do
another FIND KPDSR2, I will end up with the same job. I could make the
job names unique and that would help some, but I don't know how SDSF
will react if I have only KPDSR1 through KPDSR8, and go after SR9 and
SR10. Just thought of this, perhaps I could PURGE the job I just
finished processing and the next job would be the first job found? It
does seem though that PURGE has a delay in it that might be a problem.
If you have an example of retrieving multiple jobs from SDSF batch and
extracting data out of each of them, I would be VERY interested in
seeing it.
Thanks in advance,
-------------------------
Kriss Davis, CCP
Illinois State University
kpd...@ilstu.edu
309-438-2802
-------------------------
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to list...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
I used to do something similar, to get the printed output to a file
which I then fed into a ISRSUPC search for condition codes. Here's the
SDSF in batch step that grabbed the held output for the TEST* series of
jobs and put them out to my USER.TEMP.A dataset for analysis in later
steps (note that I always had 300+ jobs, and only grabbed the first 140
or so - I'm not sure how you'd go about handling how many jobs you read
if there are less than expected).
//STEP3 EXEC PGM=SDSF,PARM='++24,80'
//ISFOUT DD SYSOUT=(Z,,UNCL)
//ISFIN DD *
H
PREFIX TEST*
TOP
FIND TEST
++S
PRINT ODSN 'USER.TEMP.A' * MOD
PRINT
PRINT CLOSE
END
DOWN 1
F TEST
++S
PRINT ODSN 'USER.TEMP.A' * MOD
PRINT
PRINT CLOSE
END
DOWN 1
F TEST
++S
PRINT ODSN 'USER.TEMP.A' * MOD
PRINT
PRINT CLOSE
END
Hope this helps!
Gary Diehl
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-...@ibm-main.lst
Behalf Of Davis Kriss P
Sent: Tuesday, August 10, 2004 11:31 AM
To: IBM-...@BAMA.UA.EDU
Subject: SDSF in Batch to retrieve multiple JESYSMSG from multiple jobs.
I have used SDSF batch in the past, but now have something I can't find
an example of or figure out.
Here is what I am doing.
I run a batch job that submits multiple other batch jobs to the internal
reader. There could be 2 to 20 of these run (KPDSR2). No way to know
ahead of time. I used the same jobname to not flood the initiators too
badly. These jobs have many steps so I can't run all the data in one
job stream as I get past the number of job steps per job limit here.
----------------------------------------------------------------------
[snip code]
One way is to run two batch sdsf steps. The first goes and displays
the queue of such jobs, issuing a couple of page downs to make sure it
sees all of them (if there might be more than a page's worth). The
screen images are written to ddname which I can't remember!
Then run a rexx exec which parses the screen images to generate a list
of jobnumbers, and hence the ISFIN statement stream for the next batch
step - which does what you outlined for each job - with a filter that
specifies each jobnumber.
--
Jeremy C B Nicoll - my opinions are my own.