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

C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
15-52
Deploying a Static SQL Application to an RDF
System
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', '%'));
9. Display and verify the compiled plans of the user modules for the RDF backup
version:
mxci
select * from table(explain('comms.mods.nonstop1mod', '%'));
select * from table(explain('comms.mods.nonstop2mod', '%'));
10. From the development system \robin, transfer the application executable
nonstop.exe to the RDF backup system \indus (for example, into the
/usr/beta directory).
11. As super ID, transfer the application’s modules (comms.mods.nonstop1mod,
comms.mods.nonstop2mod) from the development system to the
/usr/tandem/sqlmx/USERMODULES directory of the RDF backup system.
12. On the RDF backup system \indus, log on as the application operator, set up
DEFINEs, and get ready to take over and run the application nonstop.exe if the
RDF primary system fails:
add_define =debits class=map file=\\indus.$gold.cards.debits
add_define =credits class=map \
file=\\indus.$gold.cards.credits
-- now ready to take over and run nonstop.exe
13. From the development system \robin, transfer the application executable
nonstop.exe to the RDF primary system \APPLE (for example, into the
/usr/alpha directory).
14. As super ID, transfer the application’s modules
(telco.modules.nonstop1mod, telco.modules.nonstop2mod) from the