SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Simple and Compound Statements
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
5-19
Using PROTOTYPE Host Variables as Table Names
ACCEPT hv-this-jobcode.
...
EXEC SQL
SELECT jobcode, jobdesc
INTO :hv-jobcode, :hv-jobdesc
FROM :hv-tablename PROTOTYPE 'samdbcat.persnl.job'
WHERE jobcode = :hv-this-jobcode END-EXEC.
The columns that you select from a dynamically specified table must be the same as
the columns in the table specified in the PROTOTYPE clause during static compilation.
Otherwise, NonStop SQL/MX returns an error.