Previous Topic: Specifying Stem NamesNext Topic: Searched, Cursor, and Table Management Operations


Return Codes from ADDRESS SQL Instructions

ADDRESS SQL instructions produce a return code in REXX variable RC. RC=0 indicates that the requested operation was successful. RC=4 indicates that the requested operation was at least partially successful, but that SQL issued a warning message. RC=8 indicates that the operation failed.

When RC=0, SQLCODE may be set to 0 or 100. An SQLCODE of 0 indicates that the operation was successful. An SQLCODE of 100 also indicates that the operation was successful and that the end-of-file (EOF) was reached as a result of the operation.

When RC=4 or 8, one or more messages are stacked in the External Data Queue (EDQ), and SQLCODE is set to a negative number that identifies the message number of the first message in the queue. For example, when the first queued message is OPS7407E, a second message, OPS7463E, may also be queued; however, SQLCODE is set to -7407.

When RC is greater than 8, it indicates that a problem occurred in the interface to SQL. The nature of the problem is indicated in the following table. EDQ and SQLCODE are not applicable when RC is greater than 8.

Return Code

Description

Program Action/Advice

0

Normal completion

Check SQLCODE for a possible EOF indication.

4

Warning completion

EDQ contains one or more messages describing the warning condition and SQLCODE indicates the number of the first message.

8

An SQL error occurred

EDQ contains one or more messages describing the error condition, and SQLCODE indicates the number of the first message.

20

Interface error

The CA OPS/MVS subsystem is not active.

24

Interface error

A security rule or the security exit has rejected the SQL statement.

28

Interface error

At CA OPS/MVS startup time, a serious SQL database error was encountered. As a result, SQL is unavailable and all requests to it are denied.

40

Interface error

A serious control block error occurred.

50

Interface error

An internal SQL abend occurred.

54

Interface error

An abend occurred in either the security interface routine or the security user exit.

60

Interface error

The CA OPS/MVS product could not find a host variable specified in the SQL statement.

61

Interface error

The SQL statement specified an invalid host variable name.

62

Interface error

The SQL statement specified an invalid host variable name.

63

Interface error

The variable name is invalid because it did not conform to variable naming conventions.

64

Interface error

There is not enough storage to allow access to host variables.

80

Interface error

Invalid system parameter list.