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-49
Deploying a Static SQL Application to an RDF
System
This step generates the application executable object file sprog.
5. Set up needed class MAP DEFINEs (none in this case), and run the SQL/MX
compiler only on the module definitions that have not yet been compiled or that
have changed recently:
mxCompileUserModule -e -v -d CATALOG=harvest -d \
SCHEMA=second \
/usr/meas/sprog {cat.sch.s1m,cat.sch.s2m,cat.sch.s3m}
This step generates plans that reference tables named harvest.second.seeds,
harvest.second.trees, and harvest.second.crops.
6. Set up needed DEFINEs (none in this case), and run and test the program.
sprog
7. Find the next bug and fix the offending source (for example, s1.sql), and repeat
Step 1 to Step 6 for s1.sql only. Specifically, compile only the cat.sch.s1m
module definition in Step 5:
mxCompileUserModule -e -v -d CATALOG=harvest -d \
SCHEMA=second \
/usr/meas/sprog {cat.sch.s1m}
8. Repeat Step 1 to Step 7 until the program is ready for deployment or until you
cannot find any more bugs, whichever comes first. Transfer the program to its
target deployment NonStop system (for example, \batman):
/usr/prod/sprog.
9. Set up needed DEFINEs (none in this case), and run the SQL/MX compiler on the
application executable:
mxCompileUserModule -e -v -d CATALOG=bread -d \
SCHEMA=basket /usr/prod/sprog
This step generates plans that reference tables named bread.basket.seeds,
bread.basket.trees, and bread.basket.crops in the modules named
cat.sch.s1m, cat.sch.s2m and cat.sch.s3m.
10. Set up needed DEFINEs (none in this case), and run and test the program:
/usr/prod/sprog
Deploying a Static SQL Application to an RDF System
This example shows a method to develop and deploy a static SQL C/C++ application
in an SQL/MX Release 2.x RDF system. In SQL/MX Release 2.x, the RDF primary
system’s SQL/MX catalog and schema names might be different from the
corresponding SQL/MX catalog and schema names on the backup system.
Suppose that you want to do all development and module compilations only on the
development system, and you do not want to do module compilations on the RDF
systems if possible. Suppose that you have all your data in SQL/MP tables. To get data