Location in the JCL

A SET statement can appear anywhere in the job after the JOB statement with the following restrictions:
  • It must appear in the job's JCL before the intended use of the symbolic parameter.
  • It must follow a complete JCL statement.
  • It cannot appear immediately after the first DD statement within a concatenation.
    Examples: The following JCL will work.
    	//DD1       DD  DSN=dsnA,DISP=SHR
    	//          DD  DSN=dsnB,DISP=SHR
    	//         SET  
    	//          DD  DSN=dsnC,DISP=SHR
    The following JCL will fail.
    	//DD1       DD  DSN=dsnA,DISP=SHR
    	//         SET  
    	//          DD  DSN=dsnB,DISP=SHR
    	//          DD  DSN=dsnC,DISP=SHR