🖥 JCL
JCL SET Statement
Intermediate 🕑 10 min read
👁 0 views
10
Code Example
## JCL SET Statement
The SET statement defines or modifies symbolic parameters at the job or step level.
### Syntax
\`\`\`jcl
//name SET symbol=value[,symbol=value,...]
\`\`\`
### Using SET
\`\`\`jcl
// SET HLQ=PROD
// SET DATE=20241225
//STEP1 EXEC PGM=MYPGM
//INPUT DD DSN=&HLQ..MASTER.FILE,DISP=SHR
\`\`\`
### Scope
- SET before EXEC: Available to that and following steps
- SET in PROC: Can be overridden when called
### Null Value
\`\`\`jcl
// SET OPTION=
//STEP1 EXEC PGM=MYPGM,PARM='&OPTION'
\`\`\`
### Concatenation
\`\`\`jcl
// SET HLQ=PROD
// SET LLQ=DATA
//DD1 DD DSN=&HLQ..MIDDLE.&LLQ,DISP=SHR
\`\`\`
Results in: PROD.MIDDLE.DATA
### System Symbols
\`\`\`jcl
&SYSUID - Submitting user ID
&SYSDATE - Current date (yyddd)
&SYSTIME - Current time (hhmmss)
&SYSJOBNAME - Job name
\`\`\`