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
 

 

Download job details from SAR using job ID

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
arijit_ghosh86

New User


Joined: 18 Sep 2010
Posts: 7
Location: Kolkata

PostPosted: Tue Jun 07, 2011 5:19 pm    Post subject: Download job details from SAR using job ID
Reply with quote

Hi All,

I have aproblem..
the senerio is like that supoose a job XYZ runs everyday i.e. 5 days a wk
on the saturday i need to create a report.

I know how SARBCH works, I want to download all 5 days sar details of the job XYZ in a single dataset or , is it possible to download report from SAR using SARBCH if i provide jobid ??
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue Jun 07, 2011 5:43 pm    Post subject:
Reply with quote

Hello,

You could try GEN=-N parameter for SARBCH.

Code:
//JS020    EXEC PGM=SARBCH,PARM='SAR.DATABASE' 
//SYSPRINT DD  SYSOUT=*                         
//REPORT   DD  SYSOUT=*                         
//SYSUDUMP DD  SYSOUT=*                         
//SARSTUFF DD  DSN=WELLS.SAROUT,DISP=MOD
//SYSIN    DD  *                               
/DBASE NAME=SAR.DATABASE                       
/LOAD ID=JOBNAME DDNAME=SARSTUFF GEN=-0       
/LOAD ID=JOBNAME DDNAME=SARSTUFF GEN=-1
/LOAD ID=JOBNAME DDNAME=SARSTUFF GEN=-2
/LOAD ID=JOBNAME DDNAME=SARSTUFF GEN=-3
/LOAD ID=JOBNAME DDNAME=SARSTUFF GEN=-4
/*


This would fetch last 5 runs of the job. Its safe to retrieve atleast 10 generation of the job and then filtering out the required 5 set of jobs as the job might have abended on one day and you would have data for only 4 days effectively.
Note: DISP=MOD

Hope it helps.
Back to top
View user's profile Send private message
arijit_ghosh86

New User


Joined: 18 Sep 2010
Posts: 7
Location: Kolkata

PostPosted: Wed Jun 08, 2011 3:15 pm    Post subject:
Reply with quote

thnx for the response but its not working...
"Requested sysout not found in master index"

/PRINT ID=XYZ DDNAME=***** GEN=-1

[XYZ is the job name and ****=DD NAME]

I also used it with LOAD ID...its not working too.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Jun 08, 2011 4:25 pm    Post subject:
Reply with quote

Hello,
Have you verified that your job XYZ exists in SAR & has atleast two generations of it?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Jun 08, 2011 4:38 pm    Post subject:
Reply with quote

When a job that is not present in SAR is requested via the LOAD statement, the error message from SARBCH is
Code:
SARBCL10  Requested sysout not found in master index
Back to top
View user's profile Send private message
arijit_ghosh86

New User


Joined: 18 Sep 2010
Posts: 7
Location: Kolkata

PostPosted: Wed Jun 08, 2011 4:41 pm    Post subject:
Reply with quote

@Vasanth..yes Sir !

I have checked it.

But its not possible i guess...icon_sad.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Jun 08, 2011 4:48 pm    Post subject:
Reply with quote

Quote:
I know how SARBCH works,

Have you tried running SARBCH earlier and got it to work?

The values in
Code:
//JS020    EXEC PGM=SARBCH,PARM='SAR.DATABASE' 

Code:
/DBASE NAME=SAR.DATABASE 


are site specific. have you mentioned the correct database names in these two cards?
Back to top
View user's profile Send private message
arijit_ghosh86

New User


Joined: 18 Sep 2010
Posts: 7
Location: Kolkata

PostPosted: Wed Jun 08, 2011 4:51 pm    Post subject:
Reply with quote

thanks for replying Vasanth...the ans is YES.

I told you that i can access it /PRINT ID=<JOBNAME> DDNAME=<DDNAME>
but supoose i have 5 entries are their with SYSout ID XYZ.
i wan to download the total SAR output of all 5 entries in single file at a time.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Jun 08, 2011 6:02 pm    Post subject:
Reply with quote

"My guess" is that if the job is currently running in SPOOL then GEN=-0 would fail. I would like to be corrected if this statement is incorrect.

If the job is completed then latest generation can be accessed by GEN=-0.
If its in execution status then GEN=-1 will get you latest generation from SAR.

The CA View manual does not say anything about relative numbers for GEN when job is running currently.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 08, 2011 6:15 pm    Post subject:
Reply with quote

Quote:
The CA View manual does not say anything about relative numbers for GEN when job is running currently.


don't know about SAR, but within the job +1 is the gen number for current generation - until job is ended.

and, i don't know why -0 is used instead of 0?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Jun 08, 2011 6:18 pm    Post subject:
Reply with quote

Hello Dick,
By 'generations' I was referring to SAR generations of job entries on CA-view as opposed to GDG generations. They both have same terminology but two different things.
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 How to download JES2 JOB LOG? White.Bai JCL & VSAM 9 Thu Sep 29, 2016 7:34 am
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts IPSwitch download problem srajendran2 All Other Mainframe Topics 2 Fri May 27, 2016 12:02 am
No new posts Connect Direct details shankarm IBM Tools 2 Sat Feb 20, 2016 7:25 pm
No new posts Download a huge list of elements from... dheeraj.ramchandani CA Products 5 Tue Jan 05, 2016 12:16 am


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