IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Passing a value from JCL to a step that executes DB2 program


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chinnielr

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Mon Jul 07, 2008 5:46 pm
Reply with quote

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!!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jul 07, 2008 6:41 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top