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

to copy the joblogs of recently submitted jobs in a PDS


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bala kalluri
Warnings : 1

New User


Joined: 08 Jan 2009
Posts: 21
Location: INDIA

PostPosted: Mon Feb 02, 2009 5:23 pm
Reply with quote

ADDRESS TSO
DO I=0 TO 4
"ALLOC F(ISFIN) TRACKS SPACE(1) REU"
"ALLOC F(ISFOUT) NEW DELETE REU ",
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B) DSORG(PS)"
"ALLOC F(TEMPPRT) DA('v12396.NEW.PS1') MOD REUSE"
QUEUE "PRE v123296A"
QUEUE "ST"
QUEUE "DOWN" I
QUEUE "FIND 'JESJCL'"
QUEUE "++S"
QUEUE "PRINT FILE TEMPPRT"
QUEUE "PRINT"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "EXIT"
"EXECIO" QUEUED()" DISKW ISFIN (FINIS"
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++32,255)"
END
EXIT



This program is working and i m able to copy the job logs into a separate dataset. But here i need to specify before hand the 'I' value i.e from which job to which job i need to copy the jcl logs.

My requirement is to submit a pds containing jcls. So dynamically i need to fetch the joblogs of these recently submitted jcls through rexx. So could anyone provide be a better solution so that i dont need to specify 'I' value everytime, when i submit jobs.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Feb 02, 2009 10:19 pm
Reply with quote

I think you need to different calls to SDSF:

1. Issue H to list all held jobs. Then print that a file. It will have all jobs and job numbers.

2. Write second routine that will read the file from previous step and then call SDSF for each job. Use something like:
Code:
FILTER JOBID = j00001

so that you only see the one job. That way, your code is always the same.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
Search our Forums:

Back to Top