View previous topic :: View next topic
|
Author |
Message |
dipsybaby
New User
Joined: 18 Mar 2005 Posts: 9
|
|
|
|
Hi All,
We always run a CObol DB2 program in Batch mode thru JCL using IKJEFT01.
Is it possible to run it as PROG=progname directly without using IKJEFT01?
I read somewhere as yes, but could not find sample code.
Pardon me, if I have missed to notice them. Any pointers regarding the same would e helpful.
Thanks
Deepa |
|
Back to top |
|
 |
dipsybaby
New User
Joined: 18 Mar 2005 Posts: 9
|
|
|
|
In addition to above, I know that it can be done using CAF. but I was loking for some sample code. If someone could provide, would e a great help |
|
Back to top |
|
 |
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 745 Location: Whitby, ON, Canada
|
|
|
|
There is more than one way to do this.
1. Relink the program to bring in DSNALI rather than DSNELI and run it as PGM= This is not very flexible because it will connect to whatever DB2 subsystem is the default on your system. It will also use the program name as the plan name.
2. Same as #1, but bring in DSNALI via your STEPLIB. This is the preferred approach if your program is compiled with DYNAM. This approach has the same inflexibility as #1.
3. Add explicit calls to DSNALI in the program. A CONNECT call connects you to the DB2 subsystem that you want (you can supply the name via a control card or input parm that your program has to manage) and an OPEN call is used to Open your preferred PLAN name.
There is really no benefit to using CAF, and I would recommend that you continue to use TSO attach. (i.e. IKJEFT01) |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 2973 Location: NYC,USA
|
|
|
|
Quote: |
There is really no benefit to using CAF, and I would recommend that you continue to use TSO attach. (i.e. IKJEFT01) |
Isn't IKJEFT01 calls CAF internally to execute the program by using supplied SYSTSIN?
Look here for another possible way. |
|
Back to top |
|
 |
|