Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a file or not?

SOLVED
Go to solution
Klaes-Göran Carlsson
Frequent Advisor

Is there a file or not?

Hi

Anyone who can explain why DIR command find the file, and then says that the file dont exist? And then soon after it finds it... and then on next dir is gone..but still there?

sh dev/file shows no other process is using the file.

/Klaes-Goran

[KGCA]_NJVMS1> dir EDIINDIVIDS.UT;-0

Directory $1$DKC1:[BARTRACK.R5A.TRACY.PRODOUT]

EDIINDIVIDS.UT;17 no such file

Total of 1 file, 0/0 blocks.
[KGCA]_NJVMS1> dir EDIINDIVIDS.UT;0

Directory $1$DKC1:[BARTRACK.R5A.TRACY.PRODOUT]

EDIINDIVIDS.UT;306
1/18 31-MAY-2006 14:14:26.16 [BARTRACK,BAR]

Total of 1 file, 1/18 blocks.




[KGCA]_NJVMS1> dir EDIINDIVIDS.UT;17

Directory $1$DKC1:[BARTRACK.R5A.TRACY.PRODOUT]

EDIINDIVIDS.UT;17 no such file

Total of 1 file, 0/0 blocks.
[KGCA]_NJVMS1> directory EDIINDIVIDS.UT;17

Directory $1$DKC1:[BARTRACK.R5A.TRACY.PRODOUT]

EDIINDIVIDS.UT;17

Total of 1 file.
[KGCA]_NJVMS1> directory EDIINDIVIDS.UT;17/size=all

Directory $1$DKC1:[BARTRACK.R5A.TRACY.PRODOUT]

EDIINDIVIDS.UT;17 no such file

Total of 1 file, 0/0 blocks.
[KGCA]_NJVMS1> directory EDIINDIVIDS.UT;17

Directory $1$DKC1:[BARTRACK.R5A.TRACY.PRODOUT]

EDIINDIVIDS.UT;17

Total of 1 file.
[KGCA]_NJVMS1> directory EDIINDIVIDS.UT;17/size=all

Directory $1$DKC1:[BARTRACK.R5A.TRACY.PRODOUT]

EDIINDIVIDS.UT;17 no such file

Total of 1 file, 0/0 blocks.



DIGITAL TCP/IP Services for OpenVMS Alpha Version V5.0A
on a COMPAQ AlphaServer DS20E 500 MHzP running OpenVMS V7.1-2
5 REPLIES
Karl Rohwedder
Honored Contributor

Re: Is there a file or not?

Since the directory is called PRODOUT, isn't it possible, that an application is writing/deleting files on this directory?
Perhaps you can set an alarm-ACL on the PRODOUT.DIR to check for this.

regards Kalle
David B Sneddon
Honored Contributor
Solution

Re: Is there a file or not?

The commands that show the file as "no such file"
are indicating that the file has an entry in the
directory file but not in INDEXF.SYS.
The commands that appear to show no problems are
simply reading the entry from the directory file
and not attempting to look in INDEXF.SYS.
The file does not exist -- ANALYZE/DISK/REPAIR should fix it...

Dave
Klaes-Göran Carlsson
Frequent Advisor

Re: Is there a file or not?

Hi

ANALYZE/DISK/REPAIR was the solution for this! It's working now, thanks a lot!

/Klaes-Goran
John Gillings
Honored Contributor

Re: Is there a file or not?

Klaes-Goran,

Just to complete the story, the "now you see it, now you don't" is easily explained.

The "naked" DIRECTORY command (ie: no qualifiers) will just show the file names. There is no attempt to read anything from the file itself. The "no such file" message will only be issued if you attempt to read the file, but can't find it.

So, your "DIRECTORY/SIZE=ALL" command will generate the message, but "DIRECTORY" won't. The other case which displayed the message, you used the command "DIR".

Judging by the output of the real file you have a symbol:

$ DIR = "DIRECTORY/SIZE=ALL/DATE/OWNER"
A crucible of informative mistakes
Volker Halle
Honored Contributor

Re: Is there a file or not?

Klaes-Goeran,

to further elaborate on John's explanation:


The "naked" DIRECTORY command (ie: no qualifiers) will just show the file names. There is no attempt to read anything from the file itself. The "no such file" message will only be issued if you attempt to read the file, but can't find it.


DIRECTORY/qualifier does not actually read 'data from the file', but reads file system meta-data from the file header of the file (which is stored in INDEXF.SYS).

It uses the File ID found in the directory entry for the file (shown with DIRECTORY/FILE_ID) to look up the file header in INDEXF.SYS to read additional attributes of the file. If there is no valid file header with this file ID, you get the famous 'no such file' output.

Volker.