SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)

Assumptions
For the purpose of the examples, suppose that:
Two NonStop server systems, \DEV and \PROD, are connected by an Expand network. For
more information, see the Introduction to Networking for HP NonStop NS-Series Servers.
The development node catalogs and schemas are not visible from the production node and
vice versa. To ensure this, do not use the REGISTER CATALOG statement from either node to
create an empty catalog reference on the other node. For more information, see the “Using
REGISTER CATALOG to Access Objects on Remote Nodes” (page 219).
The program is a single file named myprog.exe for a C, C++, or COBOL program. For
more information about creating a single-file application for deployment, see the SQL/MX
Programming Manual for C and COBOL.
The program is in the OSS directory /usr/bin on the development system, and it will be
moved to a directory of the same name on the production system.
Instructions
To move a program to a production system without re-using its compiled modules:
1. Copy required program files and executables from a directory on the development system to
an OSS directory on the production system:
NOTE: If you generated a module definition file (.m), make sure to copy that file to the
production system as well.
Issue this OSS command to copy the executable of an embedded SQL program in C,
C++, or COBOL to the production system:
cp /E/DEV/usr/bin/myprog.exe \
/E/PROD/usr/bin/
For a list of the program files required for execution, see the SQL/MX Programming Manual
for C and COBOL.
2. If the application refers to SQL/MP tables or views by using DEFINEs, use the OSS add_define
command or the TACL ADD DEFINE command to set up the class MAP DEFINEs in the
production environment. See “Setting DEFINEs” (page 220).
3. If the application refers to SQL/MP tables or views by using SQL/MP aliases, create the
SQL/MP aliases in the production environment. See “Setting SQL/MP Aliases” (page 220).
4. Generate a new module or modules for the program:
For an embedded SQL program in C, C++, or COBOL, run the mxCompileUserModule
utility on the production system to SQL compile an embedded module definition:
mxCompileUserModule myprog.exe
Alternately, run the mxcmp command to SQL compile a module definition file:
mxcmp sqlprog.m
For more information, see the SQL/MX Programming Manual for C and COBOL.
The program is now ready for execution in the production environment.
Moving a Program and Reprocessing Modules Using the mxrpm Tool
When you move a program and its compiled modules to the production system, the query execution
plans undergo a Similarity Check and possible automatic recompilation on execution on the
production system. The SQL/MX executor initiates a Similarity Check because the compile time
definition timestamp of the query execution plan, which is based on tables on the development
system, differs from the runtime definition timestamp of the tables on the production system.
Moving Programs From Development to Production 217