If a system using DP4 is misbehaving but is not producing meaningful error messages then you should enable DP4 Error logging, to improve the chances of diagnosing the problem. For information on how to do this see Diagnostics in the Guide to DP4 configuration.
There are two main sources of error messages in the DP4 error log that can be produced by ordinary DP4 applications. The first is messages from DP4DBAPI, and the second is the DP4 network requester, usually TCPW
The following shows how such an error might typically be displayed:
DP4DBAPI Returning from srv_ncall on function 210 with error 3 Error codes 17 -195 0 DP4DBAPI Into error handler 3 17 -195 0 browser : DP4 System error 17. Origin: Unknown. Database not properly closed. Run DBRECOV
The first two lines in the above output should always be produced, but the second two lines which describe the error more fully will not always be displayed. In particular C++ programs that use "raw" error handling will not usually display these two lines. Also it is possible that the DP4.INI on the system may not contain complete error text for all DP4 errors, so that the error text might not be complete. However the first two lines are sufficient to determine the DP4 error that has arisen.
Error code 25 112 13
you would run FAIL like this: FAIL 25 112 13. This would show that an error had occurred writing to a file, and the error code on Windows would indicate the problem was caused by lack of disk space.
You can also determine the DP4 function that was being called when the error arose. This is the first number on the first line, in this case 210. This is a hex value, and the corresponding function can be found by locating this value in the file DP4CI.H which can be found on the DP4 CD ROM in the incude subdirectory for each release.
If the DP4 program that is encountering the error is very old, or has been linked with an old DP4 library such a pre 4.620 version of NTOWN or with DP4DYN32.DLL then DP4DBAPI is not used for calls to the database manager, and you will not be able to diagnose errors this way. If your program is accessing a a database on another machine then you can use the second type, of diagnostic, described below, to determine the error. If not then you would need to use AUXDEBUG to discover more about the error. For information on how to use this component refer to Example ADCs in the ADC Developer's manual.
If the reply from a network request includes a DP4 error code and the DP4 network requester was loaded with the -debug_connect or -debug_error command fails then the DP4 network requester will write a line to to the error log that looks like this:
NETREQ reply function 210 server 1 error 3 retcode 17
As with DP4 DP4DBAPI errors, the error code is 3 for System errors and 4 for Fail errors, and the actual error number is shown in the number after this, in the "retcode" field. The first number on the error line indicates the DP4 function that was being called and is interpreted using DP4CI.H as already described for DP4DBAPI. The server number may or may not be meaningful depending on how DP4 servers are selected: if you use the -server_name command tail to select servers, then the number is not meaningful, and will not necessarily correspond to any number that may be included in the name of the server. However if you use AUXDISTR, or select servers by the -server command tail, then the server number is meaningful.
The error parameters are not available in the Network requester diagnostics.