SQL/MX 2.x Reference Manual (H06.04+)

Embedded-Only SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
3-65
Considerations for INVOKE
Considerations for INVOKE
Preserving or Overriding the INVOKE Directive
The preprocessor expands the table or view name in the INVOKE directive to a fully
qualified object name, such as [\node.][[$volume.]subvol.]filename for a
Guardian physical name or catalog.schema.object for an ANSI logical name.
Expansion of the name depends on how the name is qualified in the INVOKE directive
and how you have declared object names in the program. The preprocessor either
overrides the name in the INVOKE directive with the object name declaration or
preserves the qualified name in the INVOKE directive.
For more information on whether the preprocessor preserves or overrides the INVOKE
directive for Guardian physical names, see DECLARE MPLOC Declaration on
page 3-28. For more information on whether the preprocessor preserves or overrides
the INVOKE directive for ANSI logical names, see DECLARE NAMETYPE Declaration
on page 3-31 and DECLARE SCHEMA Declaration on page 3-32.
Using DEFINE Names in the Windows NT Environment
To preprocess an embedded SQL program that uses a DEFINE in the INVOKE
directive in the Windows NT environment, you must set an environment variable for the
DEFINE:
1. At the Windows NT prompt, type:
set tab_envar =[\node.]$vol.subvol.table
2. In the INVOKE directive, use the name of the environment variable as the DEFINE
name:
EXEC SQL INVOKE =tab_envar AS tab_type;
The preprocessor then expands the INVOKE directive:
EXEC SQL INVOKE [\node.]$vol.subvol.tablename AS tab_type;
SYSKEY Column
If the table that you specify in the INVOKE directive does not contain a user-defined
primary key, the INVOKE directive includes the SYSKEY column in the structure or
record that it generates. Otherwise, SYSKEY is omitted from the INVOKE-generated
structure or record.
Authorization Requirements
To use INVOKE on a table or view, you must have SELECT privileges on all the
columns.