Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Passing a value from JCL to a step that executes DB2 program
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us