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

reg non cobol db2 compilation


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Mon Sep 13, 2010 10:47 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2359
Location: Israel

PostPosted: Mon Sep 13, 2010 10:49 am
Reply with quote

No, you don't need a precompile for a program that does not access DB2 directly.

O.
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Mon Sep 13, 2010 10:59 am
Reply with quote

So during execution what would be the difference in the jcl ?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2359
Location: Israel

PostPosted: Mon Sep 13, 2010 11:09 am
Reply with quote

You will have to execute it like you execute a DB2 program (probably DSN RUN...)

O.
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Mon Sep 13, 2010 11:19 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2359
Location: Israel

PostPosted: Mon Sep 13, 2010 11:43 am
Reply with quote

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
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon Sep 13, 2010 1:29 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 13, 2010 3:37 pm
Reply with quote

Have a look on these previous threads:

www.ibmmainframes.com/viewtopic.php?t=50304&highlight=db2+program+programme
www.ibmmainframes.com/viewtopic.php?t=49837&highlight=db2+program+programme
www.ibmmainframes.com/viewtopic.php?t=34855&highlight=db2+program+programme
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Mon Sep 13, 2010 3:59 pm
Reply with quote

thanks to all of u for the info provided.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 13, 2010 4:00 pm
Reply with quote

Hope we had been helpful, Good Luck.
Back to top
View user's profile Send private message
Ambili S

Active User


Joined: 06 Sep 2007
Posts: 112
Location: India

PostPosted: Mon Sep 13, 2010 5:49 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 13, 2010 6:07 pm
Reply with quote

Yes, that sounds correct.
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 Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts COBOL program logic for comparisipn o... COBOL Programming 2
No new posts COBOL - create and write to output fi... COBOL Programming 0
No new posts COBOL to JSON COBOL Programming 1
Search our Forums:

Back to Top