Alphabetical list of return codes

NoteCodes returned to Client-Library functions are marked with an asterisk.

TDS-ADDR-CANNOT-BE-NULL (-41)

One or more parameters passed on an API call are null and should not be.

TDS-BACKED-OUT (405)

A rollback was successfully performed.

TDS-BUFFLEN-GREATER-TYPE (-191)

TDYNAMIC: The size of the buffer is greater than the dynamic SQL-type field being retrieved.

TDS-BUFFLEN-LESS-TYPE (-192)

TDYNAMIC: The size of the buffer is too small to return a dynamic SQL-type field.

TDS-BUF-TOO-SMALL (-42)

The buffer is too small. The information being retrieved cannot fit in the buffer.

*TDS-CANCEL-RECEIVED (-12)

The operation was canceled. The remote partner issued a cancel. The current operation failed.

This code is also returned to the Client-Library function CTBDESCRIBE.

*TDS-CANNOT-SET-VALUE (-43)

The transaction can only retrieve this value; it cannot set the value of this property.

This code is also returned to the Client-Library functions CTBCMDPROPS and CTBCONPROPS.

TDS-CHARSET-NOTLOADED (-261)

Gateway-Library found the double-byte character set specified by the client, but the corresponding double-byte module was not loaded at the mainframe.

This code is returned to TDACCEPT when a client specifies a double-byte character set (for example, Shift-JIS) for which the associated translate module was not loaded or defined to the mainframe system.

If the TP system is CICS, this can mean that the translate module was not defined in RDO (or to the PPT table), or that it is not present in the LOADLIB.

TDS-CHARSETSRV-NOT-SBCS (-264)

The client’s character set was not found. A double-byte character set was specified as the default.

This code represents two problems:

TDS-CMD-NOT-GET-SET (-190)

The value of the ACTION parameter is invalid. It should be either TDS-GET or TDS-SET.

*TDS-COMMAND-ACTIVE (-7)

A command is in progress. The current function cannot be called after a command is sent to a server.

This function is returned to the Client-Library functions CTBCLOSE and CTBCMDDROP.

TDS-COMPUTE-PRESENT (-208)

There are computes present for this transaction.

TDS-CONNECTION-FAILED (-4998)

The connection abended. The client/server connection abnormally ended (for example, the LU 6.2 session crashed or the remote transaction abended).

This code can also be returned to the Client-Library function CTBRESULTS.

*TDS-CONNECTION-TERMINATED (-4997)

The connection closed. The remote partner closed (deallocated) the client/server connection.

This code can be returned to many Client-Library functions.

TDS-CONTROL-NOTLOADED (-260)

The customization module cannot be loaded. This module is necessary for Gateway-Library operation.

*TDS-CRTABLE-UNAVAILABLE (-31)

The Connection Router table cannot be loaded.

This function is returned to the Client-Library function CTBCONNECT.

TDS-CURSOR-ALREADY-CLOSED (-75)

The cursor is closed. You cannot fetch, update, or delete when the cursor is closed.

TDS-CURSOR-ALREADY-DEALLOCATED (-76)

The cursor is deallocated. You cannot deallocate the same cursor more than once.

TDS-CURSOR-ALREADY-DECLARED (-71)

The cursor is declared. You cannot declare the same cursor more than once.

TDS-CURSOR-ALREADY-OPEN (-74)

The cursor is already open. You cannot open the same cursor more than once.

TDS-CURSOR-NOT-DECLARED (-70)

A cursor must be declared before it can be opened.

TDS-CURSOR-NOT-FOUND (-77)

The cursor is not found.

TDS-CURSOR-NOT-OPEN (-72)

The cursor is not open. A cursor must be open before a fetch, close, delete, or update.

TDS-CURSOR-PRESENT (205)

There are cursors present for this transaction.

TDS-DATE-CONVERSION-ERROR (-23)

An error occurred during conversion of datetime data.

This may be a result of trying to convert to short datetime (TDSDATETIME4) for a client using an early TDS version. TDS versions earlier than 4.2 do not support the short datetime datatype.

TDS-DBCS-CHARSET-NOTFOUND (-263)

Gateway-Library could not find the double-byte character set specified in the client login packet.

This usually indicates that the client request specified an invalid character set in, for example, the -J option in isql or the dbsetlcharset value in a DB-Library program.

TDS-DECIMAL-CONVERSION-ERROR (-24)

An error occurred in conversion of packed decimal data.

TDS-DEFAULT-CHARSET-NOTFOUND (-262)

