csbl
csbl

Reputation: 265

Capture multiple jobs output with pgm=sdsf

I've built a job to retrieve information from spool executions (with the utility PGM=SDSF), but I can only seem to do that for one job at a time, by doing:

//SDSFS1   EXEC PGM=SDSF                                   
//SYSPRINT DD SYSOUT=*                                    
//SYSOUT DD SYSOUT=*                                      
//ISFOUT DD SYSOUT=*                                      
//ISFIN DD *                                              
OWNER                                                     
PREFIX JOBXPTO
ST                                                        
FILTER MAX-RC EQ 'CC 0000'                                
FIND 'JOBXPTO'                                           
++?                                                       
RESET                                                     
FILTER PROCSTEP EQ 'FTPCMD'                               
FIND 'OUTPUT'                                             
++S                                                       
RESET                                                     
PRT ODSN 'WRKPX.SDSFS1' * SHR                      
PRT                                                       
PRT CLOSE                                                 
END  

I can only get one ddname for one job at a time, what if I want to retrieve multiple DDNAMES from one job execution or if I want tghe same DDNAME for multiple jobs in spool (cyclic jobs or just all jobs that have a FTPCMD)?

Thank you!

Upvotes: 0

Views: 1323

Answers (1)

cschneid
cschneid

Reputation: 10775

I think you're stretching past the limits of what can be reasonably done with SDSF commands in batch. You need to loop through a variable number of jobs and neither JCL nor SDSF commands provide for that.

Please take a look at the Rexx interface for SDSF.

Upvotes: 3

Related Questions