Statement naming conventions
Identify enforced naming conventions for IBM® i database servers.
The following table provides a summary of the naming conventions enforced by the database server.
Statement naming conventions
Statement | Dynamic SQL | Use an extended dynamic SQL package |
---|---|---|
Local | Statement name must adhere to IBM i naming convention,
although the format of STMTxxxx is suggested Cursor name must adhere to IBM i naming conventions |
Statement name must adhere to IBM i naming convention,
although the format of STMTxxxx is suggested Cursor name must adhere to IBM i naming conventions |
DRDA | Statement name must be in the format of STMTxxxx Cursor name must be in the format: CRSRyyyy for non-scrollable cursors or SCRSRyyyy for scrollable cursors where yyyy is the same as xxxx. |
Statement name must be in the format of Sxxxx Cursor name must be in the format of Cyy for non-scrollable cursors where yy is the same as xxxx and yy is between 1 and 15. |
Notes:
- The naming convention for statement names is not enforced on the local system, so a client application can share prepared statements with a IBM i application using the QSQPRCED system API.
- The server appends a blank to the beginning of any statement name in the format of STMTxxxx. A host application must then append a leading blank to share statements with client applications that use the format STMTxxxx. The server does not append a leading blank if the statement name is not in the format of STMTxxxx.