Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 DB2 Program abending without giving a... rahulgarg14 DB2 3 Mon May 29, 2017 8:10 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us