JCL Troubleshooting
Procedure override does not take effect
Troubleshooting guide for Procedure override does not take effect. PROC symbolic parameters are resolved by the converter before the job runs — when substitution fails, the job gets a literal &NAME or the wrong value.
What it means
- Symbolic parameters (&VAR) are replaced textually when the PROC is expanded; defaults live on the PROC statement, overrides on the EXEC.
- Overrides only work if the symbol is actually coded in the PROC — you cannot override a symbol the PROC never defined.
- A missing override is silent: the default value is used and the job runs with the wrong dataset or program.
Common causes
- Symbol coded as &VAR on the EXEC override but the PROC defines &&VAR (double ampersand) or a different name.
- Override placed on the wrong EXEC statement when the job calls the PROC twice.
- Symbol value contains a comma or parenthesis without quotes: DSN=&DSN resolves to a value the converter then mis-parses.
- Symbolic used in a position where substitution is not allowed, e.g. inside the operation field.
- PROC default forgotten: the PROC statement has no default for the symbol, and the EXEC provides no override — converter error.
- Nested PROCs: inner PROC symbols are not visible to the outer EXEC override.
How to diagnose
- View the expanded JCL in SDSF (JESJCL) — it shows every symbol resolved; a leftover &NAME is the smoking gun.
- Compare the PROC statement defaults against the EXEC overrides name by name.
- Check for typos: &DATASET vs &DATASETS differ by one character and fail silently to the default.
- For quoted values: if the resolved value contains commas or spaces, it must be quoted at the override.
How to fix it
- Correct the symbol name so EXEC override matches the PROC definition exactly.
- Quote override values containing special characters: DSN="APP.DATA,EXTRA".
- Give every symbol a safe default on the PROC statement so a missing override cannot cause damage.
- Re-expand and verify in JESJCL before submitting production jobs.
Example: PROC with symbolic parameters and overrides
//MYPROC PROC DSN=APP.DEFAULT.IN,OUT=APP.DEFAULT.OUT
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=&DSN,DISP=SHR
//SORTOUT DD DSN=&OUT,DISP=(NEW,CATLG,DELETE)
// PEND
//JOB1 JOB (ACCT),CLASS=A
//RUN EXEC MYPROC,DSN=APP.JAN.INPUT,OUT=APP.JAN.OUTPUT
Symbols get defaults on the PROC statement and real values on the EXEC; JESJCL shows the resolved result.
Interview tip
- Q: Procedure override does not take effect — the job ran but used the wrong input dataset. How do you prove the symbol was the cause?
- A: I open the expanded JCL (JESJCL) in SDSF and check what &DSN resolved to. If the override name does not exactly match the PROC definition, the default is used silently — that is the most common cause.
Prevention checklist
- Always code defaults on the PROC statement.
- Verify symbol resolution in JESJCL before production submits.
- Keep symbol names short, distinct, and documented in the PROC header.
- Quote overrides that contain commas, spaces, or parentheses.
