SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)

Converting SQL/MP Applications to SQL/MX
Applications
HP NonStop SQL/MX Database and Application Migration Guide540435-005
10-32
Reserved Words
SQL/MP Database Object References
When converting an SQL/MP application to an SQL/MX application, you can continue
using DEFINE names or Guardian physical names to refer to SQL/MP database
objects. When using DEFINE names, make sure to set class MAP DEFINEs in the
development environment before compiling the application. To set DEFINEs, see the
SQL/MX Installation and Management Guide.
In SQL/MX applications, you can use SQL/MP aliases to refer to SQL/MP database
objects. SQL/MP aliases are three-part logical names of the form,
catalog.schema.object. The alias maps to the Guardian physical file of an
SQL/MP database object and is registered in the SQL/MX metadata. In SQL/MX
Release 2.x, the
catalog and schema names must refer to actual catalogs and
schemas in an SQL/MX database. For more information, see the
SQL/MX Reference
Manual.
SQL/MX Database Object References
Unlike SQL/MP database objects, which have Guardian physical names, SQL/MX
database objects have three-part ANSI names of the form,
catalog.schema.object. The catalog and schema names refer to the actual
catalog and schema in which the SQL/MX database objects are registered.
NonStop SQL/MX does not provide an equivalent DEFINE mechanism to map names
in an application to the names of SQL/MX database objects. To refer to SQL/MX
database objects, use unqualified or partially qualified names (that is, without catalog
or schema names), or use PROTOTYPE host variables. However, PROTOTYPE host
variables require you to include database object naming in the application logic. For
more information about PROTOTYPE host variables, see the
SQL/MX Programming
Manual for C and COBOL.
For more information about database object names, see the
SQL/MX Reference
Manual.
Reserved Words
NonStop SQL/MX allows the use of a reserved word as an identifier if you place double
quotes (“) around it and observe case-sensitivity. You are also permitted to use a
reserved word without double quotes around it as a host variable name in an
embedded SQL/MX application.
Determining If Words Without Double Quotes Are Reserved
Words
You can determine if a word without double quotes is a reserved word. From mxci,
enter:
>>table possible-reserved-word;