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

How to create a list of SAR jobs with Gen and Seq


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

New User


Joined: 08 Feb 2022
Posts: 39
Location: USA

PostPosted: Thu Nov 09, 2023 10:47 pm
Reply with quote

How do you get the most recent job out of Sar without knowing the Gen and Seq number?

I know I can do /LIST ID=Jobname Gen=* but I only want the first one.

Also, can I list multiple jobs in one SYSIN or do I have to have one step per LIST?

//SYSIN DD *
/LIST ID=Jobname1 GEN=*
/LIST ID=Jobname2 GEN=*
//
Back to top
View user's profile Send private message
M Lee Klein

New User


Joined: 08 Feb 2022
Posts: 39
Location: USA

PostPosted: Thu Nov 09, 2023 11:12 pm
Reply with quote

I found one answer - this will list only the most recent:

/LIST ID=JOBNAME and leave off other commands.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Thu Nov 09, 2023 11:30 pm
Reply with quote

Can you please post the complete JCL with code tags ?

This will help others in need for future thanks
Back to top
View user's profile Send private message
vasanthz

Global Moderator


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

PostPosted: Thu Nov 16, 2023 2:32 am
Reply with quote

Quote:
can I list multiple jobs in one SYSIN or do I have to have one step per LIST?

Yes you can list multiple jobs in one SYSIN, you need to have DISP=MOD for the output dataset in order to capture the output of all LIST statements.
Else the last LIST statement output will replace the previous LIST statement outputs.
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 Finding and researching jobs All Other Mainframe Topics 0
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Build dataset list with properties us... PL/I & Assembler 4
No new posts create rexx edit Macro that edits the... CLIST & REXX 3
Search our Forums:

Back to Top