Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 684
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: 2300
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 Is multiple program names allowed in ... Sakthidevi PL/I & Assembler 1 Tue Nov 19, 2019 11:12 pm
No new posts COBOL -DB2 SQL code to have GROUP BY ... vinu78 DB2 21 Wed Oct 23, 2019 7:00 pm
No new posts Running a REXX exec program using ZOSMF Sakthi344 CLIST & REXX 3 Tue Oct 15, 2019 3:13 pm
No new posts How to handle NULL in COBOL program bhaskar_kanteti COBOL Programming 8 Mon Oct 07, 2019 3:54 pm
This topic is locked: you cannot edit posts or make replies. COBOL/CICS with real time MQ Series u... BPranav CICS 2 Mon Sep 16, 2019 9:19 pm

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