The client login packet did not specify a character set or the specified client character set could not be found, and Gateway-Library did not find the default. (This code is returned for single-byte character sets only.)

TDS-DRIVER-NOT-SET (-4993)

The network driver is invalid.

TDS-DUPLICATE-ENTRY (-9)

There is a duplicate column description. You attempted to describe the same column twice with a TDESCRIB statement. The operation failed.

TDS-DYNAMIC-PRESENT (206)

There are dynamic SQL requests present for this transaction.

TDS-DYNSQL-ALREADY-DEALLOCATED (-84)

A dynamic SQL request is already allocated.

TDS-DYNSQL-ALREADY-PREPARED (-81)

A dynamic SQL request is already prepared. You cannot prepare a dynamic SQL request that is already deallocated.

TDS-DYNSQL-ID-NOT-FOUND (-85)

A dynamic SQL request is not found.

TDS-DYNSQL-IDLEN-TOO-LONG (-87)

The dynamic SQL request ID length is greater than 255.

TDS-DYNSQL-NO-STMT-GIVEN (-86)

There is not a SQL statement associated with the dynamic SQL request.

TDS-DYNSQL-NOT-PREPARED (-80)

A dynamic SQL request is not prepared.

TDS-DYNSQL-OUTPUT-ALREADY-DEFINED (-83)

The dynamic SQL output is already defined. You cannot define dynamic SQL output more than once.

TDS-DYNSQL-PARMS-ALREADY-DEFINED (-82)

The dynamic SQL parameters are already defined. You cannot define dynamic SQL parameters more than once.

TDS-DYNSQL-STMT-NOT-FOUND (-89)

There is no SQL statement associated with the dynamic SQL request.

TDS-ENTRY-NOT-FOUND (-8)

The specified column number, transaction number, or parameter does not exist.

TDS-EXCEED-MAX-CON (-39)

The maximum number of connections are already open.

TDS-FLOAT-CONVERSION-ERROR (-21)

An error occurred in conversion of float values.

TDS-GWLIB-BAD-VERSION (-16)

The program version you are using is newer than the version of the Gateway-Library phase in use.

*TDS-GWLIB-FUNCTION-NOT-AVAILABLE (-25)

The application calls a Client-Library function that is not supported by the Client Option. Check the code to be sure all functions called are included in the appropriate Mainframe Connect Server Option Programmer’s Reference.

TDS-GWLIB-INTERNAL-ERROR (-14)

Gateway-Library crashed.

*TDS-GWLIB-NO-STORAGE (-17)

The DSA could not be obtained for the Gateway-Library.

This function is returned to the Client-Library functions CTBCONALLOC and CSBCTXALLOC.

TDS-GWLIB-UNAVAILABLE (-15)

SYGWCICS (the Gateway-Library phase) could not be loaded.

TDS-ILLEGAL-REQUEST (-5)

There was an illegal function. The operation failed.

This code can indicate that a client application is trying to use a Gateway-Library function that is not supported for clients (for example, TDSNDROW).

TDS-INFOMSG-PRESENT (202)

There is a server or client message associated with the results of the last request.

TDS-INVALID-ACTION (-44)

The action was not CS-GET or CS-SET.

TDS-INVALID-BOOLEAN (-180)

This is an invalid Boolean value. Boolean values must be set to either CS-TRUE or CS-FALSE.

TDS-INVALID-CONHANDLE (-40)

An invalid connection handle address was specified.

TDS-INVALID-CONTEXT (-259)

An invalid context handle address was specified.

TDS-INVALID-CURCLOSOPTION (-182)

A “closed” cursor command specified an invalid option.

The Gateway-Library transaction received a “closed” cursor command, but the value of the OPTION field of the TDS-CURDESC structure is invalid. Valid options are TDS-CUR-UNUSED and TDS-CUR-DEALLOC.

TDS-INVALID-CURDECLOPTION (-183)

A declare cursor command has an invalid option specified.

The Gateway-Library transaction received a declare cursor command, but the value of the OPTION field of the TDS-CURDESC structure is invalid. Valid options are TDS-CUR-UNUSED and TDS-CUR-DEALLOC.

TDS-INVALID-CURDECLSTAT (-184)

There was an illegal cursor declare option.

TDS-INVALID-CURINFCMD (-195)

There was an illegal cursor information command.

TDS-INVALID-CURINSTAT (-185)

There was an illegal cursor information status.

TDS-INVALID-CUROPENSTAT (-187)

Illegal cursor open status.

TDS-INVALID-CURSOR-COMMAND (-194)

The cursor command is not declare, open, fetch, delete, update, or close.

