Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
COBOL D2 program execution without using IKJEFT01

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: COBOL D2 program execution without using IKJEFT01
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    Post subject:
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: 682
Location: Whitby, ON, Canada

PostPosted: Mon Dec 10, 2018 8:52 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2165
Location: NY,USA

PostPosted: Wed Dec 12, 2018 8:58 pm    Post subject:
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    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 Verify WITH UR present inside program... priyankakir CLIST & REXX 23 Wed Jun 12, 2019 3:37 pm
No new posts Regarding mroe data to be processed i... vinu78 DB2 1 Mon May 27, 2019 7:31 pm
No new posts S0C7 abend while running a Cobol Program amitc23 COBOL Programming 2 Tue May 07, 2019 4:06 pm
No new posts Can we pass cobol pointer to cobol-db... rohanthengal DB2 4 Tue Mar 19, 2019 1:04 pm
No new posts Call DB2 user defined function from C... Ziko13 DB2 5 Thu Mar 14, 2019 4:46 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us