Type of syntax error check in COBOL-DB2 programs



IBM's flagship relational database management system

Type of syntax error check in COBOL-DB2 programs

Postby tjegan » Mon Jun 22, 2015 10:24 am

In a COBOL-DB2 program,
1. Precompiler is responsible for checking syntax errors of DB2 statements.
2. Bind also used to check the syntax errors of DB2 statements.

Query: Can any one please let me know what exactly, the sytem will check for errors
during precomilation and Bind.

Also please let us know some examples for each.
tjegan
 
Posts: 34
Joined: Mon Mar 25, 2013 5:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Type of syntax error check in COBOL-DB2 programs

 

Re: Type of syntax error check in COBOL-DB2 programs

Postby NicC » Mon Jun 22, 2015 2:46 pm

No idea without reading it up but...the pre-compiler does more than 'syntax-check' it replaces your SQL code with COBOL/host-language code. Check the output from the prcompiler. And I do not know if BIND checks the syntax of your SQL code.
You will find better information in the DB2 manuals/redbook.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Type of syntax error check in COBOL-DB2 programs

Postby alexm » Mon Jun 22, 2015 4:31 pm

Re Precompiler: I cannot point you to a document including detailled answers to your questions,
however, to get an idea you may have a look at the precompiler generated DSNH messages.
User avatar
alexm
 
Posts: 33
Joined: Wed Oct 13, 2010 6:40 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post