MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SAR

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Fri Sep 05, 2008 3:23 am    Post subject: SAR Reply with quote

Hi,

Is it possible to populate multiple job details from SAR to a dataset?
If so how would I do it?

Regards,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Sun Sep 07, 2008 8:10 am    Post subject: Reply with quote

You would have to hard code the job names, but here is an example of a job that I have :

Code:
//STEP10   EXEC PGM=SARBCH,PARM='K9490P0.SAR41'
//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=1210       
//FILEOUT  DD DSN=H2501S.T.TC.SARS,DISP=MOD   
//SYSIN    DD *                               
/PRINT ID=H2501ACP DDNAME=FILEOUT             
/PRINT ID=H2501AEP DDNAME=FILEOUT             
/PRINT ID=H2501AHP DDNAME=FILEOUT             
/PRINT ID=H2501AJP DDNAME=FILEOUT             
/PRINT ID=H2501ALP DDNAME=FILEOUT             
/PRINT ID=H2501APP DDNAME=FILEOUT             
/PRINT ID=H2501ARP DDNAME=FILEOUT             
/PRINT ID=H2501A0P DDNAME=FILEOUT             
/*
//
Back to top
View user's profile Send private message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Mon Sep 08, 2008 3:02 am    Post subject: Reply with quote

Hi Tcurrier,

When I modified like above format I am able to capture only the last job and not the whole list.

Regards,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Mon Sep 08, 2008 6:19 am    Post subject: Reply with quote

If you are not pre-allocating your output file (FILEOUT), you need to do
so. Try putting this step before the SAR print step :

Code:
//*************************************************
//*        ALLOCATE FILE                           
//*************************************************
//STEP05   EXEC PGM=IEFBR14                       
//SYSPRINT DD SYSOUT=*                             
//SYSOUT   DD SYSOUT=*                             
//DD1      DD DSN=H2501S.T.TC.SARS,               
//         DISP=(,CATLG,DELETE),                   
//         MGMTCLAS=WORKM,                         
//         SPACE=(CYL,(10,5),RLSE),               
//         DCB=(RECFM=FB,LRECL=133,BLKSIZE=1330)   


I tried it and I got the same result that you did (only the last sysout), if
I didn't pre-allocate the output file.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Sep 08, 2008 10:17 am    Post subject: Reply with quote

kingo wrote:
Hi Tcurrier,

When I modified like above format I am able to capture only the last job and not the whole list.


Pay attention to the DISP parameter of the output dataset. You probably had disp=new. Since you are appending the job history you need DISP=MOD

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Mon Sep 08, 2008 12:10 pm    Post subject: Reply with quote

Yes Kolusu I did that and I was about to share the results.
Changing
DISP=MOD
got me the desired results

Thanks tcurrier and Kolusu

Regards,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group