View previous topic :: View next topic
|
Author |
Message |
sivakumar M
New User
Joined: 03 Jul 2011 Posts: 8 Location: india
|
|
|
|
Hi All,
Can anyone please help me to load a certain set of job logs from SAR to a single PS using SARBATCH utility. My requirement is mentioned below.
My job set starts with common higher level name.
JOB NAME
AAAA1234
AAAA1568
AAAA8987
AAAA0152
If I want to load all these job logs for a particular day's run into a single file, how could I achieve it? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
You could do this in 2 steps,
Quote: |
My job set starts with common higher level name. |
1. Get the list of jobs which match the criteria of AAAA* using SARBCH /LIST
Code: |
//JS020 EXEC PGM=SARBCH,PARM='WELLS.SARACU'
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//REPORT DD DSN=WELLS.SARTOUT.FB151,DISP=(NEW,CATLG,DELETE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=121,BLKSIZE=0),
// UNIT=SYSALLDA,SPACE=(TRK,(15,3),RLSE)
//SYSIN DD DATA,DLM='ZZ'
/LIST ID=AAAA* EXCP=A GEN=-0
ZZ |
Quote: |
load all these job logs for a particular day's run |
2. From the above output find the GEN and SEQ numbers of jobs required for the particular date using some program & build necessary /LOAD statements & use the /LOAD with SARBCH program.
Hope it helps. |
|
Back to top |
|
|
sivakumar M
New User
Joined: 03 Jul 2011 Posts: 8 Location: india
|
|
|
|
Hi Vasanth,
Thanks for your quick response. I got the point 1 mentioned by you in the above post.
Using LIST ID = AAAA* I got the list of jobs for which the job logs to be loaded.
Now in next step using PRINT ID = AAAA1234, GEN = 0 I could load that particular joblog to an output file. But if I want to load all the joblogs of the listed jobs, how could I iterate the same step in JCL.
Please suggest and also correct me if I am wrong |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
You have to write a program (preferably REXX) which will read the output from step 1 and generate multiple /PRINT statements like below,
Code: |
/PRINT DDNAME=JOBOUT1 ID=AAAA1234 GEN=0
/PRINT DDNAME=JOBOUT1 ID=AAAA1568 GEN=0
/PRINT DDNAME=JOBOUT1 ID=AAAA8987 GEN=0
/PRINT DDNAME=JOBOUT1 ID=AAAA0152 GEN=0 |
Pass the above generated statements to SYSIN of the next step.
DISP=MOD if you want all the output in same out dataset.
Code: |
//JS030 EXEC PGM=SARBCH,PARM='WELLS.DBASE'
//SYSPRINT DD SYSOUT=*
//REPORT DD SYSOUT=*
//JOBOUT1 DD DSN=WELLS.OUTPUT,DISP=MOD
//SYSIN DD *
/PRINT DDNAME=JOBOUT1 ID=AAAA1234 GEN=0
/PRINT DDNAME=JOBOUT1 ID=AAAA1568 GEN=0
/PRINT DDNAME=JOBOUT1 ID=AAAA8987 GEN=0
/PRINT DDNAME=JOBOUT1 ID=AAAA0152 GEN=0
/* |
Hope it helps. |
|
Back to top |
|
|
sivakumar M
New User
Joined: 03 Jul 2011 Posts: 8 Location: india
|
|
|
|
I tried the code and it worked very fine.
Thanks for your help Vasanth. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
work ana saridhan. nalladhu. :-) |
|
Back to top |
|
|
|