View previous topic :: View next topic
|
Author |
Message |
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
I have a cobol non db2 source pgm and it calls a db2 pgm. How different will be the compilation process from a normal cobol db2 compilation.Will there be a pre-compilation process ? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
No, you don't need a precompile for a program that does not access DB2 directly.
O. |
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
So during execution what would be the difference in the jcl ? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You will have to execute it like you execute a DB2 program (probably DSN RUN...)
O. |
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
Could you please explain me how the bind will happen here. Or if you could explain me how exactly the compile and run would happen it would be of great help. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You are making things complex while they are very simple:
Preparation
A DB2 program requires precompile, compile and bind.
A non-DB2 program requires only compile.
Execution
A DB2 program, or a program that calls a DB2 program, need to be invoked as a DB2 program, usually under DSN.
O. |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
You need to start your program from the IKJEFT01 or similar TSO batch environment, or if your installation has IMS DB/DC, as a batch job in that environment.
Ask support personnel, or your colleagues for advice on this. You are presumably not the first to have a DB2 batch implemneted at your site. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
thanks to all of u for the info provided. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hope we had been helpful, Good Luck. |
|
Back to top |
|
|
Ambili S
Active User
Joined: 06 Sep 2007 Posts: 112 Location: India
|
|
|
|
This is what i understood. Do correct me if i am wrong.
The main cobol pgm(CP1) will undergo a normal compile process and the db2 subprogram(DS1) will undergo the pre-complie,compile,bind process to generate the plan.Then in run jcl we need to give the main pgm name and plan name for execution. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Yes, that sounds correct. |
|
Back to top |
|
|
|