Type of syntax error check in COBOL-DB2 programs

IBM's flagship relational database management system
tjegan
Posts: 33
Joined: Mon Mar 25, 2013 5:58 pm
Skillset: Mainframe skills
Referer: Chan Lee

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.

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

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

User avatar
alexm
Posts: 35
Joined: Wed Oct 13, 2010 6:40 pm
Skillset: DB2, JCL, REXX, ISPF
Referer: google

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.


  • Similar Topics
    Replies
    Views
    Last post