View previous topic :: View next topic
|
Author |
Message |
HARIBHARAT
New User
Joined: 05 Jul 2006 Posts: 65 Location: pune
|
|
|
|
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 |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
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 |
|
|
HARIBHARAT
New User
Joined: 05 Jul 2006 Posts: 65 Location: pune
|
|
|
|
Thank you surya. |
|
Back to top |
|
|
Muthukumar.PLindia
New User
Joined: 03 Jul 2006 Posts: 51 Location: Chennai
|
|
|
|
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 |
|
|
|