SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide544536-007
11-6
Moving a Program Without Compiled Modules
For hard-coded Guardian names of SQL/MP objects, make sure volume,
subvolume, and file names on the development system are the same as those on
the production system. Omit the node from the object names in the program. The
object names will be qualified with the node of the system on which the statements
are compiled.
If the volume and subvolume names on the development system differ from those
on the production system, omit the volume and subvolume from the SQL/MP
object names in the program. The object names are qualified with the default
volume and subvolume of the system on which the statements are compiled.
°
For embedded SQL programs in C, C++, or COBOL, you can override the
default volume and subvolume of unqualified objects by setting the volume and
subvolume on the command line during SQL compilation of the module
definition:
mxCompileUserModule -d MP_VOLUME=\$vol MP_SUBVOLUME=subvol
myprog.exe
mxcmp -d MP_VOLUME=\$vol MP_SUBVOLUME=subvol sqlprog.m
For hard-coded logical names of SQL/MX objects, make sure that catalog,
schema, and object names on the development system are the same as those on
the production system.
If catalog and schema names on the development system differ from those on the
production system, omit the catalog and schema from SQL/MX object names in the
program. The object names are qualified with the default catalog and schema of
the system on which the statements are compiled.
°
For embedded SQL programs in C, C++, or COBOL, you can override the
default catalog and schema of unqualified objects by setting the catalog and
schema on the command line during SQL compilation of the module definition:
mxCompileUserModule -d CATALOG=cat -d SCHEMA=sch
myprog.exe
mxcmp -d CATALOG=cat -d SCHEMA=sch sqlprog.m
For more information, see name resolution in the SQL/MX Programming Manual for C
and COBOL.
Note. This technique works only for database objects that exist in the same volume and
subvolume. If the program refers to database objects in different volumes and subvolumes,
you must hard code those volumes and subvolumes in the program.
Note. This technique works only for database objects that belong to the same catalog and
schema. If the program refers to database objects in different catalogs and schemas, you
must hard code those catalogs and schemas in the program.