NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-32
DEFINEs of Class CATALOG
DEFINEs of Class CATALOG
DEFINEs of class CATALOG specify a logical name for a particular SQL catalog. For
example, this SQLCI statement assigns the logical name =PCAT to the catalog that
resides on subvolume \D.$E.F:
ADD DEFINE =PCAT, CLASS CATALOG, SUBVOL \D.$E.F;
The following statement, executed while the preceding DEFINE is in effect, creates a
table on \D.$E.F:
CREATE TABLE T ... CATALOG =PCAT;
A DEFINE of class CATALOG does not change the current default catalog. (You can
change the current default catalog by using the SQLCI CATALOG command or by
altering the =_DEFAULTS DEFINE.)
DEFINEs of Class DEFAULT
The only DEFINE of class DEFAULT of interest to a NonStop SQL/MP user is the
=_DEFAULTS DEFINE, which is a system DEFINE.
The file system uses the =_DEFAULTS DEFINE to save the names of the current
default node, volume, subvolume, and catalog, so that processes can share these names.
When you change your current default node, volume, subvolume, or catalog, the
=_DEFAULTS DEFINE is automatically modified. The values in the =_DEFAULTS
DEFINE determine how to expand partially qualified Guardian names.
You cannot delete or rename the =_DEFAULTS DEFINE, but you can display and alter
the values of its attributes. For example, this ALTER DEFINE command changes the
current default catalog:
ALTER DEFINE =_DEFAULTS, CATALOG \A.$B.C;
See =_DEFAULTS DEFINE on page Z-2 or System DEFINEs on page S-92 for more
information.
DEFINEs of Class MAP
A DEFINE of class MAP associates a DEFINE name with the name of a table, view,
index, collation, partition, or program. You can use the DEFINE name in SQL
statements as the logical name of a table, view, index, collation, partition, or program,
altering the DEFINE (but not the SQL statement) when you want to point to a different
physical entity.
For example, this command adds a DEFINE that assigns the logical name =ORDERS to
the table whose name is \SYS1.$VOL2.SALES.ORDERS:
ADD DEFINE =ORDERS, CLASS MAP, FILE \SYS1.$VOL2.SALES.ORDERS;
While this DEFINE is in effect, you can refer to the table as =ORDERS in SQL
statements.