gtpa3m17Application Requester User's Guide

Appendix A. TPFAR SQLCODEs

This appendix lists all SQLCODEs that are set by TPF Application Requester (TPFAR), as well as their corresponding SQLSTATEs. For SQLCODEs set by the application server (AS), for example DB2, see the messages and codes manual for that particular AS. The originator of the SQLCODE (the product identifier) is indicated in the SQLERRP field of the Structured Query Language communications area (SQLCA).

SQLCODE is a signed integer value representing the disposition of the executed SQL statement. Normally, SQLSTATE should be used to check the execution of an SQL statement. The application program checks for different classes of errors by examining the first character of the SQLSTATE. Because the SQLSTATE is product independent, the explanations are common for all platforms. The SQLCODEs are product specific and generally provide more detailed information than SQLSTATE.

When more than one SQLSTATE is listed for a particular SQLCODE, examine the SQLSTATE field in the SQLCA to identify the specific reason for the SQLCODE.

When the system action indicates that the program has been put in a connectable state because of a system error, the LU 6.2 conversation to the AS has been deallocated and an implied rollback has been done on the current unit of work.


0

SQLSTATE: 00000

Explanation: The last SQL statement executed without any errors.

System Action: Processing continues.

System Programmer Response: None.

SQLSTATE: 01501

Explanation: The value of a string was truncated when assigned to a host variable. The column size on the AS may have changed since the application was written and the size of the host variable may need to be increased.

System Action: SQLWARN1 in the SQLCA is set. The truncated value was placed in the host variable.

System Programmer Response: Check the definitions on the AS with the host variable length.

SQLSTATE: 01503

Explanation: The number of result columns is greater than the number of host variables provided. Columns may have been added to the table on the AS since the application was written.

System Action: SQLWARN3 in the SQLCA is set. The columns that had host variables defined are returned.

System Programmer Response: Ensure that the application is still compatible with the table on the AS.


+100

SQLSTATE: 02000

Explanation: No data. The statement was executed but no data was found.

System Action: No data is returned.

System Programmer Response: None.


+180

SQLSTATE: 01534

Explanation: The string representation of a datetime value returned by the AS is invalid. The application had a host variable defined as a time, timestamp, or date, but the data returned by the AS was the wrong size to fit in this type of host variable.

System Action: The host variable is set to null.

System Programmer Response: Check the definitions in the application and on the AS to correlate the data types.


+183

SQLSTATE: 01535

Explanation: The string representation set up as a host variable is too short to hold the datetime value returned by the AS. The AS returned a variable defined as a time, timestamp, or date, but the host variable defined in the application was too small to fit the data in.

System Action: The host variable is set to null.

System Programmer Response: Check the definitions in the application and on the AS to correlate the data types.


+802

SQLSTATE: 01519

Explanation: The numeric value received from the AS was not in the valid range.

System Action: The host variable is set to null.

System Programmer Response: Check the AS to see the value sent and verify its size.


+863

SQLSTATE: 01539

Explanation: In response to TPFAR's CONNECT request, the AS sent coded character set identifiers (CCSIDs) for double or mixed-byte character sets. Because TPFAR does not support double- or mixed-byte character sets, a warning is given. If actual double or mixed-byte data is received in subsequent processing, a dump is taken.

System Action: The connection is established.

System Programmer Response: Verify that the AS should return double or mixed-byte character sets.


-180

SQLSTATE: 22007

Explanation: The string representation of a datetime value returned by the AS is invalid. The application had a host variable defined as a time, timestamp, or date, but the data returned by the AS was the wrong size to fit in this type of host variable.

System Action: The host variable is not set.

System Programmer Response: Check the definitions in the application and on the AS to correlate the data types.


-183

SQLSTATE: 22008

Explanation: The string representation set up as a host variable is too short to hold the datetime value returned by the AS. The AS returned a variable defined as a time, timestamp, or date, but the host variable defined in the application was too small to fit the data in.

System Action: The host variable is not set up.

