IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

sql syntax checking at precompiled stage to bind stage


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shalem

New User


Joined: 11 Apr 2005
Posts: 8

PostPosted: Mon Apr 11, 2005 9:18 pm
Reply with quote

What is the difference between sql syntax checking at precompiled stage to bind stage
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Mon Apr 11, 2005 10:41 pm
Reply with quote

Precompiler doesn't check the SQL statements for availability, I hope.
Back to top
View user's profile Send private message
shalem

New User


Joined: 11 Apr 2005
Posts: 8

PostPosted: Thu Apr 14, 2005 1:52 pm
Reply with quote

There is difference between syntax checking in Precompiler and Bind.If delimiters surround an SQL statement, the precompiler does a very basic syntax check to make sure that the column and table names are valid (that they're spelled correctly and that the columns and the table exist).This validation is not done by DB2 or its CATALOG.The DB2 Precompiler uses the top part of the DCLGEN to validate the SQL syntax.

BIND, like precompile, must also check the syntax of the SQL, but the BIND check is more sophisticated. Instead of using the top, DECLARE TABLE portion of the DCLGEN, BIND uses the DB2 CATALOG table information to make sure that the column names are valid, that comparisons are numeric-to-numeric, and so on. This second syntax check occurs because you can't trust the one done by the precompiler because the precompiler check used the DCLGEN.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts REXX - Dataset checking in a do forev... CLIST & REXX 6
No new posts CNTL= Command Syntax Documentation CA Products 3
No new posts JCL for pl1 db2 precompile, compile a... JCL & VSAM 4
No new posts Checking the total counts inside a re... JCL & VSAM 5
Search our Forums:

Back to Top