Page 1 of 1

SDSF Batch

PostPosted: Sat Apr 14, 2012 6:43 am
by rayngerfan
To Whom It May Concern:

I'm executing SDSF in batch printing the DD from a started task with the below parameters. The issue is that there are 2 OPCS started tasks which get display by the PRE OPCS command. I want to print the EQQMLOG DD from the 2nd OPCS that is displayed. The batch job is printing the EQQMLOG DD from the 1st OPCS that is displayed. I tried adding the JNUM of the 2nd OPCS, but the job still selects the 1st OPCS. Is there a command I can add to my job that would select the 2nd OPCS listed?

//BATCH EXEC PGM=SDSF,DYNAMNBR=32,REGION=1024K
//ISFOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//ISFIN DD *
O
PRE OPCS
ST
FIND OPCS
++?
FIND 'EQQMLOG'
++S
PRT ODSN 'PLREP.OPCDT' * SHR
PRT
PRINT CLOSE

Any help is greatly aprreciated.

Re: SDSF Batch

PostPosted: Sat Apr 14, 2012 1:58 pm
by prino
If you're on z/OS >= 1.9, try the REXX-SDSF interface

Re: SDSF Batch

PostPosted: Wed Apr 18, 2012 2:53 am
by Peter_Mann
rayngerfan wrote:To Whom It May Concern:

I'm executing SDSF in batch printing the DD from a started task with the below parameters. The issue is that there are 2 OPCS started tasks which get display by the PRE OPCS command. I want to print the EQQMLOG DD from the 2nd OPCS that is displayed. The batch job is printing the EQQMLOG DD from the 1st OPCS that is displayed. I tried adding the JNUM of the 2nd OPCS, but the job still selects the 1st OPCS. Is there a command I can add to my job that would select the 2nd OPCS listed?

//BATCH EXEC PGM=SDSF,DYNAMNBR=32,REGION=1024K
//ISFOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//ISFIN DD *
O
PRE OPCS
ST
FIND OPCS
++?
FIND 'EQQMLOG'
++S
PRT ODSN 'PLREP.OPCDT' * SHR
PRT
PRINT CLOSE

Any help is greatly aprreciated.

The Find first and last works as it does in ISPF edit or browse
rather than PGM=SDSF I suggest PGM=ISFAFD or the rexx interface some code I've used
//SDSF     EXEC  PGM=ISFAFD       
//SYSTSPRT DD  SYSOUT=*           
//ISFIN DD *                       
  H                               
  FIND 'CONTROLO'   LAST               
  ++S                             
  RESET                           
  PRINT D                         
  ++<=CONTROLO.DUMP>,             
    <='OLD'>                       
  PRINT * 99999                   
  PRINT CLOSE                     
  ++AFD PF03                       
//ISFOUT DD SYSOUT=*               

HTH's
Peter

Re: SDSF Batch

PostPosted: Sun Apr 22, 2012 7:56 pm
by rayngerfan
Hi Peter

I appreciate the information you provided. I used the last parameter 'FIND OPCS LAST' executing SDSF and it works when there are only 2 occurrences of OPCS. I want to select the started task OPCS that resides on LPAR B190. My job always selects the 1st OPCS on A222. Can you tell me what parameter I would use to have the 2nd OPCS selected? I'm not sure what command makes the cursur move to the next line?

'NP JOBNAME TYPE JNUM PRTY QUEUE C POS PRTDEST SAFF ASYS STAT
OPCS STC 29669 15 EXECUTION LOCAL A222 A222
OPCS STC 30135 15 EXECUTION LOCAL B190 B190
OPCS STC 13784 1 PRINT 21T LOCAL
OPCS STC 14804 1 PRINT 22T LOCAL

Thanks

Re: SDSF Batch

PostPosted: Sun Apr 22, 2012 8:43 pm
by Pedro
I have not tried it, but how about a FIND followed by a second FIND?