What is a precompiler?

It is a DB2 facility for static SQL statements - it replaces these statements with calls to the DB2 language interface module.

Showing Answers 1 - 3 of 3 Answers

pradipta

  • Feb 4th, 2006
 

Precompilor-:

                  Precompilor's main purpose is to check the syntactical error of COBOL programes which contains embeded SQL statements.It first compiles & then differentiates cobol & DB2 statements.It sends all the DB2 queries to DBRM(database request module) and in that cobol program control makes those query lines as comment lines & issues  CALL statement & that moves to MSC(modified sourse code).

  Was this answer useful?  Yes

Sukanya Srinivas

  • Apr 20th, 2007
 

Precompiler:
1) Checks for SQL syntax in application prgram
2) Copies all the SQL statements into a sepearte member known as DBRM(DataBase Request Module)
3) Comment all the SQL statements
4) Replaces all the SQL statements with corresponding langauge call statements.
5) Finally Puts Timestamp

  Was this answer useful?  Yes

Raghuram

  • Jul 17th, 2007
 

During Pre-compilation :

1. The embedded SQL statements are stripped out.  In the source code they are commented out and instead CALL statements are inserted.

2. Based on the DECLARE TABLE statement, the columns of the tables used in the program are understood and the SQL statements are checked for any syntax errors.

3. The stripped out SQL is transformed into a DBRM with an identical time stamp on both the DBRM and the main source program.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions