Pathmaker Programming Guide
Generating NonStop SQL Statements
Creating Services and Servers
067868 Tandem Computers Incorporated 4–65
Check the value stored in T9154-CONCURRENCY-CHECK-RESULT to determine the
result of a concurrency check. The possible values of this variable are:
T9154-OPERATION-SUCCESSFUL
T9154-OPERATION-SQL-ERROR
T9154-ROW-NOT-FOUND
T9154-ROW-CHANGED
If the UPDATE operation fails with a OPERATION-SQL-ERROR, check the standard
condition names to find out the cause of the error.
Usage Considerations for
DELETE Operations
The generated code for a DELETE operation resides in a paragraph named
SQL-DELETE. To use this paragraph, initialize the host variables, then PERFORM the
paragraph of the SQL I/O section that contains the operation. If you request a
concurrency check, you must initialize the host variable with the columns of the row to
be deleted. The result of the concurrency check is stored in T9154-CONCURRENCY-
CHECK-RESULT. The possible values of this variable are:
T9154-OPERATION-SUCCESSFUL
T9154-OPERATION-SQL-ERROR
T9154-ROW-NOT-FOUND
T9154-ROW-CHANGED
As with all SQL operations, you can use the standard Pathmaker condition names for
SQL errors to check the status after the DELETE operation has completed.
Usage Considerations for
INSERT Operations
The generated code for an INSERT operation resides in a paragraph named
SQL-INSERT. To use this paragraph, initialize the host variables, then PERFORM the
paragraph of the SQL I/O section that contains the operation. Initialize columns that
are to have a null value by setting the null indicator. Initialize all other columns with
the appropriate column value.
For relative tables, the INSERT statement includes the ANYWHERE option. For tables
with a system defined primary key, the INSERT statement returns the system
generated key value in the appropriate one of the following variables:
T9154-ENTRY-SEQ-SYSKEY
T9154-RELATIVE-SYSKEY
T9154-KEY-SEQ-SYSKEY
As with all SQL operations, you can use the standard Pathmaker condition names for
SQL errors to check the status after the INSERT operation has completed.
Usage Considerations for
SELECT Operations
The generated code for a SELECT operation resides in a paragraph named
SQL-SELECT. To use this paragraph, initialize the host variables, then PERFORM the
paragraph of the SQL I/O section that contains the operation.