Page 1 of 1

What is DB2 precompiler process and why we need it?

Posted: Sat Sep 14, 2013 7:38 pm
by E377878
Hi,

In a recent interview I've been asked this - What is DB2 precompiler process and why we need it?

I got an answer like that to have the SQL part separate we'd need precompiler but I need to more about it. Can someone please explain.

Regards,

Re: What is DB2 precompiler process and why we need it?

Posted: Sat Sep 14, 2013 7:54 pm
by Robert Sample
Google is your friend. Googling db2 precompile returns about 36,300 hits and in the summary of one of the hits on the first page is
The DB2 precompiler scans a program and copies all of the SQL statements and host variable information into a DBRM (database request module).

Re: What is DB2 precompiler process and why we need it?

Posted: Sat Sep 14, 2013 10:44 pm
by Anuj Dhawan
For a quick short answer this might help - Pre-compile (precompile) creates the DBRM, as Robert has also said. DBRM is optimized and a set of access paths is created. This is called a package. Then, the package is added to a BIND PLAN. PLAN can be a group of packages, however, in any case - it allows to create a "search path" for the user program/s.

I'll try to come back with a longer answer later.

Re: What is DB2 precompiler process and why we need it?

Posted: Sun Sep 22, 2013 5:34 pm
by E377878
Thanks Robert and Anuj.

This answer helps, though, I'd wait for long reply too Anuj .. :D

Re: What is DB2 precompiler process and why we need it?

Posted: Fri May 23, 2014 3:07 pm
by E377878
E377878 wrote:This answer helps, though, I'd wait for long reply too Anuj .. :D