A multischema Rdb DBMS file is, in effect, a file with multiple schemas within one physical file and, as such, two part names in a non-multischema file become three part names (that is, the two part name schema.table, where ATTACH ALIAS assigns the schema name, becomes catalog.schema.table). As a result, you can ATTACH a single file (rather than a default plus various aliases).
The Adapter for Rdb does not support multischema Rdb DBMS files for metadata creation. However, if a non-multischema Rdb file is available as a template for tables, synonym creation and data access may be done in much the same way as described previously for multiple Rdb DBMS files (see Completing Setup and Metadata Creation Steps for Multiple Rdb DBMS Files), with the following variations.
For a multischema Rdb DBMS file, you can use either of the following commands for data access at run time
ENGINE SQLRDB SET SERVER multischema_target;
or, as a non-aliased ATTACH command,
SQL RDB ATTACH 'FILENAME multischema_target'; END
With either of these commands the proper TABLENAME= value is rendered in the Access File as a three part name---for example,
which is a name from Rdb's standard multischema example used in non alias mode.
For an explicitly aliased multischema ATTACH command, use the following method. A multischema Rdb DBMS file used with an ATTACH ALIAS command requires (as Rdb's SQL$ requires) that you add a SET QUOTING RULES command to ensure that the execution process for the table is properly referenced. The easiest way to do this is to add the command in the same place as the ATTACH ALIAS command. (Note that you can place the QUOTING RULES command before or after the ATTACH command, but it must be executed before actual data access.)
For example (also using Rdb's multischema example, but in alias mode), add the following code:
SET QUOTING RULES 'SQL92'; END SQL RDB ATTACH 'ALIAS CORP FILENAME CORPORATE_DATA:' ; END
A proper TABLENAME= value is a specially quoted three part name such as:
Note the use of enclosing single quotation marks: these are required because the double quotation marks are considered special characters to be passed to Rdb, which in turn processes the "CORP.ADMINISTRATION" portion properly as the alias due to Rdb's SET QUOTING RULES command, which is used in the profile.