IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

it is possible to Call a COBOL-DB2 program


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top