CA Jclchk 12.0 : $CA.USERDATA to be evaluated in CAZ1REXX INITIAL_PROCESSING section as Global Variable
search cancel

CA Jclchk 12.0 : $CA.USERDATA to be evaluated in CAZ1REXX INITIAL_PROCESSING section as Global Variable

book

Article ID: 129331

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

CA Jclchk 12.0 Runtime option USERDATA allows the user to specify a data string of one to 24 characters. This data is made available to all user exits and the REXX interface. The value that is specified is at the discretion of the user and CA JCLCheck™ Workload Automation does not use or verify the value.
This option has the following format:

USERData(string)|NOUSERDA

Default: None

It is possible to reference this option in Rexx, using the variable $CA.USERDATA.
By default, if a batch massive JCLCheck validation is submitted, the $CA.USERDATA is reinitialized and evaluated in all the CAZ1REXX sections, a part from the INITIAL_PROCESSING,  for each member validated into the run. Anyway usually in this variable it is passed a string of characters that is common to all the members validated in the same run, so it would be important to have the possibility to load the $CA.USERDATA content only once at the very beginning of the CAZ1REXX , so that the same content remains in storage for all the members validated , saving resources and decreasing process execution time, especially when thousands of members are validated in the same run.

How to implement this in CAZ1REXX? 

Environment

Z/OS - JCLCheck 

Resolution

It is possible to achieve this, doing the following main activities:

1. apply the test APARS ST07766 and ST07767, which add a new REXX RAW call with $CA.RSTYPE = OPTS. This call  is made during options processing before any JCL have been read. Updates have been done to CAZ1REXX and CAZ1REX2 Rexx samples about that. According to the Broadcom Standards, these Test APARS will be GA PTFs SO07766 and SO07767. 

2. Customize CAZ1REXX in order to use this  new code. A new RAW call is made after the INITIAL_PROCESSING call and before any JCL is read. 
The $CA.RSTYPE is set to a new value: OPTS. 
The $CA.RCOUNT will be 0 and there will be no $CA.RECORD.n data. 
The $CAJCL_REASON = RAW
The $CA.USERDATA = the value specified in the JCLCheck USERDATA option. 

So now this condition can be checked in the RAW_DATA_PROCESSING routine. The sample below checks the USERDATA and if blank issues a S (sever) message. 

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 

If a S or E messages is issued, JCLCheck will terminate processing, before JCL is read. 
If a I or W message is issued, then the message will be reported, but processing will continue. 
Below shows a S message issued. 

CALLING PARAMETERS: O(OPTS) 
DEFAULT PARAMETERS: CTL FULL JOB LIST XREF PXREF(RPT) 
OPTS PARAMETERS: NOSPIE 
PDS 
ER(S I) 
*USERDATA(IJUSRDATXXXXX) 
STDREXX(JCKT0004) 
INCLUDE(A1291307) 
CAY6341S 'JCLCHECK TERMINATING: NULL USERDATA' 

OPTIONS IN EFFECT: NOSPIE NOSYNTAX CSI CTLSCAN() ERROR(START INLINE) HCD 
INCLUDE(ACTIVE) OPTIONS(OPTS) 
PDS($ 9999999999) FULLLIST JOB JOBSEV LIST(SYSPRINT) 
PXREF(RPT) STDREXX(JCKT0004 ........) 
XREF() 

3. use Runtime Option  NOSPIE