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: 674
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: 2114
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 Can we pass cobol pointer to cobol-db... rohanthengal DB2 3 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
No new posts z/VM z/VSE Get CPU-time of a COBOL Ba... Andi1982 COBOL Programming 2 Mon Mar 11, 2019 3:36 pm
No new posts COBOL Table Question GAPX1 COBOL Programming 3 Thu Mar 07, 2019 9:48 pm
No new posts How to delete a VSAM dataset from ins... Mike.Fulton JCL & VSAM 6 Fri Feb 15, 2019 5:58 am

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