JCLCheck REXX interface: how to check that a DSN is coded with no value
search cancel

JCLCheck REXX interface: how to check that a DSN is coded with no value

book

Article ID: 39496

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

Coded the following in a REXX exec to flag a severe error when the DSN parameter has no value. 
 
 If DD.DSN <> '' & DD.DSN <> 'NULLFILE' then 
 Call $CAJCL_ERROR 'S', 
     'CAZ1REXX - DSN value cannot be null.'
 
The returned value for DD.DSN is &0005?  Why &0005? 
Need a sample REXX code to return an error message when the parameter DSN has no value.

 

 

 

 

 

Environment

Release: All
Component: JCLCheck Workload Automation

Resolution

JCLCheck builds an internal dataset name like &0005 when the JCL DSN keyword was coded with no value.

Here is a sample REXX code to return a 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.'