Problem:
Compiling a SQL application as follows :
cob -V myapp.cbl -C anim "P(COBSQL) MAKESYN CSQLT=ORACLE DEB end-c DECLARE_SECTION=YES COMP5=NO VARCHAR=YES p(cp) endp endp"
the following error is returned:
28 EXEC SQL INCLUDE SQLCA END-EXEC.
* 149-S********
** No SQL directives have been set
Resolution:
There are two issues here:
1. The Cobsql precompiler ships in lower case on UNIX.
2. Cob will manipulate options delimited with "=" characters, as documented within the Server Express User's Guide, Chapter 9, within the section entitled "Specifying cob Options".
To resolve these issues :
1. Specify Cobsql in lower case
2. Delimit the Cobsql and Pro*COBOL options with ==, rather than =
Therefore, the correct command line to use is :
cob -V myapp.cbl -C anim "P(cobsql) MAKESYN CSQLT==ORACLE DEB end-c DECLARE_SECTION==YES COMP5==NO VARCHAR==YES p(cp) endp endp"