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

get submitted JCL from SDSF with REXX JOB


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Punki

New User


Joined: 31 Oct 2006
Posts: 10

PostPosted: Mon Sep 22, 2025 6:19 pm
Reply with quote

Hi together,

is there a way to get the submitted JCL from SDSF/JES2?

I've found some threads in other form. And also here...

ibmmainframes.com/about63395.html

The trick shoud be to use

Code:
Address SDSF "ISFACT ST TOKEN('"jtoken.jdd"') PARM(NP SJA)"


'SJA' is supposed to be the solution.

But I've tried some hours rather days to get this run. But it didn't work. Also the
manual doesn't give any hint.

Do you perhaps have a solution?

Greeting

Punki
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 766
Location: Denmark

PostPosted: Tue Sep 23, 2025 1:24 am
Reply with quote

I assume that you attempt to read the JCL into REXX, otherwise just use the SJ line command in front of a job in the ST display.
The following works for me (note the hard-coding of job name and id while testing). The JCL is in the libref stored in variable ISFDDNAME.1:
Code:
 arg jbn jid .  /* i.e. DSREST JOB00572 */                           
 parse value 'ZAWFMDAY JOB06307' with jbn jid .   /* while testing */
                                                                     
 rc=isfcalls('ON')                                                   
 isfprefix=jbn                                                       
 isfdest  ='LOCAL'                                                   
 parse value 'AND jobid eq' jid with isffiltermode isffilter         
 Address SDSF "ISFEXEC ST"                                           
 if rc<>0 then call msgrtn rc "ISFEXEC ST"                           
 if jobid.0=0 then exit xmsg('not found')                             
                                                                     
 Address SDSF "ISFACT ST TOKEN('"TOKEN.1"') PARM(NP SJA) "           
 if rc<>0 then call msgrtn rc "ISFACT ST TOKEN"                       
 "execio * diskr" isfddname.1 "(stem line. finis)"                   
 do n=1 to line.0                                                     
   say line.n                                                         
 end                                                                 
 exit 0                                                               
                                                                     
XMsg: if arg(1)<>'' then say arg(1);return word(arg(2) 0,1)           
                                                                     
Msgrtn:    /* subroutine to list error messages */                   
 arg msgrc msgfunc                                                   
 if msgrc=0 then return                                               
 say msgrc 'returned from' msgfunc                                   
 if isfmsg<>"" then Say "isfmsg is:" isfmsg                           
 do msgix=1 to isfmsg2.0                                             
   Say "isfmsg2."msgix "is:" isfmsg2.msgix                           
 end                                                                 
 exit 8   
Back to top
View user's profile Send private message
Punki

New User


Joined: 31 Oct 2006
Posts: 10

PostPosted: Tue Sep 23, 2025 2:46 pm
Reply with quote

Hi Willy,

thanks alot.

I've tested realy a lot of REXXe. But nothing works for me.
Now with your sample it works(!) and with the first test ;)

Can't image what was my problem. I must check my old test.

Greetings

Panki
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts CEMT using Rexx? Help please CLIST & REXX 3
No new posts How to Operate with Operator console ... IBM Tools 11
No new posts Make job wait until submitted job is ... JCL & VSAM 4
No new posts Rexx to read current Panvalet editor/... CLIST & REXX 0
No new posts JCL/REXX to know GDG base name JCL & VSAM 6
Search our Forums:


Back to Top