System Programmer Response: Check the definitions in the application and on the AS to correlate the data types.


-302

SQLSTATE: 22510

Explanation: A NULL terminated input host variable did not contain a NULL. This error probably occurred because a host variable did not contain a NULL character within the first table column size number of characters of the host variable.

System Action: The statement cannot be executed. A dump is taken. The program state is not changed.

System Programmer Response: Investigate why there is no NULL character in the host variable.


-303

SQLSTATE: 22509

Explanation: A value could not be assigned to a host variable because the data types are incompatible.

System Action: The value is set to null, if it is a nullable value.

System Programmer Response: Ensure that the host data type and the data type on the AS are compatible.


-305

SQLSTATE: 22002

Explanation: A null value could not be assigned to a host variable because no indicator variable was specified.

System Action: The variable is not set up.

System Programmer Response: Set up an indicator variable for the variable in question, or change the definition on the AS to NOT NULL.


-332

SQLSTATE: 57017

Explanation: Character translation is not defined. The data returned by the AS is of a different code character set identifier (CCSID) than specified in the SQL Database Management System Directory (SDD). TPFAR does not support character translation.

System Action: The statement cannot be executed. A dump is taken. If the failing statement was a CONNECT, the program is left in an unconnected but connectable state, otherwise the program remains in a connected state.

System Programmer Response: Determine why the data is a different CCSID. If all data from this AS is the same single-byte CCSID, and the application is capable of handling this CCSID, then update the SDD entry for this AS.


-501

SQLSTATE: 24501

Explanation: The cursor specified by the last SQL statement is not open. COMMIT closes all cursors that did not specify the HOLD option and ROLLBACK closes all cursors. Error conditions on prior SQL statements may also close cursors.

System Action: Statement cannot be executed.

System Programmer Response: Determine why the cursor is not open.


-502

SQLSTATE: 24502

Explanation: The cursor specified by the OPEN statement is already open.

System Action: Statement cannot be executed. The cursor state is unchanged.

System Programmer Response: Determine why the application attempted to open a cursor that is already open.


-522

SQLSTATE: 54014

Explanation: An OPEN statement was executed when the maximum number of concurrent cursors have already been opened by this ECB.

System Action: The cursor was not opened.

System Programmer Response: Examine the application to determine why multiple cursors are open.


-752

SQLSTATE: 51011

Explanation: A CONNECT statement was executed while the ECB is not in a connectable state. The ECB is connectable if no prior SQL statements have been executed or if the last SQL statement was a CONNECT, COMMIT, or ROLLBACK. All other SQL statements take the ECB out of a connectable state, even if the statement fails.

System Action: Statement cannot be executed. The ECB remains not connectable.

System Programmer Response: Determine by the ECB is not in a connectable state.


-802

SQLSTATE: 22003

Explanation: The numeric value received from the AS was out of the supported range.

System Action: The host variable was not set up.

System Programmer Response: Determine why the mismatch occurred. The program may be out of date.


-809

SQLSTATE: 54018

Explanation: The data length would exceed the maximum block size. The data cannot be sent.

System Action: The statement cannot be executed. A dump is taken. The program state is not changed.

System Programmer Response: Try to reduce the number of columns or the size of the fields. Use multiple statements to send the data.


-901

SQLSTATE: 58004

Explanation: An internal error occurred.

System Action: The statement cannot be executed. A dump is taken. The program is left in a connected state.

System Programmer Response: Check the dump for the exact cause of the error.


-902

SQLSTATE: 58005

Explanation: An internal error occurred.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the dump for the exact cause of the error. Check the primary and secondary TPF/APPC return codes if a communications error occurred. (See TPF General Macros for more information about return codes for the TPPCC macro.)


-922

SQLSTATE: 42505

Explanation: The remote AS did not have the communication database set up to be accessed by TPFAR.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the SYSIBM.SYSLUNAMES and SYSIBM.SYSUSERNAMES table on the remote AS for the definition needed for TPFAR. See the TPF Application Requester User's Guide for information about definitions needed.


-923

