CA JCLCheck REXX Message Processing and DD stem variables
search cancel

CA JCLCheck REXX Message Processing and DD stem variables

book

Article ID: 203174

calendar_today

Updated On:

Products

JCLCheck Workload Automation UNICENTER JCLCHECK COMMON COMPONENT

Issue/Introduction

When a message is issued for a DD statement, the JCLCheck REXX DD stem variables are still set on the previous DD statement.

Sample JCL:

//STEP01  EXEC PGM=IEFBR14                          
//FILE1    DD  DSN=CAI.JCK.CGDG(+1),
//           DCB=(RECFM=FB,LRECL=1092,BLKSIZE=0),            
//           SPACE=(CYL,(1,1),RLSE),                        
//           DISP=(NEW,CATLG,DELETE)                         
//STEP02  EXEC PGM=SORT                                
//SORTIN   DD DSN=CAI.JCK.AGDG,DISP=SHR         /*GDG base*/
//         DD DSN=CAI.JCK.BGDG,DISP=SHR /*GDG base*/
//         DD DSN=CAI.JCK.CGDG,DISP=SHR /*GDG base*/

Sample MSG_PROCESSING routine:

IF MSG.NUMBER = '099' THEN DO       /* MSG CAY6099W */    
       CALL $CAJCL_ERROR 'S' ,                              
             '804 Dataset does not contain GDG specification'
       CALL $CAJCL_ERROR 'S' ,                              
            'DDNAME = 'DD.DDNAME 'DISP = 'DD.DISP_STATUS    
       CALL $CAJCL_ERROR 'S' ,                              
            'DSN = 'DD.DSN                                  
END                                                 
 
Result: 
//STEP02  EXEC PGM=SORT             
//SORTIN   DD DSN=CAI.JCK.AGDG,DISP=SHR
  CAY6341S "804 Dataset does not contain GDG specification"
CAY6341S "DDNAME = FILE1    DISP = NEW"          <============ value from previous DD statement               
CAY6341S "DSN = CAI.JCK.CGDG                     <============ value from previous DD statement         
CAY6099W GENERATION DATA GROUP "CAI.JCK.AGDG"
           SPECIFIED WITHOUT A GENERATION NUMBER - ALL MEMBERS SELECTED
...

Environment

Release : 12.0

Component : CA JCLCheck workload Automation

Cause

The MSG_PROCESSING routine is called at the exact time when the error occurs, but the DD stem variables are not filled in until after JCLCheck is done parsing the JCL statement.  

How JCLCheck processes a DD statement: 

1) JCLCheck starts the processing of checking a DD statement.         
2) An error occurs during the process.  With the REXXMSG option active, the JCLCheck REXX exec is called for MSG_PROCESSING with the MSG stem variables populated. 
3) The DD checking is completed, and the REXX exec is called for DD_PROCESSING with the DD stem variables populated.    

              

Resolution

- Check for the MSG stem variable instead of the DD stem variable:

  Example:

    MSG_PROCESSING:
    IF MSG.NUMBER = '099' THEN DO                   /* MSG CAY6099W */                 
          IF LEFT(MSG.MESSAGE,36) = "CAY6099W GENERATION DATA GROUP 'CAI."  
                THEN DO  ...


-  Suppress the JCLCheck message and set a flag.  When the DD call is made, check the DD info and issue your customized message if needed.