chinnielr
New User
Joined: 11 Jul 2005 Posts: 87
|
|
|
|
Hi All,
I need to pass a value from JCL to a step in a PROC that executes a DB2 program. My DB2 program should take in this PARM value and execute it.
Can you please let me know how to achieve this?
Here is my sample JCL and PROC looks like
//TSTPRM EXEC TSTPRM,
// EFFDATE='20080707'
Below is my sample PROC looks like
//TEMP EXEC PGM=IKJEFT01,PARM='&EFFDATE'
I need to capture the date in TEMP program and process it.
But when I tried to execute it, I am getting as BLANK for the date.
I know that we can pass the PARM in DB2 CONTROL cards. But I need to this like above.
Can we do this without passing the PARM in the control card? Is there any way to do this?
Please suggest!! |
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 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. |
|