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

Download job details from SAR using job ID


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
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
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: 1742
Location: Tirupur, India

PostPosted: Tue Jun 07, 2011 5:43 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Jun 08, 2011 4:25 pm
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: 1742
Location: Tirupur, India

PostPosted: Wed Jun 08, 2011 4:38 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Jun 08, 2011 4:48 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Jun 08, 2011 6:02 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Jun 08, 2011 6:18 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts JCL SORT to compress the student's de... DFSORT/ICETOOL 7
No new posts Splitting group records based on deta... DFSORT/ICETOOL 8
No new posts report on job scheduling details in Zeke IBM Tools 2
No new posts Mainframe batch Job or REXX to get VT... CLIST & REXX 7
No new posts Unable to download the JDBC driver to... Java & MQSeries 1
Search our Forums:

Back to Top