Generating a Master and Access File Using the CREATE SYNONYM Command
You can generate a synonym (Master and Access File) for a relational data source using the CREATE SYNONYM command.
Generate a Master and Access File Using the CREATE SYNONYM Command
CREATE SYNONYM [appname/]mastername [DROP] FOR tablename DBMS adapter [AT connection] [NOCOLS] [STOREDPROCEDURE PARMS "parm1[, parm2, ... parmn"] ] END
where:
Is the application folder in which to generate the synonym.
Is the name of the resulting synonym.
Deletes an existing synonym with the same name, if one exists, and generates the new synonym.
Is the name of the table for which the synonym is being generated.
Is the relational adapter for which the synonym is being generated.
Is the name of the connection for the adapter.
Creates a synonym with no columns in it and, at run time, queries the systems tables to see what columns are available.
Is required for creating a synonym for a stored procedure.
Is the list of parameter values being sent to the stored procedure.
- An input parameter is a literal value, enclosed in single quotation marks (for example, 125, 3.14, 'abcde'). You can use reserved words as input. Unlike character literals, reserved words are not enclosed in quotation marks (for example, NULL). Input is required.
- An output parameter is represented as a question mark (?). You can control whether output is passed to an application by including or omitting this parameter. If omitted, this entry will be an empty string (containing 0 characters).
- An INOUT parameter consists of a question mark (?) for output and a literal for input, separated by a slash (/). (For example: ?/125, ?/3.14, ?/'abcde'.) The out value can be an empty string (containing 0 characters).
For an example of creating and using a synonym for a stored procedure, see Adapter for DB2 Stored Procedure Support (CLI Only).