HP3000-L Archives

November 1996, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Costas Anastassiades <[log in to unmask]>
Reply To:
Costas Anastassiades <[log in to unmask]>
Date:
Thu, 7 Nov 1996 23:28:14 +-200
Content-Type:
text/plain
Parts/Attachments:
text/plain (31 lines)
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

ATOM RSS1 RSS2