SQL/MP Programming Manual for C
SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for C—429847-008
5-18
SQLGETCATALOGVERSION
In this example, the SQLCAFSCODE procedure writes the error or warning messages 
to sql_msg_buffer, a buffer declared as 600 bytes:
#include <cextdecs(SQLCATOBUFFER)>
...
EXEC SQL INCLUDE SQLCA;
...
{
 char sql_msg_buffer[600];
 ... 
 SQLCATOBUFFER ((short *) &sqlca, sql_msg_buffer, 600);
}
...
SQLGETCATALOGVERSION
The SQLGETCATALOGVERSION procedure returns the version of a catalog. 
SQLGETCATALOGVERSION returns zero after a successful operation or a nonzero 
value to indicate an error or warning condition. For a description of SQL errors, see the 
SQL/MP Messages Manual.
catalog_name
is the fully qualified name of the catalog for which you are requesting information. 
The name must be
Left justified and padded with spaces on the right 
A maximum of 26 characters 
If you omit catalog_name, SQLGETCATALOGVERSION uses the default 
catalog.
sql_version
is the version of the catalog. For information about versions of NonStop SQL/MP, 
see the SQL/MP Version Management Guide. 
#include <cextdecs(SQLGETCATALOGVERSION)>
short SQLGETCATALOGVERSION (
 [ char *catalog_name ] , /* i */ 
 short *sql_version /* o */ 
 );
Note. Although version 340 SQL/MP software supports the SQLGETCATALOGVERSION 
procedure, HP might not support this procedure in a future RVU. If you are running version 300 
(or later) SQL/MP software, use the GET VERSION OF CATALOG statement to return the 
version of a catalog. For information about this statement, see the SQL/MP Reference Manual. 










