Re: "file locked by another user" mystery




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 ..
.



Relevant Pages

  • Re: Threading / Event issue...
    ... I was considering whether the event might be set and reset before the thread ... You should also *wait for the chime thread to exit* in the main thread ... before firing another instance for the new time-out. ... event signals a Control Panel setting change, one signals a change in the ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: sum of array
    ... what does your simulation say the values of s, s, ... Port (clk: in STD_LOGIC; ... reset: in STD_LOGIC; ... exit SEQ_LOOP when reset = '1'; ...
    (comp.arch.fpga)
  • Re: strange behavior errorhandling
    ... Pop in some msgboxes into you loop's code: ... the occurrence of the error and a Resume, Exit Sub, Exit Function, or Exit ... So you had to reset your error handler--like Frank did. ...
    (microsoft.public.excel.misc)
  • Re: Threading / Event issue...
    ... Originally I had it as a manual reset. ... recreated before the WaitForSingleObject received the exit event? ... >> Private Sub WaitForNextChime() ... >> Again, the reason I'm exiting the thread, then immediately respawning is ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: "file locked by another user" mystery
    ... The default ON is "ON ERROR THEN EXIT" ... Many thanks for all the great ideas about $STATUS and $SEVERITY! ... DCL process where these ON conditions can be set to default to ... "ON ERROR THEN EXIT" handler. ...
    (comp.os.vms)