IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Loading a certain set of job logs from SAR to a single PS


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sivakumar M

New User


Joined: 03 Jul 2011
Posts: 8
Location: india

PostPosted: Tue Dec 27, 2011 3:30 am
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Dec 27, 2011 12:10 pm
Reply with quote

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
View user's profile Send private message
sivakumar M

New User


Joined: 03 Jul 2011
Posts: 8
Location: india

PostPosted: Tue Dec 27, 2011 10:11 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Dec 28, 2011 11:26 am
Reply with quote

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
View user's profile Send private message
sivakumar M

New User


Joined: 03 Jul 2011
Posts: 8
Location: india

PostPosted: Thu Dec 29, 2011 4:16 am
Reply with quote

I tried the code and it worked very fine.

Thanks for your help Vasanth.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri Dec 30, 2011 11:20 am
Reply with quote

work ana saridhan. nalladhu. :-)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5
No new posts Capturing logs from spool dd JCL & VSAM 6
Search our Forums:

Back to Top