Question & Answer
Question
What should I consider when I compile COBOL source programs using COBOL for AIX, V3.1 that access Oracle Database 11g Release 1.
Answer
When you use IBM COBOL for AIX to compile source code that contains embedded SQL statements that access an Oracle database, you might receive the messages shown below:
0711-317 ERROR: Undefined symbol: SQLORA
0711-317 ERROR: Undefined symbol: SQLADR
0711-317 ERROR: Undefined symbol: SQLADRUC
0711-317 ERROR: Undefined symbol: SQLBEX
These symbols are routines in the SQL runtime provided by Oracle. You must specify these Oracle libraries on the cob2 command line when you link your application.
For example, to specify that the application you are attempting to build needs to link with the Oracle runtime libraries, enter this command:
cob2 -q64 $ORACLE_HOME/precomp/lib/cobsqlintf.o -L$ORACLE_HOME/lib/ -lclntsh -o program program.cbl
This command assumes that you have the ORACLE_HOME environment set correctly for the path to which you have installed Oracle on your AIX system. The -o option specifies the name of the executable produced by the compiler, and if not specified will default to a.out.
Was this topic helpful?
Document Information
Modified date:
08 August 2018
UID
swg21409672