views:

34

answers:

1

When using the EXECUTE statement combined with the RETURNING clause, UniData returns any error codes encountered along with related data. Does anyone know a definitive list of these error codes?

Unfortunately the manuals are lacking in this regard and I'm not feeling particularly psychic this morning.

For example

EXECUTE MyStatement RETURNING Results

What does Results<1,1> equal?

+1  A: 

The answer to this really depends on what your 'MyStatement" is. The results of the RETURNING statement is usually the information provided during a STOP statement in a baskic routine.

While in a subroutine, this can be user defined, you can find most system error messages in the ERRMSG file.

Most, if not all, RETURN.CODES can be found in ERRMSG for SELECT, LIST, SORT, and the other system TCL statements.

-Nathan Rector

International Spectrum
Ah, I remember seeing that file now. However, this means there is no absolute method you can use to determine if the EXECUTE statement completed correctly or not. You will need to try each different type of command and determine the codes to look for via trial and error. I cannot help but feel this is highly inadequate...
Dan McGrath
yes and no. Your LIST,SORT, and SELECT reporting commands generally throw a 401 for "No Items Present", and a 404 for the number of items selected or displayed.If you are using other TCL command, then yes you will have to tests to see what kind of RETURN.CODES are used. If you are calling a UniBasic routine using a STOP command, then you have to "know" what they are return, if they are return anything.Also, take a look at the UniBasic function STATUS().
International Spectrum