Consultor Eletrônico



Kbase P110405: Attempting to remove file with OS-DELETE returns OS-ERROR 999
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   01/11/2005
Status: Unverified

SYMPTOM(s):

Attempting to remove file with OS-DELETE

OS-ERROR returns error code 999

File is not removed

Attempting to delete the file via OS-COMMAND displays the following message in the Console:

The process cannot access the file because it is being used by another process.

Code defines a STREAM and uses it to read the file contents

File access is terminated using INPUT CLOSE statement

CAUSE:

This is expected behaviour because the file is still in use. The STREAM does not terminate properly using INPUT CLOSE.

FIX:

Change

INPUT CLOSE.

to

INPUT STREAM <stream> CLOSE.

This will terminate the STREAM properly and allow the file to be removed with OS-DELETE.