SQL/MP Version Management Guide
Program Versions
Compaq NonStop™ SQL/MP Version Management Guide—429833-001
5-10
Retrieving SQL Program Versions
For example, suppose that a program named PROGX has been SQL-compiled into a file 
named \SYS1.$VOL1.MYSVOL.PROGX. To retrieve the program’s PFV, you can 
execute these SQLCI commands:
>> VOLUME \SYS1.$VOL1.MYSVOL;
>> GET FORMAT VERSION OF PROGRAM PROGX;
If the format version is 315, the two preceding statements yield:
VERSION: 315
--- SQL operation complete.
Similarly, you can retrieve the catalog version of a program. For example, you can type 
this command to retrieve the catalog version of the PROGX program:
>> VOLUME \SYS1.$VOL1.MYSVOL;
>> GET CATALOG VERSION OF PROGRAM PROGX;
If the catalog version is 1, the two preceding statements yield:
VERSION: 1
--- SQL operation complete.
You cannot use the EXECUTE IMMEDIATE statement with the GET VERSION OF 
PROGRAM statement.
For the syntax of the GET VERSION OF PROGRAM statement and for examples of 
using the statement in a static or dynamic SQL program, see the NonStop SQL/MP 
Reference Manual. 
Using the SQLCI FILEINFO Utility
In version 300 and newer of SQLCI, you can retrieve a program’s PFV and PCV by 
executing a FILEINFO utility command with the DETAIL option set. Versions 1 and 2 
of the FILEINFO statement do not return program version information. 
To retrieve the format and catalog versions of a program named PROGX in version 310 
SLQCI or newer, type:
>> FILEINFO $VOL1.MYSVOL.PROGX, DETAIL;
If the catalog version is 1 and the format version is 315, the result has this format:
$VOL1.MYSVOL.PROGX 15 July 1994, 10:34
ENSCRIBE ( VALID SQL PROGRAM )
CATALOG $VOL1.SQL
PROGRAM CATALOG VERSION 1
PROGRAM FORMAT VERSION 315
TYPE U
CODE 100
EXT ( 20 PAGES, 10 PAGES, MAXEXTENTS 16)
.
.
In the previous example, note that SQLCI returns a program catalog version of 1 and a 
program format version of 315.










