Hi,
I've only a v basic level of JCL......hoping someone can help out on this problem:
A standard piece of JCL in one of our jobs would be:
//SYSIN DD DSN=EW.REF.CONTROL.LOGON(SC2LOGON),
// DISP=SHR
// DD DSN=SU.REF.CONTROL.DML(SQCUCL15),
// DISP=SHR
// DD DSN=EW.REF.CONTROL.DML(SQQUIT0),
// DISP=SHR
Logon, run a a piece of SQL, logoff. As I understand how concatenation of datasets works, all datasets must be of the same LRECL for this to work, which is fine in most cases. However we now have a requirement to execute SQL that has been dymanicly generated into a dataset, like this:
//SYSIN DD DSN=EW.REF.CONTROL.LOGON(SC2LOGON),
// DISP=SHR
// DD DSN=SU.REF.CONTROL.DYNAMICSQL,
// DISP=SHR
// DD DSN=EW.REF.CONTROL.DML(SQQUIT0),
// DISP=SHR
The problem is that since we don't know how long the SQL string will be in advance, we need to specify a 'safe' upper limit on the LRECL of SU.REF.CONTROL.DYNAMICSQL when it is created, which means that when it comes to executing the above JCL a concatenation abend is thrown, as the LRECL of SU.REF.CONTROL.DYNAMICSQL does not match the other datasets.
Can anyone think of a way around this? (Aside from setting the value of LRECL to the 'safe' limit for all datasets involved, which presumably would work but is not a practical solution in this case).
Many Thanks,
John