Pre-compilation when DB2 is down.
Pre-compilation when DB2 is down.
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?
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?
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: Pre-compilation when DB2 is down.
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
Nic
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Pre-compilation when DB2 is down.
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.
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.
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: Pre-compilation when DB2 is down.
I doubt if it will "throw" an error at any time - unless on a PC
Regards
Nic
Nic
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
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