Skip to Content
Custom Search

Pull SDSF Data in Batch

Main frame Job to Pull SDSF data in Batch
 

The following Job will help you pull the desired data from spool (SDSF). This may serve as an important tool in gathering the stats of a job just finished.

 

//SDSFOUT    JOB (ACC INFO,,,,,XXXX),'      
//            MSGCLASS=Y,NOTIFY=&SYSUID     
//STEP01   EXEC PGM=IEFBR14                    
//DD01     DD  DSN=USERID.DATASET.ONE,         
//            DISP=(MOD,DELETE),UNIT=SYSDA     
//DD02     DD  DSN=USERID.DATASET.TWO,      
//            DISP=(MOD,DELETE),UNIT=SYSDA     
//STEP02 EXEC PGM=SDSF,PARM='++30,256'               
//ISFOUT   DD DSN=USERID.DATASET.ONE,             
//            DISP=(,CATLG,DELETE),UNIT=SYSDA        
//SYSUDUMP DD SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               
//SYSTSPRT DD SYSOUT=*                               
//SYSOUT   DD SYSOUT=*                               
//DATAOUT DD DSN=USERID.DATASET.ONE,                 
//            DISP=(,CATLG,DELETE),UNIT=SYSDA        
//ISFIN    DD *                                      
ST                                                   
PRE JOBNAME1                                         
FILTER JOBNAME EQ
JOBNAME1                                        
FIND 'JOBNAME1'                                      
++?                                                  
FIND 'JESMSGLG'                                      
++S                                                  
PRINT FILE DATAOUT                                   
PRINT 1 999                                          
PRINT CLOSE                                          
END                                                  
/*                                                   
//STEP03   EXEC PGM=SORT                             
//SYSOUT   DD SYSOUT=*                               
//SORTIN   DD DSN=USERID.DATASET.ONE,DISP=SHR        
//SORTOUT  DD DSN=USERID.DATASET.TWO,                
//            DISP=(,CATLG,DELETE),UNIT=SYSDA,       
//            DCB=(LRECL=80,RECFM=FB)                
//SYSIN    DD  *                                     
  SORT FIELDS=COPY                                   
  OUTREC FIELDS(1:6,80),CONVERT                      
/*                                                   
//*                                                  

 

; ; ; ;

Where Jobname1 is the Job for which data needs to be pulled from SDSF. In the above example we are retrieving the JESMSGLG, but you may try JESJCL etc. Basically the commands given under ISFIN are the SDSF commands only.

Comments

could you please let me know

could you please let me know sample job to get the active environment data into dataset in control-M

ctl-M

Not a good idea to "piggy-back" this ctl-m question on an sdsf topic.

They are completely different. . .

Pull SDSF Data in Batch

Can u pls share the executable version of this code, bcoz when i exe this code am getting JCL error" STMT NO. MESSAGE                                
       14 IEFC605I UNIDENTIFIED OPERATION FIELD "      
 

sdsf in batch

The posted JCL is not complete. You need to correct/complete this JCL to use it.

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 1 user and 34 guests online.

Online users

  • sumanmahatma
Dr. Radut | page