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

COBOL D2 program execution without using IKJEFT01


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

New User


Joined: 18 Mar 2005
Posts: 9

PostPosted: Mon Dec 10, 2018 2:08 pm
Reply with quote

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
View user's profile Send private message
dipsybaby

New User


Joined: 18 Mar 2005
Posts: 9

PostPosted: Mon Dec 10, 2018 2:23 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 711
Location: Whitby, ON, Canada

PostPosted: Mon Dec 10, 2018 8:52 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2803
Location: NYC,USA

PostPosted: Wed Dec 12, 2018 8:58 pm
Reply with quote

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
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 How to get the message id thats trigg... Java & MQSeries 0
No new posts Tilde Characters Changing to COLONs i... CLIST & REXX 22
No new posts IDCAMS listcat service using cobol JCL & VSAM 1
No new posts Make cobol variable value a variable COBOL Programming 3
No new posts how to convert and use 1 bit hex-numb... COBOL Programming 10
Search our Forums:

Back to Top