Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Retrieve step name corresponding to a DDNAME in spool.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Arun_scorpio

New User


Joined: 16 Oct 2009
Posts: 7
Location: India

PostPosted: Fri Jan 21, 2011 5:17 pm    Post subject: Retrieve step name corresponding to a DDNAME in spool.
Reply with quote

Hi,

I wanted to retrieve all the DDNAME and STEP NAME of a job using JOBID. I have written a REXX program to retrieve the DDNAME. But I dont know how to get the step names. After doing considerable search, I could not find any variables corresponding to step name.

I have posted below, the code, spool data, current output and expected output. Please take a look and let me know if there is a way to acheive it ?


Code:
/***************REXX**************/                         
RC = ISFCALLS(ON)                                           
ISFPREFIX = "A0101CM"                                       
ADDRESS SDSF "ISFEXEC ST"                                   
IF RC <> 0 THEN EXIT 20                                     
COUNT = ISFROWS                                             
JID = 'JOB24071'                                           
DO I = 1 TO COUNT                                           
 COLVAL = VALUE(JOBID.I)                                   
 IF COLVAL = JID THEN                                       
 DO                                                         
  ADDRESS SDSF "ISFACT ST TOKEN('"TOKEN.I"') PARM(NP ?)",   
  "("PREFIX JDS_                                           
  IF RC <> 0 THEN EXIT                                     
  DO J = 1 TO JDS_DDNAME.0                                 
   SAY JDS_DDNAME.J                                         
  END                                                       
 END                                                       
END                                                         
RC = ISFCALLS(OFF) 


Code:
Spool Screenshot :
DDNAME   StepName ProcStep DSID Owner    C Dest               Rec-Cnt
JESMSGLG JES2                 2 A0101    T LOCAL                   18
JESJCL   JES2                 3 A0101    T LOCAL                   19
JESYSMSG JES2                 4 A0101    T LOCAL                  138
OUTDD    SEC005             101 A0101    T LOCAL                  251
SYSUT2   STEP2              102 A0101    T LOCAL                    1
SYSPRINT STEP2              103 A0101    T LOCAL                   26



Code:
Current output:
JESMSGLG
JESJCL   
JESYSMSG
OUTDD   
SYSUT2   
SYSPRINT
***     


Code:
Expected output:
JESMSGLG JES2   
JESJCL      JES2   
JESYSMSG JES2   
OUTDD      SEC005
SYSUT2     STEP2 
SYSPRINT  STEP2
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jan 21, 2011 6:09 pm    Post subject:
Reply with quote

look for 7.2.5 Searching the report in this html version of Implementing REXX support in SDSF

this link will provide urls for html or pdf: http://www.redbooks.ibm.com/abstracts/sg247419.html?Open

and learn to use bbcode!!!!
Back to top
View user's profile Send private message
Jeffrey Ranney

New User


Joined: 23 Dec 2010
Posts: 20
Location: USA

PostPosted: Tue Feb 08, 2011 5:03 pm    Post subject:
Reply with quote

In the SDSF manual, it describes how run SDSF in batch. Here is some sample JCL from the job I use to do what you are attempting :

//*
//****---> LINES,WIDTH
//SDSF EXEC PGM=ISFAFD,PARM='++20,150'
//ISPPROF DD DISP=SHR,DSN=YOURTSOID.ISPF.ISPPROF
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//ISFOUT DD SYSOUT=*
//CAPTURE DD SYSOUT=*
//ISFIN DD *
PRE DZQ08K*
ST
PT FILE CAPTURE
FIND DZQ08KE1
++?
FIND JESMSGLG
++S
//
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Feb 09, 2011 3:20 am    Post subject: Reply to: Retrieve step name corresponding to a DDNAME in sp
Reply with quote

See Example 7-6, in http://www.redbooks.ibm.com/abstracts/sg247419.html?Open , which seems to do exactly what you want. It might also be good to review the other examples.
Back to top
View user's profile Send private message
Arun_scorpio

New User


Joined: 16 Oct 2009
Posts: 7
Location: India

PostPosted: Wed Feb 16, 2011 4:25 pm    Post subject: Re: Reply to: Retrieve step name corresponding to a DDNAME i
Reply with quote

Pedro wrote:
See Example 7-6, in http://www.redbooks.ibm.com/abstracts/sg247419.html?Open , which seems to do exactly what you want. It might also be good to review the other examples.


Thanks mate.. Finally got what I had wanted...
Also came to know how to find the stem variable name for all the columns in SDSF.

Here is the code:
Code:

/***************REXX**************/                     
RC = ISFCALLS(ON)                                       
ISFPREFIX = "A0101SRT"                                   
ADDRESS SDSF "ISFEXEC ST"                               
IF RC <> 0 THEN                                         
DO                                                       
 SAY 'ERROR'                                             
 EXIT 20                                                 
END                                                     
LOOP = ISFROWS                                           
DO I = 1 TO LOOP                                         
 COLVAL = VALUE(JOBID.I)                                 
 IF COLVAL = 'JOB27050' THEN                             
 DO                                                     
  ADDRESS SDSF "ISFACT ST TOKEN('"TOKEN.I"') PARM(NP ?)"
  IF RC <> 0 THEN EXIT                                   
  DO J = 1 TO STEPN.0                                   
  SAY DDNAME.J   STEPN.J                                 
  END                                                   
 END                                                     
END                                                     
RC = ISFCALLS(OFF)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Need to retrieve Julian_date Suganya87 DB2 4 Wed Aug 17, 2016 7:27 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us