SQL/MP Programming Manual for C

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for C429847-008
6-25
SQL Compiler Listings
SQL Compiler Listings
The SQL compiler writes all SQL statements in the program file to the listing (or OUT)
file. If an error or warning occurs, the compiler includes a message after the statement
that caused the problem. For DML statements, the compiler also includes the
estimated cost of processing the statement, which is a positive integer indicating the
relative cost. The larger the integer, the more CPU time and disk access time required.
Example 6-1 shows a sample SQL compiler listing.
Example 6-1. Sample SQL Compiler Listing (page 1 of 2)
SQL Compiler - T9095D42 - (03JUN96)
COPYRIGHT TANDEM COMPUTERS INCORPORATED 1987-1996
DATE - TIME : 10/04/96 - 16:38:23
Options : NOFORCE, OBJECT, CURRENTDEFINES, RECOMPILE, RECOMPILEALL,
REGISTERON
NOEXPLAIN, COMPILE PROGRAM
SQL - PROGRAM FILE = \NEWYORK.$DISK1.SQLPROG.SQLC
SQL - PROGRAM CATALOG = \NEWYORK.$DATA1.INVENT
SQL - DEFAULT CATALOG = \NEWYORK.$DATA1.INVENT
*******************************************************
SQL - Source File = \NEWYORK.$DISK1.SQLPROG.SQLC
SQL - SLT Index = 0, Run-Unit = __SQLRTDU_00752097902906430808
49 DECLARE GET_SUPPLIER_CURSOR CURSOR FOR
50 SELECT SUPPNUM,
51 SUPPNAME,
52 STREET,
53 CITY,
54 STATE,
55 POSTCODE
56 FROM =SUPPLIER
57 WHERE SUPPNUM = :supplier_of_parts
58 REPEATABLE ACCESS
*** Statistics: Estimated cost: 1
SQL - SLT Index = 0, Run-Unit = abort_transaction
184 ROLLBACK WORK
SQL - SLT Index = 0, Run-Unit = begin
99 BEGIN WORK
SQL - SLT Index = 0, Run-Unit = commit_transaction
163 COMMIT WORK
SQL - SLT Index = 0, Run-Unit = do_add_to_partloc