%IO_ERROR
Return error numbers on specific channel
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
error = %IO_ERROR(channel, [syserr][, stv])
Return Value
error
The Synergy error number of the last I/O operation on channel. (n)
Arguments
channel
The number of the channel for which errors will be returned. (n)
syserr
(optional) Set to the system error, if one occurred, on the specified channel. (n)
sysstv
(optional) Set to the error generated by the underlying file manager (the DBMS or RMS error number). (n)
Discussion
Unlike %ERROR, %IO_ERROR is not modified by I/O on another channel. All three error numbers are cleared on the next successful I/O on the channel.
Examples
function check_channel, i chn , n record msg ,a45 proc if (%io_error(chn)) begin xcall ertxt(%io_error(chn), msg) writes(TTCHN, "Error#" + %string(%io_error(chn)) + ": " + msg) freturn(0) end else freturn(1) endfunction