Page 1 of 1

Why precompile is required

PostPosted: Sun Apr 11, 2010 3:21 pm
by shruti
Why cant we directly compile the COBOL DB2 program?Why precompile is required?

Re: Why precompile is required

PostPosted: Sun Apr 11, 2010 7:37 pm
by dick scherrer
Hello and welcome to the forum,

If your system used the db2 co-processor, a db2 pre-compile would not be necessary.

Suggest you talk with your dba and/or compiler support people as to why you need to pre-compile.

Even though the co-processor is available many/most systems still pre-compile. . .

Re: Why precompile is required

PostPosted: Sun Apr 11, 2010 7:38 pm
by Robert Sample
Because the DB2 statements are not valid COBOL statements (check the COBOL Language Reference manual) and must be converted into valid COBOL statements before the compiler can compile the program.