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
 
it is possible to Call a COBOL-DB2 program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
HARIBHARAT

New User


Joined: 05 Jul 2006
Posts: 65
Location: pune

PostPosted: Tue Aug 29, 2006 1:28 pm    Post subject: it is possible to Call a COBOL-DB2 program
Reply with quote

Hi,

> An interviewer asks me if it is possible to Call a COBOL-DB2 program
> from a pure COBOL program? If possible, which utility do we need to
use
> to execute it? I mean, we use IKJEFT01 to execute a COBOL-DB2 program.
> But, our case is different here because we are calling a COBOL-DB2
> sub-program from a pure COBOL program. So, which utility to use and
> what is the procedure?

> I actually wrote a small main (COBOL) program and sub-program
> (COBOL-DB2) but don't know how to make use of it..........:-(

> Would anybody please explain.
Back to top
View user's profile Send private message

surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Tue Aug 29, 2006 3:09 pm    Post subject:
Reply with quote

Hi Haribharat,

You can call COBOL-DB2 sub program in a COBOL program.

You need to execute main COBOL program using IKJEFT01.
Before Execution you need to bind your sub program because it is having SQL statements. No need to bind your Main COBOL program.

In RUN JCL, use IKJEFT01 and code the below in SYSTSIN.
//SYSTSIN DD *
DSN S(DB2)
RUN PROGRAM(main program) PLAN(your plan)
END
Back to top
View user's profile Send private message
HARIBHARAT

New User


Joined: 05 Jul 2006
Posts: 65
Location: pune

PostPosted: Tue Aug 29, 2006 3:13 pm    Post subject: Re: it is possible to Call a COBOL-DB2 program
Reply with quote

Thank you surya.
Back to top
View user's profile Send private message
Muthukumar.PLindia

New User


Joined: 03 Jul 2006
Posts: 51
Location: Chennai

PostPosted: Fri Sep 01, 2006 6:59 am    Post subject:
Reply with quote

te reason for that is, IKJEFT01 is having the ability to contact the DB2 system and CObol.. If you are executing your main parent cobol program using exec pgm=cobolpgm, then when the subroutine has been called in between ur main pgm, it strucks....... is it clear
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 The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am

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