error codes with I$IO

Is it possible to get the standard error codes when I$IO fails for some reason?

By "standard error codes" i mean those raised by the standard functions write, read key, read next, open, close and so on.

For example if try to rewrite a record  with I$IO (set rewrite-function to true in I$IO)  and the record key is not found i would like to get the error code "23", like with the "rewrite" statement, while F-ERRNO return "4" (E-MODE-CLASH in filesys.def).

Does it exist a way to get the code i need?