Not as scary as trying to purge a file, is trying to rename it. If the rename succeeds, then the file is not accessed and you can rename it back again. But even if you don't want to mess with the actual file name, you can use the rename command to try and specify a lockword. This way you don't have to worry about using a unique filename in each job (if there are more than one of these files you want to test). Thinking (and trying) as I'm writing this, you could also try renaming the file to itself. If the file is being accessed you'll get an EXCLUSIVE VIOLATION and a CIERROR=372:OPEN FAILED. This way there's no rename or lockword to undo should the command succeed. so to test if a file is being accessed : SET CIERROR 0 RENAME myfile,myfile IF CIERROR = 0 THEN ECHO The file is not being accessed ... ENDIF Now where's that HP3000 site that offers a nice cap for any MPE related tips ...:) my 2 Drachmas worth, Costas Anastassiades Information Systems and Internal Communications Dept, INTRACOM SA, Athens-Greece