% VAX-11 Librarian V03-00u>W[Wd   y  ACCOUNTNG CLEANMBX >DELGBL ,GETIDGETPIDGETSTAT\RXSTATSLEEPSYSMSG  JW- subroutine accounting(qn, un, uic, cpu, dio) implicit integer (a-w) integer*2 nt(7) integer systim(2) character*4 qn character*12 unc group = uic/65536 member = MOD(uic, 65536)c, open(unit=2,file='SYS$MANAGER:PLOTACC.DAT',* 1 access='APPEND', err=50, status='OLD') go to 100 50 continue, open(unit=2,file='SYS$MANAGER:PLOTACC.DAT', 1 err=500, status='NEW') 100 continue st = sys$numtim(nt,) st = sys$gettim(systim)% WRITE(2,180) (nt(k), k=2, 7), systim- WRITE(2,200) qn, un, group, member, cpu, dio close(unit=2) return&180 format(' * ', 6i3, 2xz8.8, 1xz8.8)@200 format(1xa4, 1xa12, 1x,'[',o3.3, ',', o3.3, ']', 2xi5, 2xi7) 500 continue' print *, ' Couldn''t Open PLOTACC.DAT' return endww aW program delete$mbx implicit integer (a-z) integer*2 chan character*6 mbnamec 10 continue accept 100, mbname 100 format(a)$ if (mbname .eq. ' ') call exit! st1 = sys$assign(mbname, chan,,) st2 = sys$delmbx(%VAL(chan)) go to 10 endwwc. error messages; and returning the status, as an integer, toc. the caller.c.<c. A convienient way to print the system message and get theEc. status as an integer is by using it to call a system service, e.g.c.%c. iret= SYSMSG( SYS$service(...) )c.5c. (Be careful to declare SYSMSG as type INTEGER!!!!)c.c. c. call MSGSET( iunit, iaction )1c. To change the defaults of the SYSMSG routine.c.:C. iunit == The output unit (0=no_output) .. Default = 61C. iaction == the action to be taken on a message.C. 0 == Print errors, then return .. Default1C. +1 == Print all messages, Including: msgnum=1-c. +2 == ABORT, and thus TRACEBACK, If ERRORc. -end.of.info-c. INTEGER MSGNUMC------ CHARACTER MSG*255C.$ DATA JUNIT/6/, JPRALL/0/, JABORT/0/C.C...? OUTPUT THE MESSAGEC. IF( JUNIT.NE.0 .AND.+ 1 ( JPRALL.NE.0 .OR. (msgnum.ne.1) )) THENC.9 CALL SYS$GETMSG( %VAL(MSGNUM), ILEN, MSG, %VAL(-1) , )+ WRITE( JUNIT, 110 ) MSGNUM, MSG(1:ILEN )110 FORMAT( z10, '=', A ) ENDIFC.C...? ABORT THE PROGRAMC.) IF( JABORT.NE.0 .AND. .NOT.MSGNUM ) THENC. CALL LIB$STOP( %VAL(MSGNUM) ) ENDIFC. SYSMSG = MSGNUMC. RETURN C. .........C.C++++++C.C. ENTRY MSGSET( IUNIT, IACTION )C------ JUNIT = IUNIT JPRALL = IACTION.AND.1 JABORT = IACTION.AND.2 RETURN C. ......... endww