SQLSTATE: 57015

Explanation: The remote AS did not like a parameter in the TPPCC ALLOCATE issued by TPFAR.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the secondary return code in the dump for the specific reason for the problem. (See TPF General Macros for more information about return codes for the TPPCC macro .)


-949

SQLSTATE: 58024

Explanation: A TPF/APPC error with an unknown primary or secondary return code was received.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the dump for the exact cause of the error. Check the primary and secondary TPF/APPC return codes. (See TPF General Macros for more information about return codes for the TPF/APPC macros.)


-951

SQLSTATE: 58024

Explanation: The conversation has failed because of a LU 6.2 protocol error.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Check for a LU 6.2 dump relating to the protocol error.


-953

SQLSTATE: 58024

Explanation: A timeout or system error occurred on the LU6.2 session.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Check the cause of the LU 6.2 timeout.


-1013

SQLSTATE: 52005

Explanation: The server name is undefined. The specified RDB name could not be found in the SDD. An AS must be defined in the SDD before it can be accessed.

System Action: The CONNECT cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Determine why the AS is not in the SDD. The SDD is processor and subsystem unique. If the specified relational database (RDB) is valid, add it to the SDD of the appropriate processor and subsystem.


-1024

SQLSTATE: 51007

Explanation: A CONNECT must be the first SQL statement to be executed. TPFAR does not support a default connection or an implied CONNECT.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Determine why a CONNECT was not issued previously.


-30000

SQLSTATE: 58008

Explanation: A distributed protocol error occurred.

System Action: The statement cannot be executed. A dump is taken. The program remains in a connected state.

System Programmer Response: Check the dump for the specific DDM command returned and any associated information to determine the cause of the error.


-30020

SQLSTATE: 58009

Explanation: A distributed protocol error occurred.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the dump for the specific DDM command returned and any associated information to determine the cause of the error.


-30021

SQLSTATE: 58010

Explanation: Manager levels between the AS and TPFAR are not compatible.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the dump for the manager levels of the AS. Update the manager levels on the AS to a level supported by TPFAR.


-30024

SQLSTATE: 58009

Explanation: An SQL communications area reply data (SQLCARD) was expected, but did not arrive.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the dump to find out why the SQLCARD was not found.


-30025

SQLSTATE: 58009

Explanation: A premature end of the reply assembly block (RAB) was encountered.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the dump to see what replies were missing from the RAB by comparing the RAB with the command assembly block (CAB).


-30035

SQLSTATE: 58009

Explanation: A request correlation ID (RQSCRR) was missing, out of order, or invalid.

System Action: The statement cannot be executed. A dump is taken. The program is left in an unconnected but connectable state.

System Programmer Response: Check the dump to find out what was wrong with the RQSCRR in error.


-30040

SQLSTATE: 57012

Explanation: The last SQL statement failed because of insufficient nondatabase resources. This does not affect the successful execution of subsequent SQL statements. TPFAR has attempted to issue a TPPCC ALLOCATE 5 times, but has received a retry indication every time. The error probably occurred because all of the TPF/APPC sessions with the remote AS are in use.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Establish sufficient LU 6.2 sessions to the remote AS to handle the maximum number of concurrent requests to the AS.


-30041

SQLSTATE: 57013

Explanation: The last SQL statement failed because of insufficient nondatabase resources. This affects the successful execution of subsequent SQL statements. TPFAR has received a no-retry return code while trying to issue a TPPCC ALLOCATE. The error probably occurred because there were no LU 6.2 sessions active to the remote AS LU defined in the SDD.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Start the LU 6.2 sessions with the remote AS before retrying.


-30042

SQLSTATE: 57012

Explanation: TPFAR issued a TPPCC ALLOCATE to begin a session, but the AS has rejected the request because of lack of resources.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Investigate the lack of resources on the remote side.


-30043

SQLSTATE: 57013

Explanation: A permanent lack of resources has been detected on the remote AS side. No other SQL commands will work.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Investigate the lack of resources on the remote side.


