z/OS JCL substitution not working correctly

Document ID : KB000088141
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
N/A

z/OS JCL substitution not working.

Symbols are not substitured in JCL.

Investigation

Scenario A

JCL:
JS0100 EXEC EDCJRAV1, 
SYS='F', 
SYSY='Y', 
HLQ='ED.', 
JOBNAME='EDFJRAV1', 
RDATE='D&ESPAYY&ESPAMM&ESPADD', 
RTIME='T&ESPAHH&ESPAMN&ESPASS', 
 
Result: IEFC653I SUBSTITUTION JCL - DSN=ED.F.ON.IDR.APPL.D&ESPAYY&ESPAMM&ESPADD.T&ESPAHH&ESPAMN&ESPASS,

Scenario B


JCL:
//SYSIN DD *
 
 UNLOAD CNTLCARDS DB2LOAD SHRLEVEL CHANGE MAXSORTS (4) 
 FORMAT EXTERNAL 
 SELECT * 
 FROM PEDF0.LSCE 
 WHERE 
 CE_EFF_DT > '&&ACNTY' 
 AND CE_MSG_TP_CD = 'H' 

Result: IEFC653I SUBSTITUTION JCL - DSN=ED.F.ON.IDR.APPL.&ACNTY,

Reference
 

 
Environment:
OS Version: N/A
Cause:
Cause type:
By design
Root Cause: In Scenario A JCL interprets it as a string, and not a symbol.
In Scenario B JCL does not support symbol substitution within inline data (SHSIN).
Resolution:
Scenario A:
Remove the ticks or single quotes from the symbol
Example: change from RDATE='D&ESPAYY&ESPAMM&ESPADD' to RDATE= D&ESPAYY&ESPAMM&ESPADD

Scenario B:
In version 2.1 a new DD statement sub-parameter was introduced, called SYMBOLS. You can request JES2 to perform symbol substitution in in-stream dataset.

Fix Status: No Fix

Fix Version(s):
N/A
Additional Information:
Workaround :
N/A