TDS-INVALID-CURSOR-FSM (-78)

There was an invalid cursor state.

TDS-INVALID-CURUPDSTAT (-186)

There was an illegal cursor update status.

TDS-INVALID-DATA-CONVERSION (-172)

The datatypes were incompatible. The source datatype cannot be converted into the requested result datatype.

TDS-INVALID-DATA-TYPE (-171)

There was an illegal datatype. A Sybase datatype supplied in the call is not supported, and the conversion cannot be done. The operation failed.

TDS-INVALID-DATAFMT-VALUE (-181)

One or more values specified for fields in the DATAFMT structure are illegal.

This code is returned to Client-Library functions that use the Open Client DATAFMT structure: CTBBIND, CTBDESCRIBE, CTBPARARM, and CSBCONVERT.

TDS-INVALID-DYNSQL-COMMAND (-196)

There was an invalid dynamic SQL command. The dynamic SQL command must be prepare, exec, deallocate, descin, descount, or ack.

TDS-INVALID-DYNSQL-FSM (-79)

A dynamic SQL request is in invalid state.

TDS-INVALID-DYNSTAT (-188)

There was an invalid status for a dynamic SQL request.

TDS-INVALID-DYNTYPE (-189)

There was an invalid type for a dynamic SQL request.

TDS-INVALID-FLAGS (-176)

There was an invalid padding option for a field.

TDS-INVALID-ID-VALUE (-10)

The specified column or parameter number is greater than the system maximum. You can have as many columns per table result and parameters per RPC as Open Server allows.

TDS-INVALID-IHANDLE (-19)

There was an invalid IHANDLE specification. Error in specifying a value for the IHANDLE argument.

TDS-INVALID-LENGTH (-173)

There was an incorrect length. The length specified in the xxx-LENGTH argument is too long.

*TDS-INVALID-NAMELENGTH (-179)

There was an invalid name length. The length specified for the column, parameter, message, or server name is invalid.

This code is also returned to the Client-Library function CTBCONNECT (length of specified server name is invalid).

TDS-INVALID-NET-PROTOCOL (-4992)

Invalid network protocol.

TDS-INVALID-OP-TYPE (-193)

Invalid dynamic SQL operation.

*TDS-INVALID-PARAMETER (-4)

There was an invalid parameter value. The value assigned to one or more of the arguments supplied in the call is not valid. The operation failed.

This code is also returned to many Client-Library functions.

TDS-INVALID-PRECISION (-177)

Invalid precision value. The precision value specified during conversion of TDS-PACKED-DECIMAL data is invalid.

TDS-INVALID-PROTOCOL (-4990)

An invalid TDS protocol was received.

TDS-INVALID-SCALE (-178)

There was an invalid scale value. The scale value specified during conversion of TDS-PACKED-DECIMAL data is invalid.

TDS-INVALID-STATUS (-174)

There was an invalid status value. The value entered in the STATUS field is invalid.

TDS-INVALID-STRMLENGTH (-4991)

An invalid TDS data stream length was received or an invalid TDS data stream length was specified.

*TDS-INVALID-TDPROC (-18)

There was an error in specifying a value for the TDPROC argument.

This code can also be returned to the Client-Library function CTBCANCEL.

TDS-INVALID-TERMINATOR (-45)

There was an invalid terminator. The Terminator assigned to one or more parameters is not valid.

*TDS-INVALID-VAR-ADDRESS (-175)

The specified variable address is invalid. No variable with the specified name exists. A NULL value was specified. The operation failed.

This code can also be returned to the Client-Library functions CTBBIND and CTBCONVERT.

TDS-LOG-ERROR (-258)

An attempt to write to the log file failed.

TDS-LOGIN-FAILED (-4995)

The gatewayless login was rejected. Check validity of userid/password.

TDS-MONEY-CONVERSION-ERROR (-22)

There was an error in the conversion of TDSMONEY-type data.

This might be a result of trying to convert to short money (TDSMONEY4) for a client using an early TDS version. TDS versions earlier than 4.2 do not support the short money datatype.

*TDS-MSG-SOS (-256)

There was a memory shortage. Not enough memory is available to save messages. All messages stored previously were cleared.

This code can also be returned to the Client-Library function CTBDIAG.

TDS-MSGID-PRESENT (207)

The transaction has an outstanding server or client message.

TDS-NO-BIND-ISSUED (-51)

No bind was issued. A bind is missing for the specified column.

*TDS-NO-COMPUTES-ALLOWED (-60)

The computed results are not supported by the Client Option.

This code is returned to the Client-Library functions CTBBIND and CTBDESCRIBE.

