SQL/MX 3.1 Programming Manual for C and COBOL (H06.23+, J06.12+)

Program and Module Management
HP NonStop SQL/MX Release 3.1 Programming Manual for C and COBOL663854-001
17-24
Grouping
Use meaningful names for grouping your module file.
Grouping Example: C INVENTORY modules
In this example, a C application is built from two modules: reports.sql and
utils.sql. mxsqlc names the C and module definition file output file according to
default rules. At this point, INVENTORY is used as the group name for all the modules
in an inventory application, enabling the module files to be referred to by group name.
mxsqlc reports.sql -g moduleGroup=INVENTORY
mxsqlc utils.sql -g moduleGroup=INVENTORY
c89 -o reports.o reports.c
c89 -o utils.o utils.c
nld -set systype oss \
-obey /usr/lib/libc.obey \
/usr/lib/crtlmain.o \
reports.o \
utils.o \
-l zcplsrl \
-l zcrtlsrl \
-l zcresrl \
-l zcplosrl \
-l ztlhgsrl \
-l ztlhosrl \
-Bdynamic \
-l zclisrl \
-o invrep
/G/system/system/mxcmp reports.m
/G/system/system/mxcmp utils.m
After the application is built, these two module files exist:
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.INVENTORY^REPORTS^^
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.INVENTORY^UTILS^^
Now, all the application’s module files can be referred to by using one OSS file name
wild-card pattern:
ls /usr/tandem/sqlmx/USERMODULES/*.*.INVENTORY^*
rm /usr/tandem/sqlmx/USERMODULES/*.*.INVENTORY^*
Grouping Example: COBOL INVENTORY modules
In this COBOL example, an application is built from two modules, reports.ecbl and
utils.ecbl. mxsqlco names the COBOL and module definition file output according
to default rules. At this point, INVENTORY is used as the group name for all the
modules in an inventory application, enabling the module files to be referred to by
group name.
mxsqlco reports.ecbl -g moduleGroup=INVENTORY
mxsqlco utils.ecbl -g moduleGroup=INVENTORY
C
COBOL