sqledcgd API - Change a database comment in the system or local database directory
Scope
This API only affects the database partition server on which it is issued.
Authorization
- SYSADM
- SYSCTRL
Required connection
None
API include file
sqlenv.h
API and data structure syntax
SQL_API_RC SQL_API_FN
sqledcgd (
_SQLOLDCHAR * pDbAlias,
_SQLOLDCHAR * pPath,
_SQLOLDCHAR * pComment,
struct sqlca * pSqlca);
SQL_API_RC SQL_API_FN
sqlgdcgd (
unsigned short CommentLen,
unsigned short PathLen,
unsigned short DbAliasLen,
struct sqlca * pSqlca,
_SQLOLDCHAR * pComment,
_SQLOLDCHAR * pPath,
_SQLOLDCHAR * pDbAlias);
sqledcgd API parameters
- pDbAlias
- Input. A string containing the database alias. This is the name that is cataloged in the system database directory, or the name cataloged in the local database directory if the path is specified.
- pPath
- Input. A string containing the path on which the local database
directory resides. If the specified path is a null pointer, the system
database directory is used.
The comment is only changed in the local database directory or the system database directory on the database partition server on which the API is executed. To change the database comment on all database partition servers, run the API on every database partition server.
- pComment
- Input. A string containing an optional description of the database. A null string indicates no comment. It can also indicate no change to an existing database comment.
- pSqlca
- Output. A pointer to the sqlca structure.
sqlgdcgd API-specific parameters
- CommentLen
- Input. A 2-byte unsigned integer representing the length in bytes of the comment. Set to zero if no comment is provided.
- PathLen
- Input. A 2-byte unsigned integer representing the length in bytes of the path parameter. Set to zero if no path is provided.
- DbAliasLen
- Input. A 2-byte unsigned integer representing the length in bytes of the database alias.
Usage notes
New comment text replaces existing text. To append information, enter the old comment text, followed by the new text.
Only the comment for an entry associated with the database alias is modified. Other entries with the same database name, but with different aliases, are not affected.
If the path is specified, the database alias must be cataloged in the local database directory. If the path is not specified, the database alias must be cataloged in the system database directory.
REXX API syntax
CHANGE DATABASE database_alias COMMENT [ON path] WITH comment
REXX API parameters
- database_alias
- Alias of the database whose comment is to be changed.
To change the comment in the system database directory, it is necessary to specify the database alias.
If the path where the database resides is specified (with the path parameter), enter the name (not the alias) of the database. Use this method to change the comment in the local database directory.
- path
- Path on which the database resides.
- comment
- Describes the entry in the system database directory or the local database directory. Any comment that helps to describe the cataloged database can be entered. The maximum length of a comment string is 30 characters. A carriage return or a line feed character is not permitted. The comment text must be enclosed by double quotation marks.