| 
       OS-ERROR
       | 
| 
       DEFINE VARIABLE err-status AS INTEGER   NO-UNDO.
        DEFINE VARIABLE filename AS CHARACTER NO-UNDO FORMAT "x(40)" LABEL "Enter a file to delete". UPDATE filename. OS-DELETE VALUE(filename). err-status = OS-ERROR. IF err-status <> 0 THEN CASE err-status: WHEN 1 THEN MESSAGE "You are not the owner of this file or directory.". WHEN 2 THEN MESSAGE "The file or directory you want to delete does not exist.". OTHERWISE DISPLAY "OS Error #" + STRING(OS-ERROR,"99") FORMAT "x(13)" WITH FRAME b. END CASE. | 
 This function returns 0 if no error occurred.
This function returns 0 if no error occurred.
   Use this function immediately following an OS-APPEND, OS-COPY, OS-CREATE-DIR, OS-DELETE, OS-RENAME, or SAVE CACHE statement to determine whether an error occurred during the statement's execution. If you do not, the next use of one of these statements overwrites the previous error code.
Use this function immediately following an OS-APPEND, OS-COPY, OS-CREATE-DIR, OS-DELETE, OS-RENAME, or SAVE CACHE statement to determine whether an error occurred during the statement's execution. If you do not, the next use of one of these statements overwrites the previous error code.
   The following table lists the ABL error codes that the OS-ERROR function can return.
The following table lists the ABL error codes that the OS-ERROR function can return.
  | 
       Error number
       | 
       Description
       | 
| 
       0
       | 
       No error
       | 
| 
       1
       | 
       Not owner
       | 
| 
       2
       | 
       No such file or directory
       | 
| 
       3
       | 
       Interrupted system call
       | 
| 
       4
       | 
       I/O error
       | 
| 
       5
       | 
       Bad file number
       | 
| 
       6
       | 
       No more processes
       | 
| 
       7
       | 
       Not enough core memory
       | 
| 
       8
       | 
       Permission denied
       | 
| 
       9
       | 
       Bad address
       | 
| 
       10
       | 
       File exists
       | 
| 
       11
       | 
       No such device
       | 
| 
       12
       | 
       Not a directory
       | 
| 
       13
       | 
       Is a directory
       | 
| 
       14
       | 
       File table overflow
       | 
| 
       15
       | 
       Too many open files
       | 
| 
       16
       | 
       File too large
       | 
| 
       17
       | 
       No space left on device
       | 
| 
       18
       | 
       Directory not empty
       | 
| 
       999
       | 
       Unmapped error (ABL default)
       |