Question:
We are running CA JCLCheck using CAZ1REXX with the following code and the values for DD.DSN returns &0005.
If DD.DSN <> '' & DD.DSN <> 'NULLFILE' then
Call $CAJCL_ERROR 'S',
'CAZ1REXX - DSN value cannot be null.'
Why is the value being returned with &0005?
Could you please provide a sample to check the value in DD.DSN when no value is coded with the JCL keyword DSN ?
Answer:
Normal JCLCheck processing is to build an internal dataset name like &0005 when the JCL DSN keyword was coded with no value.
Here is a sample REXX code which allows you to flag as an severe error when the DSN was coded with no value in the JCL.
If DATATYPE(SUBSTR(DD.DSN,2,4)) = 'NUM' & ,
SUBSTR(DD.DSN,1,1) = '&' then
Call $CAJCL_ERROR 'S',
'CAZ1REXX - DSN value cannot be null.'
Additional Information:
Refer to the CA JCLCheck Workload Automation documentation, Using Section: How to Use the JCLCheck REXX Programming Interface.
Refer to the IBM z/OS REXX manuals for complete documentation about using variables and expressions with REXX langauge.