Page 1 of 1

Pre-compilation when DB2 is down.

Posted: Thu Dec 10, 2015 2:13 pm
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?

Re: Pre-compilation when DB2 is down.

Posted: Thu Dec 10, 2015 2:21 pm
by zprogrammer
Execute the job or program?

Re: Pre-compilation when DB2 is down.

Posted: Thu Dec 10, 2015 6:51 pm
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.

Re: Pre-compilation when DB2 is down.

Posted: Fri Dec 11, 2015 10:19 pm
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.

Re: Pre-compilation when DB2 is down.

Posted: Sat Dec 12, 2015 9:14 am
by zprogrammer
It should throw error at bind time

Re: Pre-compilation when DB2 is down.

Posted: Sat Dec 12, 2015 3:48 pm
by nicc
I doubt if it will "throw" an error at any time - unless on a PC :)

Re: Pre-compilation when DB2 is down.

Posted: Tue Dec 15, 2015 10:08 pm
by Priya
Thanks all.

Re: Pre-compilation when DB2 is down.

Posted: Tue Dec 15, 2015 10:51 pm
by zprogrammer
Hi Priya

Just to check did it solve your problem

Re: Pre-compilation when DB2 is down.

Posted: Wed Jul 18, 2018 9:17 am
by Priya
It compiled well even when the DB2 was down.