Joined: 20 Oct 2006 Posts: 6970 Location: porcelain throne
for IJKFldld modules (TMP) that are used to invoked db2 modules (CAF), the parm parm in the exec statement is for the TMP program. The control cards that you don't want to use are the only way to get it there, without defining a file in your db2 program.
remember, you can create control cards by concatenating several files.
dsn could be in one file
sysid could be in another
the run can be in another
the parm=' ' can be in yet another.
or, change your db2 from CAF to RRS and write a cobol module that can be called from any db2 module to effect the RRS attach and you don't need to use the TMP to execute db2 modules.
nope, don't even bother asking about RRSAF. If you don't have it, i am not going to explain it. If you have it at your shop, you already have the cobol module (could be assembler) to call for the attach - which means again, I am not going to explain.
If you are interested in RRSAF, go to the IBM Redbooks website and check for RRSAF. Big book with lots of pictures.