What is DB2 precompiler process and why we need it?

All sort of Mainframes Interview Questions.
Post Reply
E377878
Registered Member
Posts: 10
Joined: Mon Aug 19, 2013 8:24 pm

What is DB2 precompiler process and why we need it?

Post 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,
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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).
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post 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.
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.
E377878
Registered Member
Posts: 10
Joined: Mon Aug 19, 2013 8:24 pm

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

Post by E377878 »

Thanks Robert and Anuj.

This answer helps, though, I'd wait for long reply too Anuj .. :D
E377878
Registered Member
Posts: 10
Joined: Mon Aug 19, 2013 8:24 pm

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

Post by E377878 »

E377878 wrote:This answer helps, though, I'd wait for long reply too Anuj .. :D
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 “Interview Questions.”