I have coded a easytrieve program inside JCL which compiles and executes it. I have coded the some dsn as &ssid.db2.load in the JCL where the value of &ssid is hardcoded inside a member of PDS.
the above code works fine but when i want the &ssid to be used inside the Easytrieve the value is not replaced.i do not know whether it is possible to code like that ,if u guys think it can be,plz pass on the changes i have to do in my code.
Joined: 26 Apr 2004 Posts: 4650 Location: Raleigh, NC, USA
//JOBLIB DD DSN=&HLQWDD..DB2.DSNLOAD,DISP=SHR
gets replaced by:
//JOBLIB DD DSN=SSI1.DB2.DSNLOAD,DISP=SHR
doesn't get replaced as SSID(SSI1)
How can it? JCL variables, such as &HLQWDD, which you properly defined by using the SET statement, only apply to JCL. They have no value when used as data, as you are attempting to do. As Dick as already pointed out, a JCL variable needs to be passed via a PARM statement, which keeps it within the JCL and allows for proper substitution.