Pre-compilation when DB2 is down.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Priya
Registered Member
Posts: 50
Joined: Tue Jul 02, 2013 11:43 pm

Pre-compilation when DB2 is down.

Post by Priya »

Hi,

In case if at some point of time DB2 is down, would that impact the pre-compilation process of a DB2-COBOL program? I ask this because when I was compiling a program the compilation went fine but when I tried to execute the job, it went down saying that DB2 is down. Later I came to know that, DB2 was down for last two hours. I was surprised to know that because if it is so then it should have allowed the compilation too. What can be the reason?
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Pre-compilation when DB2 is down.

Post by zprogrammer »

Execute the job or program?
zprogrammer
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Pre-compilation when DB2 is down.

Post by nicc »

Because the availability of DB2 has nothing to do with the pre-compiler's ability to replace SQL statements with COBOL code. Just like the lack of CICS being available does not prevent the CICS pre-compiler replacing CICS statement with COBOL code.
Regards
Nic
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Pre-compilation when DB2 is down.

Post by Anuj Dhawan »

In agreement with nicc, the DB2 precompiler checks the SQL in the program for errors, it adds working storage areas and source code compatible statements that are used to invoke DB2 and in last all of the SQL statements are extracted from the program source and placed into a member called the DBRM. In doing all this precompiler does not refer to the DB2 catalogue tables. So the fact that DB2 is down, does not hinder the pre-compilation. But at execution time, the story is different.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Pre-compilation when DB2 is down.

Post by zprogrammer »

It should throw error at bind time
zprogrammer
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Pre-compilation when DB2 is down.

Post by nicc »

I doubt if it will "throw" an error at any time - unless on a PC :)
Regards
Nic
Priya
Registered Member
Posts: 50
Joined: Tue Jul 02, 2013 11:43 pm

Re: Pre-compilation when DB2 is down.

Post by Priya »

Thanks all.
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Pre-compilation when DB2 is down.

Post by zprogrammer »

Hi Priya

Just to check did it solve your problem
zprogrammer
Priya
Registered Member
Posts: 50
Joined: Tue Jul 02, 2013 11:43 pm

Re: Pre-compilation when DB2 is down.

Post by Priya »

It compiled well even when the DB2 was down.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”