1829440 Members
1623 Online
109992 Solutions
New Discussion

Re: F$SEARCH failed

 
Antoniov.
Honored Contributor

Re: F$SEARCH failed


don't change protections on directories on active production systems.

To avoid change file protection you could use SET PROT statement as follow:
$! Set protection
$ SET PROT=(S:RWED,...)/DEF
$! here open new file

In this manner every new file assume the protection profile you have defined and you don't need change it (if it's applicable)

Antonio Vigliotti
Antonio Maria Vigliotti
Jan van den Ende
Honored Contributor

Re: F$SEARCH failed

... unless for whatever reason a specific directory needs a protection that is NOT the same as your default....


Jan
Don't rust yours pelled jacker to fine doll missed aches.
Uwe Zessin
Honored Contributor

Re: F$SEARCH failed

It is my experience that a directory inherits its protection from the parent directory and not from the process' protection mask. And a file does not inherit its protection from the parent directory's one, but from the process mask.

Both can be altered with an ACL, though.
.
Eberhard Wacker
Valued Contributor

Re: F$SEARCH failed

Hi all, quote of Jan, nearly at the beginning:
... then, (and I know you read this), please, Guy Peleg, can we put this on your list?

Obviously he is not able to take part and read all of these many VMS entries in ITRC. But I'm sure several of you guys are quite familiar with him. So put him an email, I personally would also highly appreciate if f$search would send an error message in case of the directory file is locked instead of a "successfully" null string.

Cheers
Eberhard


Martin P.J. Zinser
Honored Contributor

Re: F$SEARCH failed

Hi,

I've sent a mail to Guy with a link to this thread. Obviously this is an unconventional way to report such an issue and at best we can hope on a response on a "as time permits" basis. ITRC forums are not part of the job description for hp employees, so if they are not able to participate or react because of their regular work schedule this is maybe bad luck for us, but nothing you can complain about ;-)

Greetings, Martin
Jan van den Ende
Honored Contributor

Re: F$SEARCH failed

Thanks, Martin
Don't rust yours pelled jacker to fine doll missed aches.
Antoniov.
Honored Contributor

Re: F$SEARCH failed

Wim,
I've attached a simple DCL command procedure to write new files with a specific protection mask.
As you can see, protection mask is restored to original value.

Regards.
Antonio Vigliotti
Antonio Maria Vigliotti
Uwe Zessin
Honored Contributor

Re: F$SEARCH failed

Antonio,
I thought the problem had to do with correcting a directory's protection.


You can create a file with a specific protection quite easy:
$ copy nl: a.tmp /protection=(s:re,g:e,w:rwe)

And for directories it es easy, too, but I bet you know that:
$ create/directory/protection=(s:re,g:rwe,w:e) [.a]
.
Antoniov.
Honored Contributor

Re: F$SEARCH failed

If problem is timing you can use redundancy.
>ty wim1.lis
$a:
$ set file wim.dir/prot=w:rwed/own=system
$ set file [.wim]*.* /prot=w:rwed/own=system
$ goto a

>ty wim2.lis
$ set ver
$ on warning then exit
$ file_searc="*.*"
$ a:
$ f1=f$sea(file_searc,1)
$ f2=f$sea(file_searc,2)
$ if f1.eqs."" .and. f2.eqs."" then exit
$ goto a

Apparently is dummy but might be very hardly receive twice locked condition. Solution waiting HP patch.

Antonio Vigliotti

Antonio Maria Vigliotti