[Info-vax] turning verify on and off

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Sun Feb 3 07:45:06 EST 2013


In article <kelied$35a$1 at online.de>, helbig at astro.multiCLOTHESvax.de (Phillip Helbig---undress to reply) writes:
>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.
>
>$  SAVE_VERIFY    = 'F$VERIFY(0)'
>$  PROC_NAME      = F$PARSE(F$ENVIRONMENT("PROCEDURE"),,,"NAME")
>$  PROC_VERIFY    = "''PROC_NAME'_VERIFY"
>$  PROC_NOVERIFY  = "''PROC_NAME'_NOVERIFY"
>$  PROCEDURE      = "EXIT STATUS .OR. %X10000000 + 0*F$VERIFY(SAVE_VERIFY) !"
>$CHECK_VERIFY:
>$  PROC_VERIFY2   = "''&PROC_VERIFY'" .OR. F$TRNLNM(PROC_VERIFY)
>$  PROC_NOVERIFY2 = "''&PROC_NOVERIFY'" .OR. F$TRNLNM(PROC_NOVERIFY)
>$  ALL_VERIFY     = "''ALL_VERIFY'" .OR. F$TRNLNM("ALL_VERIFY")
>$  VERIFY         = SAVE_VERIFY .OR. PROC_VERIFY2 .OR. ALL_VERIFY
>$RETURN
>$  IF (VERIFY) THEN -
>    WRITE SYS$OUTPUT "$  PROCEDURE START ''F$ENVIRONMENT("PROCEDURE")'"
>$SET_VERIFY:
>$  DUMMY = 0*'F$VERIFY((PROC_VERIFY2 .OR. ALL_VERIFY) .AND. .NOT. PROC_NOVERIFY)'
>$RETURN
>$! this is the start of the actual procedure; stuff above is common to all
>$! put initialization stuff here
>:
>:
>:
>$LOOP:
>$  GOSUB CHECK_VERIFY
>$  GOSUB SET_VERIFY
>!put the meat of the procedure here
>:
>:
>:
>$FINISHED: !all paths ultimately exit through this label
>$  IF VERIFY THEN SET VERIFY
>$  PROCEDURE END   'F$ENVIRONMENT("PROCEDURE")'
>
>The basic idea is that by defining a symbol (for interactive testing
>mainly) or a logical name (in any table F$TRNLNM sees) one can turn the
>verification for a procedure on and off.  If verify is turned on when
>entering the procedure, the procedure turns it off but writes a message
>when it starts and finishes (add a timestamp to suit).  Defining
>ALL_VERIFY turns it on in all procedures, though this can be overridden 
>for a given procedure by defining *_NOVERIFY.  Of course, all features 
>of logical names can be used, such as defining the verify logical with 
>one value in one table and another value in another table for different 
>results depending on the node, the group etc.

I've simply written a DCL debugger making '$ SET VERIFY ...' obsolete. ;)


>Does anyone have anything functionally equivalent in some unix shell?  

-v  ...but a far cry, IMHO, to DCL command verification.


-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

Well I speak to machines with the voice of humanity.



More information about the Info-vax mailing list