Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Loading a certain set of job logs from SAR to a single PS
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: 1475
Location: Chennai

PostPosted: Tue Dec 27, 2011 12:10 pm    Post subject:
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    Post subject:
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: 1475
Location: Chennai

PostPosted: Wed Dec 28, 2011 11:26 am    Post subject:
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    Post subject:
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: 1475
Location: Chennai

PostPosted: Fri Dec 30, 2011 11:20 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts loading a Modified Mapset Susanta CICS 2 Tue Mar 14, 2017 5:43 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us