[Info-vax] turning verify on and off
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Sun Feb 3 08:36:08 EST 2013
On 2013-02-03 11:42:05 +0000, Phillip Helbig---undress to reply said:
> I have some batch jobs which constantly execute in a loop.
> Occasionally, I want to turn verify on for a while then turn it off
> without resubmitting the job, in order to test things. What about
> procedures which call other procedures etc? Obviously one needs
> something more refined than turning verify on or off in all the
> procedures at once. I've thus come up with the following scheme. I've
> stolen bits of it from other folks, but haven't seen one quite so
> complex as this. The functionality should be obvious to DCL
> programmers. I welcome comments for improving it.
Are you seeking to add complexity to that verification procedure, or
are you looking for a simpler approach? If the latter, I rewrote
sys$manager:sylogin.template and a few other DCL procedures a while
back, and you can see the one-liner that I tend to use in that. Stick
that line inside a loop, and you're off and verifying.
If you want to add a somewhat more practical form of complexity to your
DCL, add the ability for the procedure to periodically checkpoint
itself, and to restart. That helps with recovering state from a reboot
or crash or restart, too. That also means your long-running procedure
can be force-exited or deleted, and then restarted how and as needed.
In a batch procedure, the SET RESTART_VALUE command can sometimes be
useful. There are other ways to perform this checkpoint-restart, too.
> Does anyone have anything functionally equivalent in some unix shell?
See the signal and trap built-ins in bash, and the DEBUG trap. Or send
a SIGUSR1 or SIGUSR2, etc. It's not just bash that uses these, either.
One the daemons I work with regularly is coded to trap certain signals
to change the running logging level, for instance.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list