SQL/MX Programming Manual for C and COBOL (H06.10+, J06.03+)

C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL544617-003
15-57
Deploying a Static SQL Application to an RDF
System
For TNS/E native applications:
cd /usr/primary
add_define =debits class=map \
file=\\robin.$data07.ccards.debits
add_define =credits class=map \
file=\\robin.$data17.ccards.credits
mxsqlc nonstop1.sql -c nonstop1.cpp -g \
moduleSchema=telco.modules
mxsqlc nonstop2.sql -c nonstop2.cpp -g \
moduleSchema=telco.modules
c89 -I /usr/tandem/sqlmx/include -c nonstop1.cpp
c89 -I /usr/tandem/sqlmx/include -c nonstop2.cpp
eld -verbose /usr/lib/ccplmain.o nonstop1.o nonstop2.o
-o nonstop.exe -lzcppcdll -lzcpp2dll -lztlh7dll \
-lzcredll -lzcrtldll -lzosskdll -lzi18ndll \
-lzicnvdll -lzclidll
mxCompileUserModule -d SIMILARITY_CHECK=on -d \
AUTOMATIC_RECOMPILATION=on nonstop.exe
For TNS/R native applications:
cd /usr/primary
add_define =debits class=map \
file=\\robin.$data07.ccards.debits
add_define =credits class=map \
file=\\robin.$data17.ccards.credits
mxsqlc nonstop1.sql -c nonstop1.cpp -g \
moduleSchema=telco.modules
mxsqlc nonstop2.sql -c nonstop2.cpp -g \
moduleSchema=telco.modules
c89 -I /usr/tandem/sqlmx/include -c nonstop1.cpp
c89 -I /usr/tandem/sqlmx/include -c nonstop2.cpp
nld -elf -set systype oss -set highpin off \
-set highrequestor on -set inspect on -obey \
/usr/lib/libc.obey -set saveabend on \
/usr/lib/crtlmain.o nonstop1.o nonstop2.o \
-l zcplsrl -l zcrtlsrl -l zcresrl -l zcplosrl -l ztlhgsrl \
-l ztlhosrl -Bdynamic -l zclisrl -o nonstop.exe
mxCompileUserModule -d SIMILARITY_CHECK=on -d \
AUTOMATIC_RECOMPILATION=on nonstop.exe
7. Run and test both versions of the application nonstop.exe.
8. Display and verify the compiled plans of the user modules for the RDF primary
version:
mxci
select * from table(explain \
('telco.modules.nonstop1mod', '%'));
select * from table(explain \
('telco.modules.nonstop2mod', '%'));