SQL/MX 3.2 Programming Manual for C and COBOL (H06.25+, J06.14+)

Program and Module Management
HP NonStop SQL/MX Release 3.2 Programming Manual for C and COBOL663854-002
17-14
Targeting
Using the Guardian or OSS DEFINE name
To specify the search locations of the module files using the Guardian or OSS DEFINE
name, complete the following steps:
1. Enter the Guardian or OSS DEFINE name. For example,
_MX_MODULE_SEARCH_PATH.
2. Ensure that the DEFINE class is SEARCH. You can specify the module file
locations of SEARCH using SUBVOL0-20 or RELSUBVOL0-20 or both attributes.
The following examples illustrate how you can specify the search locations for
Guardian Define:
Single search location
add define =_MX_MODULE_SEARCH_PATH, class search, subvol0
$DATA01.USRMODS
Multiple search locations
add define =_MX_MODULE_SEARCH_PATH, class search, subvol0
($DATA01.USRMOD1,$DATA02.USRMOD2)
The following examples illustrate how you can specify the search locations for OSS
Define:
Single search location
add_define =_MX_MODULE_SEARCH_PATH class=SEARCH
SUBVOL0=\$data04.EDGU
Multiple search locations
add_define =_MX_MODULE_SEARCH_PATH class=SEARCH
RELSUBVOL0=\(\$data04.ord2m1,\$data05.relchk,\$data03.ord2m2\
)
Using the OSS environment variable
You can use the OSS environment variable, _MX_MODULE_SEARCH_PATH, to specify
the search locations for the module files.
For example,
export _MX_MODULE_SEARCH_PATH=/home/usermodule1:
/home/usermodule2
Targeting
By using the target, or table set, attribute for module management, you can create
applications that target different sets of database objects (that is, tables, views, and so
on) from a single embedded SQL source file without changing the source code, the
default catalog or schema, or the MODULE directive. In the embedded SQL source