SQL/MP Programming Manual for COBOL85
SQL/MP System Procedures
HP NonStop SQL/MP Programming Manual for COBOL85—429326-004
5-24
SQLGETCATALOGVERSION
To avoid hard-coding the maximum length for the procedure name (NAME-LEN OF 
ERRORS-AND-WARNINGS in this example), perform these steps:
1. Call SQLCAGETINFOLIST and pass item code 6 (the maximum length of 
procedure name).
2. Call SQLCAGETINFOLIST again and pass a buffer of the appropriate size.
SQLGETCATALOGVERSION
The SQLGETCATALOGVERSION procedure returns the version of a catalog. 
catalog-name optional input
PIC X(length)
is the fully qualified file 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.
* Call SQLCAGETINFOLIST. The third parameter is the number 
* of codes you are supplying in item-list. The seventh 
* parameter will cause the program to truncate all names to 
* 32 characters. The ERROR-ITEM parameter receives 
* information about the fifth entry in the errors array.
 ENTER TAL "SQLCAGETINFOLIST" USING
 SQLCA,
 ITEM-LIST,
 4,
 ERRORS-AND-WARNINGS,
 ERR-WARN-SIZE,
 OMITTED,
 32,
 OMITTED,
 OMITTED,
 ERROR-ITEM
 GIVING CALL-ERROR.
ENTER TAL "SQLGETCATALOGVERSION" USING
 [ catalog-name, ]
 sql-version
 GIVING error-info.
Example 5-3. Calling the SQLCAGETINFOLIST procedure (page 2 of 2)










