View previous topic :: View next topic
|
Author |
Message |
kmdhandapani
New User
Joined: 13 Jul 2007 Posts: 10 Location: india
|
|
|
|
Hi ,
i have Program name ASF00001 is cobol and Sub Program with ASF00022 in Cobol -Db2 ..
Now i am modifying in both calling & Called program ..
How can i compile programs ..
kindly let me know the process ??? |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
in general, every site has it's own jcl/skeleton/utility to do it... ask your peers. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
dhandapani,
There are many ways to compile. It is all specific to your project/site. Some use JCL's , few compile in endevor/changeman . |
|
Back to top |
|
|
kmdhandapani
New User
Joined: 13 Jul 2007 Posts: 10 Location: india
|
|
|
|
yes we can compile Sub program Seperate and Main prgram Seperate by endevour / Changman
But how can we Run Jcl ? Because we have Seperate jcl to Run Cobol ,Cobol -Db2 .
Regards,
Dhans |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
you should use IKJEFT01 to invoke your main program...
RUN PROGRAM(yourprogramhere) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But how can we Run Jcl ? Because we have Seperate jcl to Run Cobol ,Cobol -Db2 . |
You should talk with others on your project who run programs or the database support people for the proper jcl for your system. You should not just make-up or download some jcl from elsewhere. |
|
Back to top |
|
|
Mistermind
New User
Joined: 08 Feb 2008 Posts: 46 Location: Dublin
|
|
|
|
I would think your main program should be compiled like a DB2 program, i.e. going through the preprocessor, outputting DBRM for binding.
At runtime, JCL exec pgm=IKJEFT01 which invokes the main program, which then calls the subroutine statically or dynamically. The DB2 subroutine will not execute correctly unless the DB2 environment has been set up for the main program before the subroutine is activated.
If both are old programs, check the existing compile output and runtime JCL to confirm the above is the arrangement. If Endevor is used, check the processor groups previously used and ascertain the actions performed by the processor groups.
If these two programs are being connected for the first time, then implement the above, i.e. compile the main program as DB2. At runtime the main program does not HAVE to call the DB2-using subroutine, the main program can run to the end without ever using DB2. |
|
Back to top |
|
|
Sundar V
New User
Joined: 25 Apr 2006 Posts: 5
|
|
|
|
Hi
Could you please explain more why the Main program need to compile as COBOL-DB2 Program, even it doesnt have any DB2 Statements.
1. What will happen if i compile my Mainprogram as a pure COBOL program (IGYCRCTL) which calls a COBOL-DB2 Subprogram?
Secondly if i try to execute/run my main program (which is compiled using IGYCRTCL) using IKJEFT01,
then whether my both main and subprogram get executed?
Or Will it get abort during run/execution?
2. As Mistermind mentioned, if i compile the Mainprogram (NO DB2 Statement) as similar to COBOL DB2 program,
then there wont be DBRM created, no need for Bind, and no consistency token check during execution.
If this is a case, why are we choosing the mainprogram to compile in COBOL-DB2 mode?
Please clarify.
Thanks in advance.
Sundar |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
do not db2 pre-compile a program that contains no db2. dumb, dumb, dumb.
your main program calls the sub program. IKJEFt.. invokes you main program after making a connection to db2.
That is the purpose of using IKJEFT.. First it connects to db2 with the plan for the db2 submodule and then invokes the main module, which will eventually call the submodule.
The OP (and a couple of the contributors) need to read a little about what is going on in the computer, control and invocation of db2 modules. |
|
Back to top |
|
|
kmdhandapani
New User
Joined: 13 Jul 2007 Posts: 10 Location: india
|
|
|
|
thanks a lot for your help and its working fine
i compiled main program just like a Cobol -Db2 program ..and at run Program with IKJEFTO1 ..
regards,
Dhans. |
|
Back to top |
|
|
|