User`s guide
Building and Running a Programmatic Interface Application
5-2 Oracle Database User's Guide
■ Pro*COBOL (COBOL85 and COBOL2000)
Oracle precompilers generate different
SQLLIB
function names for different languages.
The following names are used:
■
SQ0XXX:
COBOL
■
SQ2XXX:
C
5.1.2 PL/SQL
The precompilers support PL/SQL as described in the Oracle Database PL/SQL
Language Reference. When using PL/SQL, you must specify
SQLCHECK=FULL
or
SQLCHECK=SEMANTICS
on the precompiler option line. The default is
SQLCHECK=NONE
.
When requesting
SQLCHECK
, the precompiler must connect to a database. So, ensure
that you provide the necessary connection information. (You may also want to set the
DEFAULT_CONNECTION
variable in the
ORAENV
file).
When
SQLCHECK=SEMANTICS
you must also specify
USERID=username/password
.
5.2 Building and Running a Programmatic Interface Application
Perform the following steps to build and run a programmatic interface application. For
additional details, refer to the specific notes for the programmatic interfaces in this
chapter.
1. Edit your source code, including embedded SQL, as outlined in the generic
precompiler documentation.
2. Pre-process the source with the corresponding pre-processor.
3. Compile the application.
4. Link-edit the application, including the stub module
PROSTUB
from the
PRO.LIB
.
5. Identify the
ORALOAD
library by using a
SET-FILE-LINK
command. (Usually, this is
included in the
ORAENV
procedure).
6. Run the application with the
START-PROG
command. The supporting Oracle
Database user module is dynamically loaded from the
ORALOAD
library.
Note: OCI C and OCI COBOL programs cannot be combined
together; any attempt to do so results in execution errors. The entries
into the Oracle Database used by OCI C and OCI COBOL (for
example, OLOGON) have identical names but different argument lists
(for OCI COBOL, all arguments are by reference, that is, the parameter
list contains all pointers, whereas for OCI C, the numeric arguments
are by value).
Note: You must use WE8BS2000 as client character set during
precompilation (set in
ORAENV
file). Any other character set might lead
to problems with concatenation sign ("||").
You do not need to precompile if you are building an OCI C or an OCI
COBOL application.