JCLCheck REXX interface: evaluate $CA.USERDATA before the JCL is read
search cancel

JCLCheck REXX interface: evaluate $CA.USERDATA before the JCL is read

book

Article ID: 129331

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

JCLCheck PTFs SO07766 and SO07767 add a new call to the REXX interface before the JCL is read.  This call is added so a user data string may be evaluated before the JCL is processed.  The user data string is available in the $CA.USERDATA variable. 

How to implement this feature?

Environment

Release: 12.0

Component: JCLCheck Workload Automation

Resolution

Two sample REXX execs are provided in the CAZ2CLS0 library: CAZ1REXX and CAZ1REX2. 

Add the following codes to the RAW_DATA_PROCESSING routine: 

RAW_DATA_PROCESSING: 
When $CA.RSTYPE='OPTS' Then Do 
If $CA.USERDATA='' Then Do 
   CALL $CAJCL_ERROR 'S','- JCLCHECK TERMINATING: USERDATA=null' 
End 
Else Do 
  Parms=SUBSTR($CA.USERDATA,1,4)" "STRIP(SUBSTR($CA.USERDATA,5)) 
  Parse Upper Var Parms ElementType Environ 
  Say "OPTS ElementType="ElementType" Environ="Environ 
RETURN  
End 

 

Explanation: 

. $CA.RSTYPE='OPTS' is the new call to REXX before the JCL is processed.

. In the above example, if the user data string is null (i.e., no user data is passed), severe error CAY6341S 'JCLCHECK TERMINATING: NULL USERDATA' is issued, and JCLCheck terminates.

. When an informational (I) or warning (W) occurs, the message will be reported, and JCLCheck processing will continue. 

 

 

Additional Information

++HOLD (SO07766) SYSTEM FMID(CAZ1C00)                                   
  REASON (ENH    )   DATE (19207)                                       
  COMMENT (                                                             
+----------------------------------------------------------------------+
|     CA JCLCheck                                     Release 12.0     |
+----------+-----------------------------------------------------------+
|SEQUENCE  | Before using CA JCLCheck                                  |
+----------+-----------------------------------------------------------+
|PURPOSE   | This PTF introduces a JCLCheck behavior change.           |
|          | A new STDREXX call before JCL processing now              |
|          | occurs. This is a RAW call with $CA.RSTYPE = OPTS.        |
|          | If the JCLCheck USERDATA option is used the value         |
|          | will be available in REXX in the $CA.USERDATA variable.   |
|          |                                                           |
|          | Due to this call occurring before the JCL is read, any    |
|          | errors in REXX initialization, such as a REXX program     |
|          | missing from the SYSEXEC DD PDS, will result in JCLCheck  |
|          | terminating before JCL is read.  A CAY6361S error         |
|          | message will be issued to explain the cause of the        |
|          | error.                                                    |
|          |                                                           |
|          | Prior to this change, these errors would only occur       |
|          | after JCL processing had started and the error would      |
|          | disable the REXX processing and allow the JCL to          |
|          | continue. Since this error happens earlier, it prevents   |
|          | running JCLCheck without the requested STDREXX program.   |
|          |                                                           |
+----------+-----------------------------------------------------------+