TNS/E Native Application Conversion Guide
OSS API and Utilities Conversion Tasks
TNS/E Native Application Conversion Guide—529659-003
11 - 6
Specifying Files in the Guardian File System (/G)
Specifying Files in the Guardian File System
(/G)
To specify files in the Guardian file system, use OSS pathname syntax
(/G/volume/subvol/file). Product versions of the TNS c89 utility prior to D40 do
not require files in the Guardian file system to be identified with a suffix. (The OSS file
system requires files to be identified with a suffix.) D40 and later versions of the TNS
c89 utility and the H-series native c89 and c99 utilities require a suffix. For example,
/G/MYVOL/MYSUBVOL/FILE.c
identifies the Guardian source file FILEC (in the Guardian environment, the suffix
becomes the last character of the filename).
Therefore, when converting TNS programs written prior to D40, you must add the
correct suffix to files in the Guardian file system (if it is not already present). For a list of
valid file suffixes, see either the c89(1) or c99(1)reference page online or in the
Open System Services Shell and Utilities Reference Manual
.
Specifying SQL Compilation
As noted in Table 11-2, the TNS and TNS/E native c89 utilities use different flags to
run the SQL compiler. The required changes are shown in this 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
Compiling and Linking for Pthreads
When compiling a TNS program on a TNS/R system using T1248 pthreads and the
C++ exception handling mechanism, you need to explicitly link the object
/usr/lib/sptcpp.o. to ensure that exception handling continues to work with all
C++ versions. However, for programming in native C++ on a TNS/E system, linking
/usr/lib/sptcpp.o is not necessary.










