Internal text may not be pretty but once you decipher the format of it, you 
have something easy to use compared to the free format JCL is going to be in. 
SDSF can be run as a separate step or can be called from your program. 
Below is a step that will capture the JESJCL output. You then get to read it 
and parse it. On the system I can access right now I am not authorized to get 
the internal text using SDSF. SJ is not valid in batch as SDSF wants to put 
you in EDIT, and you don't get to control this. If you could get SJ to invoke 
EDIT and pass an initial edit macro you could get a copy of the job, with some 
restrictions.

The SDSF and IOF people have figured out how to traverse into the JES 
control blocks to resurrect the JCL. You can, too. Don't expect a vendor who 
has done this work to give away that information, it is 'intellectual property' 
behind their products. And as always, follow control blocks at your own peril. 
Only documented services and interfaces are recommended. You would want 
to use the JES provided macros in yor assembler code so you can re-assemble 
with every JES upgrade you do.

//*                                                         
//STEP001 EXEC PGM=SDSF                                     
//ISFOUT   DD  SYSOUT=*                                     
//DDNAME   DD  DISP=(NEW,CATLG),DSN=KTOMIAK.JOBOUT.JOB00207,
//             UNIT=SYSDA,SPACE=(TRK,(45,45),RLSE),         
//             DCB=(DSORG=PS,RECFM=VB,BLKSIZE=0,LRECL=255)  
//ISFIN    DD  *                                            
PRE KTOMIAK*                                                
OWNER *                                                     
H                                                           
S KTOMIAKK JOB00207                                         
F KTOMIAKK                                                  
++?                                                         
F JESJCL                                                    
++S                                                         
PRINT FILE DDNAME                                           
PRINT                                                       
PRINT CLOSE                                                 
END                                                         
/*                                                          
//*                                                         

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to