search cancel

JCLCheck REXX interface: How to check the DD.DDSTAT variable for statements from an instream proc


Article ID: 228060


Updated On:


JCLCheck Workload Automation


Using the REXX interface for JCLCheck, I need to know how to detect if a 'PROC' statement is in the raw JCL, or from an instream proc.  


Release : 12.0

Component : CA JCLCheck workload Automation


Use the REXX variable DD.DDSTAT.  Here are sample codes to check each bit in the flag: 

if DD.DDSTAT /= 'DD.DDSTAT' then do                                            
   SPBPINS.bit=6    /* instream Proc bit flag */                                
   teststat = X2B(C2X(DD.DDSTAT))                                              
   say ' '                                                                      
   say 'DD.DDSTAT =' teststat                                                  
   /* CHECK for INSTREAM PROC */                                                
   IF SUBSTR(teststat,SPBSPEC.bit,1) = 1 then say 'SPEC DD (JOBLIB, JOBCAT)'    
   IF SUBSTR(teststat,SPBPRIO.bit,1) = 1 then say 'HASP /*PRIORITY CARD'        
   IF SUBSTR(teststat,SPBORIDE.bit,1) = 1 then say 'STMT IS AN OVERRIDE'        
   IF SUBSTR(teststat,SPBORODE.bit,1) = 1 then say 'STMT HAS BEEN OVERRIDDEN'  
   IF SUBSTR(teststat,SPBPLIB.bit,1) = 1 then say 'STMT CAME FROM PROC'        
   IF SUBSTR(teststat,SPBPINS.bit,1) = 1 then say 'STMT CAME FROM INSTREAM PROC'
   IF SUBSTR(teststat,SPBDATA.bit,1) = 1 then say 'STMT IS "DD *" OR "DD DATA"'
   IF SUBSTR(teststat,SPBDDNO.bit,1) = 1 then say 'STMT IS UNNAMED DD'          
   say ' '                                                                      

Additional Information

Variable List for the JCLCheck CAZ1REXX Program