SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Program and Module Management
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
17-21
Grouping
If the environmental variable is set, once for V1 and once for V2, after the entire build
script finishes twice, an executable exists in two subdirectories V1 and V2. These
two module files will coexist:
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.^EMP_CNT_MODULE^^V1
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.^EMP_CNT_MODULE^^V2
Grouping
All the module files that are generated globally on a particular NonStop system are
stored in the /usr/tandem/sqlmx/USERMODULES directory, making it difficult to
identify, or group, the modules that are associated with a particular application. By
using the group attribute for module management, you can match module files to an
application and perform basic file management tasks more easily. For example, you
can list, copy, or delete all the modules associated with the given application by using a
single OSS command.
You can also use the group attribute to create module subsets and perform multiple
DISPLAY USE OF operations in much less time than it would take to run a single
DISPLAY USE OF operation on all the modules. For more information about grouping
modules to run multiple DISPLAY USE OF operations, see the SQL/MX Installation
and Management Guide.
Instead of using the group attribute for globally placed module management, you can
use the locally placed module features to generate modules in directories other than
USERMODULES. For more information on locally placed modules, see Generating
Locally or Globally Placed Modules on page 17-3.
Setting Up Grouping
Grouping requires you to:
•
Use the C/C++ or COBOL preprocessor option -g and specify the same Module-
Group-Specification-String (MGSS) name for each of the modules that
you want to manage as a group.
•
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 \
C