SQL/MP Programming Manual for COBOL85
Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL85—429326-004
6-45
SQL Program File
You can also execute a dynamic GET VERSION OF PROGRAM statement using the
PREPARE and EXECUTE statements as shown in this example:
MOVE "GET HOST OBJECT VERSION OF PROGRAM SQLPROG" TO HV-TEXT.
EXEC SQL
PREPARE DYNAMIC-STATEMENT FROM :HV-TEXT
END-EXEC.
EXEC SQL
EXECUTE DYNAMIC-STATEMENT RETURNING :HV-HOSV
END-EXEC.
You cannot, however, use the GET VERSION OF PROGRAM statement with the
EXECUTE IMMEDIATE statement.
For the syntax of the GET VERSION statement, see the SQL/MP Reference Manual.