This function will return the error number for the last access for a particular file.
|1 f/c/e||The number/handle of the file to be checked. If you don't include a value here the program will check the last file access.|
RETURN TYPE - I
The last file error number.
If the last access was successful the FLERR() value returned will be 0. This function works for both TAS and non-TAS files. The error number returned will correspond to standard TAS Professional runtime errors. For more information please refer to Runtime Errors.
define myfile_hndl type I
// mykey is in the Data dictionary
define myfield type A size 10
myfield = 'TESTVALUE'
openv 'myfile' fnum myfile_hndl lock X
findv m fnum myfile_hndl key mykey value myfield
if flerr(myfile_hndl) <> 0 then msg 'I could not find ' + myfield
// if myfield could not be found the message would be displayed.