In datatypes.library.doc you can read this:
Code:
RESULTS
If STORAGE was set to "VAR", the result is the datatype name.
On error, the numeric DOS error code is returned.
[...]
NOTE
- Error handling has been changed in V45. On error, the function
now returns the error number (1 - 2099), which can be converted
using rexx/GETDTSTRING; only serious errors (like "non memory")
will end in a rexx error code.
So the returned number 14 is a DOS error code, not a ARexx error code. But I don't know what 14 is. At least there is something with this line: type = ExamineDT( fname,,VAR ). Try if other files (8svx. ilbm, ...) trigger the same error. If datatypes.library is buggy and you really need to determine file types you can use rexxtricks.library. It has functions that should do the same using whatis.library or FileID.library.