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

DB2 - Syntax Error Checking


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

New User


Joined: 24 Jan 2006
Posts: 12

PostPosted: Fri May 19, 2006 10:43 am
Reply with quote

Hi All,


Can antbody tell me where exactly the syntax checking will be done
for a cobol-db2 program (i mean whether in the precompilation or in the Bind process.

Great thanks if you give the solution in Advance.


Thanks & Regards
Madhu
Back to top
View user's profile Send private message
psreddy
Currently Banned

New User


Joined: 18 May 2006
Posts: 4

PostPosted: Fri May 19, 2006 10:54 am
Reply with quote

hi madhu,

syntax check will be done in both situations.....
Back to top
View user's profile Send private message
madhugoodboy

New User


Joined: 24 Jan 2006
Posts: 12

PostPosted: Fri May 19, 2006 11:07 am
Reply with quote

Hi PSR,


Can you please explain what exactly will happened on each stage in detail.


Thanks & Regards
Maadhu
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Fri May 19, 2006 12:22 pm
Reply with quote

Hi Madhu,

At the precompile stage the syntax of the SQL statements will not be checked, but if you include the table declarations (DCLGENs) in the program the fields used in the SQL statements are validated, however this's not a syntax checking.

At the bind stage the SQL statements are checked for syntactical correctness and the errors (if any) will be placed in SYSTSPRT. The following things hold a key to resolving the error:

Code:
STATEMENT=1270
SQLCODE=-138 
SQLSTATE=22011

Cheers, Twissi.
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top