Article 165737 of comp.os.vms:
>From: crobwcc.curtin.edu.au
>Please help! I don't think I imagined it; I am sure that there was a utility
>posted in the past which zeroes the VMS error counters...
>

I send you a macro program that does just that !
I do not remember where I got it from. 
I works well under VMS 5.5-2, however I did never run it with higher vms
versions.
Use at your own risks.
Regards
 Robert Dewald

---- Beginning of MACRO program ----


;=================================================================
;     File-Name        :  RESET_ERROR.MAR
;     Author           :  Unknown X.
;===================================================================
;     Short Description:  This program resets the error counter of
;			  a specified device 
;			  ( command: $ SHOW ERROR )
;                         Define a logical name DEVICE:
;                           $ Define DEVICE dka0
;                           $ run RESET_ERROR
;                                                                 
;=================================================================
;
; ASSEMBLE WITH $ MACRO RESET_ERROR
;
; LINK WITH $ LINK RESET_ERROR + SYS$SYSTEM:SYS.STB/SELECTIVE
;


    .TITLE RESET_ERROR

    .SBTTL PROGRAM TO RESET THE ERROR COUNTER OF A SPECIFIED DEVICE

    .LIBRARY	/SYS$LIBRARY:LIB/


; LOAD DATA STRUCTURES


    $CCBDEF
    $UCBDEF


DEVICE:	    .ASCID  /DEVICE/		; LOGICAL NAME TO TRANSLATE

CHANNEL:    .BLKL   1			; ASSIGNED CHANNEL

DIFF:	    .BLKL   1			; AUXILIARY FIELD


DUMMY:	    .BLKB   255			; DUMMY FOR TRANSLATION

TABLE:	    .ASCID  /LNM$PROCESS/	; LOGICAL NAME TRANSLATION TABLE

OUT1LEN:    .BLKB   1			; OUTPUT LENGTH OF TRANSLATION


; ITEM LIST FOR SYSTEM SERVICE

ITEM:	.WORD	    255

	.WORD	    2

	.ADDRESS    DUMMY	; TRANSLATION RESULT

	.ADDRESS    OUT1LEN	; LENGTH OF STRING

	.LONG	    0		; ITEMLIST FINISH


	    .ENTRY  START,0

	    $TRNLNM_S -			; TRANSLATE LOGICAL NAME

		    TABNAM=TABLE, -
		    LOGNAM=DEVICE,  -
		    ITMLST=ITEM

	    BLBC    R0,ERROR		; IF NOT POSSIBLE TERMINATE


	    $ASSIGN_S CHAN=CHANNEL, -	; TRY TO CONNECT A CHANNEL
		      DEVNAM=DEVICE

	    BLBC    R0,ERROR		; IF NOT POSSIBLE TERMINATE

	    $DASSGN_S	CHAN=CHANNEL	; RELEASE THE CHANNEL

	    BLBC    R0,ERROR		; IF ERROR THEN TERMINATE


; JUMP WITH CMKRNL PRIVILEGE INTO SUBROUTINE

	    $CMKRNL_S	ROUTIN=GETUCBINFO

	    RET

ERROR:	    $EXIT_S	R0	; IN CASE OF ERROR
				; TERMINATE AND WRITE ERROR MESSAGE

GETUCBINFO: .WORD   0	    ; GO, IT MEANS START WITH CMKRNL PRIVILEGE

	    MOVL    G^CTL$GL_CCBBASE,R1	    ; GET ADDRESS OF HIGH
					    ; TABLE ADDRESS END

	    SUBL3   CHANNEL,R1,DIFF	    ; BUILDING DIFFERENCE
					    ; TO ACTUALLY UCB POINTER

	    MOVL    @DIFF ,R2		    ; GET VALUE OF UCB DEVICE ADDRESS

	    MOVW    #0,UCB$W_ERRCNT(R2)	    ; RESET ERROR COUNTER
					    ; IF YOU WANT TO MAKE A JOKE,
					    ; YOU CAN CREATE DEVICE ERRORS
					    ; THAT IN REALITY DO NOT EXITS

	    MOVL    #SS$_NORMAL, R0	    ; NORMAL SUCCESSFULL COMPLETION

	    RET

	    .END START
	    
---- End of MACRO program ----


--
 Robert Dewald                           Email: dewald@achuels.conti.de  
 ICA GmbH Aachen                            or  deconm29@ibmmail.com
 Germany                                  Home: rdewald@euregio.net 
 All usual disclaimers apply here ...


