Re: "file locked by another user" mystery
- From: Fred Bach <bach@xxxxxxxxx>
- Date: Thu, 31 Jan 2008 13:46:27 -0800
Phillip Helbig---remove CLOTHES to reply wrote:
> In article <AeIblS8rqBCX@xxxxxxxxxxxxxxxxxxxxxxxx>,
> briggs@xxxxxxxxxxxxxxxxx writes:
>
> This seems like an appopriate thread to bring up the old chestnut:
>
> $ RESET := ON ERROR THEN RESET
>
> Think about it. For starters, it is NOT the same as SET NOON, since a
> severe error will exit.
>
AND,
briggs@xxxxxxxxxxxxxxxxx wrote:
> In article <fnr1lk$5jq$1@xxxxxxxx>, Fred Bach <bach@xxxxxxxxx> writes:
[snip]
>> Is there some way to start a completely new daughter (or detached)
>> DCL process where these ON conditions can be set to default to
>> something other than ON ERROR THEN EXIT? Thanks.
>
> Well, you can redefine "EXIT" as a DCL SYMBOL.
>
> Tested -- it actually works and affects the behavior of the default
> "ON ERROR THEN EXIT" handler. Using this technique, testing shows that
> the default handler is re-enabled as often as needed. It is not
> a "one-shot" like the user-specified ON <severity> THEN handlers.
>
> Obviously, that approach is not very practical.
>
> No, I don't know of any way to control what ON <severity> THEN
> handler DCL reverts to after a user-specified ON <severity> THEN
> handler is activated.
You guys are soooo sneaky! I love it. The first one
$ RESET := ON ERROR THEN RESET
continually re-defines itself every time DCL encounters an
error condition, effectively an automatic reset. I think that
RESET could actually also point to a block of instructions, the
last of which is the above RESET re-definition. Neat!
The second one redefines the EXIT command and specifically
makes use of default behaviour by specifically allowing DCL
to re-establish the ON ERROR THEN EXIT default condition.
Talk about your "go with the flow", or your "if you can't
beat 'em then join 'em", techniques! Truly good stuff!
Mr. Briggs mentioned that redefining EXIT was not very practical.
How come? Other than symbol inheritance if one DCL procedure calls
another DCL procedure, what would not be practical about it? If
a fellow wanted EXIT actually to accomplish an EXIT back to the
previous DCL level (calling procedure) then one could have a
routine in the EXIT alias code which would simply redefine
the EXIT command back to what it should be. I can think
of 3 ways that a fellow could actually do that (cleanly exit
a DCL procedure where EXIT has been refined in an outer
procedure. One is
$DELETE_/SYMBOL/LOCAL EXIT !along with
$DELETE_/SYMBOL/GLOBAL EXIT !in case it exists
$EXIT
although one might want to get fancy and test if the symbol EXIT
exists before each stage above. Note the underscore in DELETE_.
Another is
$SET SYMBOL/SCOPE=(NOLOCAL,NOGLOBAL) EXIT
$EXIT
Again, a fellow might want to test if the symbol EXIT exists first.
The other is
$EXIT = "EXIT"
$EXIT
because everything on the rhs of the equal sign is taken as a
verb or text, but not a symbol.
Is that all correct?
.. fred bach ..
.
- References:
- "file locked by another user" mystery
- From: tadamsmar
- Re: "file locked by another user" mystery
- From: tadamsmar
- Re: "file locked by another user" mystery
- From: Richard B. Gilbert
- Re: "file locked by another user" mystery
- From: tadamsmar
- Re: "file locked by another user" mystery
- From: AEF
- Re: "file locked by another user" mystery
- From: Fred Bach
- Re: "file locked by another user" mystery
- From: briggs
- Re: "file locked by another user" mystery
- From: Fred Bach
- Re: "file locked by another user" mystery
- From: briggs
- Re: "file locked by another user" mystery
- From: Fred Bach
- Re: "file locked by another user" mystery
- From: Phillip Helbig---remove CLOTHES to reply
- "file locked by another user" mystery
- Prev by Date: Re: VMS as NFS client - solved!!!!! (almost)
- Next by Date: Re: Restricting Access to TCP/IP and DECnet
- Previous by thread: Re: "file locked by another user" mystery
- Next by thread: Re: "file locked by another user" mystery
- Index(es):
Relevant Pages
|