SQL/MX Programming Manual for Java

Program and Module Management
HP NonStop SQL/MX Programming Manual for Java523726-003
6-19
Versioning
Instructions
To build a particular version of an application:
1. Use the OSS add_define command to set up any class MAP DEFINEs if they exist.
For more information, see the SQL/MX Installation and Management Guide.
2. Run the SQLJ translator program and specify the -moduleVersion option on the
command line:
java sqlj.tools.Sqlj -d=mybin1 -dir=myjava1
-moduleVersion=VER1 MyProg.sqlj
3. The SQL/MX compiler produces modules with unique version names:
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.^MYPROGCTX1^^VER1
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.^MYPROGCTX2^^VER1
To build another version of the application from the same SQLJ source file:
1. Use the OSS add_define command to set up any class MAP DEFINEs if they exist.
See the SQL/MX Installation and Management Guide.
2. Run the SQLJ translator program and specify the -moduleVersion option on the
command line:
java sqlj.tools.Sqlj -d=mybin2 -dir=myjava2
-moduleVersion=VER2 MyProg.sqlj
3. The SQL/MX compiler produces modules with unique version names:
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.^MYPROGCTX1^^VER2
/usr/tandem/sqlmx/USERMODULES/CAT.SCH.^MYPROGCTX2^^VER2
After multiple versions of an application, you can execute any of the SQLJ programs in
any order. Before running the SQLJ program, remember to reset the DEFINEs, if they
exist, to the correct set of tables.
Note. During translation, specify unique directories for each version of the application by
using the -d and -dir options. These options ensure that the program files for each
version are not overwritten by program files for the next version of the application. For
more information about these options, see Options for Output Files and Directories
on
page 5-18.
Note. During translation, specify unique directories for each version of the application by
using the -d and -dir options. These options ensure that the program files for each
version are not overwritten by program files for the next version of the application. For
more information about these options, see Options for Output Files and Directories
on
page 5-18.