TDS-NO-CURRENT-CURSOR (-200)

There is no cursor associated with the current transaction.

TDS-NO-CURRENT-DYNSQL (-201)

There is no dynamic SQL request associated with the current transaction.

TDS-NO-MSG-PRESENT (102)

There are no messages associated with the current transaction.

TDS-NO-NULLINDI-TRUNC (-52)

There is no null indicator. The data for the column is truncated, but no indicator is available.

TDS-NO-NULLINDI-NULLRCVD (-53)

There is no null indicator. The data for the column is NULL, but no indicator is available.

TDS-NO-PARM-PRESENT (103)

No incoming parameters are present. TDRCVPRM cannot retrieve a parameter because no additional parameters were received. The operation failed.

TDS-NO-ROW-PRESENT (100)

There are no more rows in the current result set.

TDS-NO-ROWS-RETURNED (104)

There are no rows returned in the current result set. No rows were affected.

TDS-NO-SQL-PRESENT (101)

No incoming language string was present. TDRCVSQL cannot retrieve more text because no more text was accepted. The operation failed.

*TDS-NOT-INITIALIZED (-32)

The Connection Router is not initialized.

This code is returned to the Client-Library function CTBCONNECT.

TDS-OK (0)

The function completed successfully.

TDS-OVERFLOW (-26)

Numeric/decimal conversion failed.

TDS-PARM-PRESENT (203)

A parameter value was received. A parameter was received from the remote client. This value is returned to TDRESULT when a parameter is accepted by a server program and is ready to be retrieved.

*TDS-RESULTS-CANCELED (-49)

The result set was purged. The transaction may have called a routine that expects the wrong communication state.

This code is returned to the Client-Library functions CTBBIND and CTBDESCRIBE.

TDS-RESULTS-COMPLETE (500)

TDRESULT indicated no more results. No more language text, RPC parameters, cancel requests, or messages were retrieved.

*TDS-RESULTS-STILL-ACTIVE (-50)

Results are in progress. More results are pending.

This code can be returned to CTBCMDDROP (cannot drop until all results process) and CTBEXIT (cannot close connection until all results process, unless OPTION is CS_FORCE_EXIT).

This code is returned to the Client-Library functions CTBCLOSE, CTBCONDROP, CTBCMDDROP and CTBEXIT.

*TDS-ROUTE-NOT-AVAILABLE (-34)

A request route is not available. All paths are in use.

This code is returned to the Client-Library function CTBCONNECT.

*TDS-ROUTE-NOT-FOUND (-33)

The requested route is not defined to the Connection Router.

This code is returned to the Client-Library function CTBCONNECT.

TDS-ROW-PRESENT (200)

Rows were returned in the current result set.

*TDS-SERVER-NOT-FOUND (-30)

The requested server is not defined to the Connection Router.

This code is returned to the Client-Library function CTBCONNECT.

TDS-SERVER-RETURNED-ERROR (-4996)

There is an error in the results sent by the server.

*TDS-SOS (-257)

The host subsystem was unable to allocate enough memory for the control block that Gateway-Library was trying to create. The operation failed.

This code is returned to both Client-Library functions and Gateway-Library functions.

TDS-SPA-NOT-SPECIFIED (-265)

There is no scratch pad area designated for the IMS Conv Program.

TDS-SQL-CMD-PRESENT (201)

A language request was received from a remote client. This value is returned to TDRESULT when a language string is accepted by a server program and is ready for retrieval.

TDS-STRING-TOO-SMALL (-28)

A numeric or decimal-to-character conversion failed. The output length of the character string is too small.

TDS-STATUS-NOT-RECEIVED (-11)

No status returned from client. No RETURN-STATUS-NUMBER is available because the server did not yet send the status back to the client.

TDS-STATUS-PRESENT (204)

A status was returned from the client.

TDS-TAKE-SYNCPT (401)

A sync point was successfully performed.

*TDS-TRANSLATION-ERROR (-27)

The application could not translate a character code or user-defined character.

This code is returned to the Client-Library function CTBFETCH.

TDS-TRUNCATION-ERROR (-20)

An error occurred in the truncation of data value.

TDS-TRUNCATION-OCCURRED (-13)

The data was truncated. The actual data length was longer than the maximum data length allotted for this data.

TDS-WRONG-STATE (-6)

The function cannot be used in the current communication state. For example, your program tried to send a reply before it read in all of the client’s parameters. The application was still in RECEIVE state and could not send. The operation failed.

This code can be returned to both Gateway-Library and Client-Library functions.