TNS/R Native Application Migration Guide

Open System Services (OSS) API and Utilities
Migration Tasks
TNS/R Native Application Migration Guide523745-001
10-4
Specifying SQL Compilation
Specifying SQL Compilation
As noted in Table 10-1 on page 10-3, the TNS and native c89 utilities use different
flags to run the SQL compiler. The required changes are best shown in an example:
To compile a program with embedded SQL using the TNS c89 utility, specify the
SQL pragma in the -Wccom flag and the -Wsql flag to run the SQL compiler, as
follows:
c89 -Wccom="sql(sqlmap,release2)"
-Wsql="compile program" prog.c
To compile a program with embedded SQL using the native c89 utility, specify the
SQL pragma with a -Wsql flag and the -Wsqlcomp flag to run the SQL compiler,
as follows:
c89 -Wsql="sqlmap,release2"
-Wsqlcomp="compile program" prog.c
-Wcfront cfront function performed
by component of native
compilers.
Replace with -WP flag. No arguments
can be passed.
Most -Wcfront arguments (such as
pragmas) have corresponding native c89
flags. Specify corresponding c89 flags.
See c89(1) reference pages for details.
-Wcprep cprep function performed
by component of native
compilers.
Replace with -WP flag. No arguments
can be passed.
Most -Wcprep arguments (such as
pragmas) have corresponding native c89
flags. Specify corresponding c89 flags.
See c89(1) reference pages for details.
-Wnobind nld utility used instead of
Binder for native programs.
Replace with -Wnolink flag.
-Wrunlib Native compilers cannot
specify user library.
Specify user library with a
-Wnld="-libnamelibrary" flag.
-Wsql -Wsql now implements
SQL pragma.
Replace with -Wsqlcomp flag. See
Specifying SQL Compilation
on
page 10-4 for details.
-Wverbose VERBOSE pragma not
supported by native
compilers.
Remove flag or replace with -Wv flag.
Table 10-1. Changes Required to Use Native C Compilation System (page 2 of 2)
Changed TNS
c89 Utility Flag Reason for Change Action Required