Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMUTCOM1

XMUTCOM1.m

Go to the documentation of this file.
  1. XMUTCOM1 ;(WASH ISC)/CAP-XMUSRCNT.COM Count users (shareware) ;04/17/2002 12:10
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. ZZZ ;$!USERS.COM
  1. ;;$! milt's special
  1. ;;$ set noon
  1. ;;$ ANS="N"
  1. ;;$ pur/nolog leeuser.log
  1. ;;$! del/nolog u1*.tmp.*,u2*.tmp.*
  1. ;;$! say " Scanning VMS interactive users..............."
  1. ;;$ SH USER/INTER/full/OUTPUT=U1.TMP
  1. ;;$! say " Scanning VMS batch users (ZSLOT) ............"
  1. ;;$ SH USER/BATCH/full/OUTPUT=U2.TMP
  1. ;;$ search/output=u11.tmp u1.tmp forum
  1. ;;$ search/output=u22.tmp u2.tmp bf
  1. ;;$ search/output=u222.tmp u22.tmp op_/match=nor
  1. ;;$ APPEND U222.TMP U11.TMP
  1. ;;$ cnt=0
  1. ;;$ bfcnt=0
  1. ;;$ open/read a U11.TMP
  1. ;;$READ_LOOP: !read USERS.tmp and start extracting what we need
  1. ;;$ read/end=eof/error=error a line
  1. ;;$ if f$extract(0,1,ans) .nes. "" then goto next_step
  1. ;;$! say line
  1. ;;$ next_step:
  1. ;;$ if f$extract(1,2,line) .eqs. "BF" then bfcnt=bfcnt+1
  1. ;;$ cnt=cnt+1
  1. ;;$ goto read_loop
  1. ;;$ next_one:
  1. ;;$EOF: !end of file
  1. ;;$ close a
  1. ;;$ set ver
  1. ;;$ open/append a XMUSRCNT.sav
  1. ;;$ vmscnt=cnt-bfcnt
  1. ;;$ time_stamp=f$time()
  1. ;;$ scnt=f$string(cnt)
  1. ;;$ svmscnt=f$string(vmscnt)
  1. ;;$ sbfcnt=f$string(bfcnt)
  1. ;;$ usercnt="''scnt',''sbfcnt',''svmscnt',''time_stamp'"
  1. ;;$ write a "*****************************************************"
  1. ;;$ write a time_stamp
  1. ;;$ write a " VMS logins = "'VMSCNT'"."
  1. ;;$ write a " VMS Batch jobs running = "'bfcnt'"."
  1. ;;$ write a " TOTAL Interactive and Batch users = "'CNT'"."
  1. ;;$ write a ''usercnt'
  1. ;;$ close a
  1. ;;$ purge/nolog leeuser.sav
  1. ;;$ delete/nolog U1*.TMP.*,U2*.TMP.*
  1. ;;$ dsm/envir=mgrmail/data="''usercnt'" ENUSER^XMUT5Q
  1. ;;$! submit/que=forum7_batch XMUSRCNT.COM
  1. ;;$ set nover
  1. ;;$ exit
  1. ;;$ERROR:
  1. ;;$ say "Error has occurred during processing."
  1. ;;$ SAY " "
  1. ;;$! goto eof
  1. ;;$exit