-30044

SQLSTATE: 57013

Explanation: The TPPCC ALLOCATE was issued with an invalid LU 6.2 mode name. This error probably occurred because of a mismatch between the LU 6.2 mode name defined in the SDD and the active available mode names, previously set up with the ZNCNS command.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Investigate why there is a difference between the mode name defined in the SDD with the ZSQLD command and the one defined using the ZNCNS command.


-30045

SQLSTATE: 22003

Explanation: TPFAR received an RAB size from the application server (AS) that was not valid. The value is greater than the maximum socket read buffer specified in TPFAR or the value equals zero.

System Action: The statement cannot be executed. A dump is taken. The program is left in a connected state.

System Programmer Response: Check the dump to determine the rejected value.


-30046

SQLSTATE: 57013

Explanation: An SQL connect failed because of a function that returned an error, preventing subsequent SQL statements from being completed successfully. One of the following occurred:

System Action: The statement cannot be executed. A dump is taken. The program is left in a unconnected but connectable state.

System Programmer Response: Determine which function caused the error and correct the problem.


-30047

SQLSTATE: 57012

Explanation: TPFAR issued a TCP/IP socket function that reurned an error.

System Action: The statement cannot be executed. A dump is taken with the specific function and errno value. The program is left in a connected state.

System Programmer Response: Check the errno value returned in the dump to determine why the function failed.


-30060

SQLSTATE: 42507

Explanation: An AS reply message indicated that TPFAR is not authorized for the specified RDB. Because TPF uses the complex name as the TPF application's AUTHID, authorize this complex name in CTKI for the commands that TPF is to issue.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Grant TPFAR access from DB2.


-30061

SQLSTATE: 52017

Explanation: An AS reply message indicated that the RDB name sent by TPFAR does not exist. The RDB name at the AS needs to match the name specified in the SDD.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: Update the SDD entry to reflect the correct AS RDB name.


-30070

SQLSTATE: 58014

Explanation: Either the AS or TPFAR detected an unsupported SQL command.

System Action: The statement cannot be executed. A dump is taken. The program is left in a connected state.

System Programmer Response: Examine the dump to determine the rejected command. Also, check the service level of the AS and TPFAR to ensure that they are up to date. Check the DDM table ensure there was no core corruption.


-30071

SQLSTATE: 58015

Explanation: An AS reply message indicated that an invalid DDM object was sent by TPFAR.

System Action: The statement cannot be executed. A dump is taken. The program is left in a connected state.

System Programmer Response: Examine the dump to determine the rejected object. Also, check the service level of the AS and TPFAR to ensure that they are up to date. Check the DDM table to ensure there was no core corruption.


-30072

SQLSTATE: 58016

Explanation: An AS reply message indicated that an invalid DDM parameter was sent by TPFAR.

System Action: The statement cannot be executed. A dump is taken. The program is left in a connected state.

System Programmer Response: Check the dump to determine the rejected parameter. Also, check the service level of the AS and TPFAR to ensure that they are up to date.


-30073

SQLSTATE: 58017

Explanation: An AS reply message indicated that an invalid DDM parameter value was sent by TPFAR.

System Action: The statement cannot be executed. A dump is taken. The program is left in a connected state.

System Programmer Response: Check the dump to determine the rejected parameter value. Check the service level of the AS and TPFAR to ensure that they are up to date. When the rejected parameter is identified, check the DDM encode routine to see how this parameter was built.


-30074

SQLSTATE: 58018

Explanation: An invalid severity code or reply message was received from the remote AS.

System Action: The statement cannot be executed. A dump is taken. The program is left in a connected state.

System Programmer Response: Check for a possible mismatch in the AS or TPFAR manager levels.


-30080

SQLSTATE: 58019

Explanation: A communications error occurred. The current conversation has failed because of a failure of the underlying session. This can be cause by operator action or hardware failure.

System Action: The statement cannot be executed. The program is left in an unconnected but connectable state.

System Programmer Response: The communications console should be checked to determine the reason for the session failure.