1 | Default collection name | Input | Char(18) |
2 | Error code | I/O | Char(*) |
The Change Dynamic Default Collection (QSQCHGDC) API defines a default collection for unqualified table names in dynamically prepared statements or in dynamically executed statements. The default collection is defined only for the job issuing the API call. The default collection will take precedence over the naming convention and default collection specified when the SQL program was created.
None.
The name of the default collection. The following values are allowed:
*CURLIB | The current library at the time the API is called is used as the default collection. Subsequent changes of the current library will not change the default collection. If no current library is defined, library QGPL is used. |
*PGM | The default collection is determined by the attributes specified when the SQL program was created. If DYNDFTCOL(*YES) was specified, the default collection is the library name specified on the DFTRDBCOL keyword. If DYNDFTCOL(*NO) was specified, dynamically prepared and executed statements will use the default collection rules based on the naming convention. For further information on naming conventions, see the DB2 Universal Database for iSeries SQL Reference. |
default collection name | The name of the default collection. This value must be uppercase and not delimited. |
The API does not validate the existence or the user's authority to the specified default collection. These validations occur on the execution of subsequent SQL prepare or execute operations.
The structure in which to return error information. For the format of the structure, see Error code parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.
Message ID | Error Message Text |
---|---|
CPF3CF1 E | Error code parameter not valid. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Top | Database and File APIs | APIs by category |