SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
D-37
Examples—DEFINEs Used With SQL Programs
Examples—DEFINEs Used With SQL Programs
This example uses the DEFINE name =PARTS to identify a table in an INVOKE 
statement in a COBOL program. The DEFINE for =PARTS must exist when you 
run the preprocessor before the COBOL compilation.
EXEC SQL
 INVOKE =PARTS AS PARTS-REC LEVEL (01,04)
END-EXEC.
This example uses the DEFINE name =PARTS to identify a table in an INSERT 
statement. The DEFINE for =PARTS must exist when you run the program and 
should normally exist when you compile the program.
EXEC SQL
 INSERT INTO =PARTS
 VALUES (:PARTNUM OF PARTS,
 :PARTDESC OF PARTS,
 :PRICE OF PARTS,
 :QTY-AVAILABLE OF PARTS)
END-EXEC.
This example uses the DEFINE name =SCAT in a TACL command that calls the 
SQL compiler. =SCAT identifies the catalog in which to register the compiled 
program. The DEFINE for =SCAT must be in effect when you issue the SQLCOMP 
command.
SQLCOMP /IN object-file, OUT list-file>/ CATALOG =SCAT










