XMUTCOM1 ;(WASH ISC)/CAP-XMUSRCNT.COM Count users (shareware) ;04/17/2002  12:10
 ;;8.0;MailMan;;Jun 28, 2002
ZZZ ;$!USERS.COM
 ;;$!            milt's special
 ;;$ set noon
 ;;$ ANS="N"
 ;;$ pur/nolog leeuser.log
 ;;$! del/nolog u1*.tmp.*,u2*.tmp.*
 ;;$! say " Scanning VMS interactive users..............."
 ;;$ SH USER/INTER/full/OUTPUT=U1.TMP
 ;;$! say " Scanning VMS batch users (ZSLOT) ............"
 ;;$ SH USER/BATCH/full/OUTPUT=U2.TMP
 ;;$ search/output=u11.tmp u1.tmp forum
 ;;$ search/output=u22.tmp u2.tmp bf
 ;;$ search/output=u222.tmp u22.tmp op_/match=nor
 ;;$ APPEND U222.TMP U11.TMP
 ;;$ cnt=0
 ;;$ bfcnt=0
 ;;$ open/read a U11.TMP
 ;;$READ_LOOP:    !read USERS.tmp and start extracting what we need
 ;;$ read/end=eof/error=error a line
 ;;$ if f$extract(0,1,ans) .nes. ""  then goto next_step
 ;;$! say line
 ;;$ next_step:
 ;;$ if f$extract(1,2,line) .eqs. "BF" then bfcnt=bfcnt+1
 ;;$ cnt=cnt+1
 ;;$ goto read_loop
 ;;$ next_one:
 ;;$EOF:   !end of file
 ;;$ close a
 ;;$ set ver
 ;;$ open/append a XMUSRCNT.sav
 ;;$ vmscnt=cnt-bfcnt
 ;;$ time_stamp=f$time()
 ;;$ scnt=f$string(cnt)
 ;;$ svmscnt=f$string(vmscnt)
 ;;$ sbfcnt=f$string(bfcnt)
 ;;$ usercnt="''scnt',''sbfcnt',''svmscnt',''time_stamp'"
 ;;$ write a "*****************************************************"
 ;;$ write a time_stamp
 ;;$ write a " VMS logins = "'VMSCNT'"."
 ;;$ write a " VMS Batch jobs running = "'bfcnt'"."
 ;;$ write a " TOTAL Interactive and Batch users = "'CNT'"."
 ;;$ write a ''usercnt'
 ;;$ close a
 ;;$ purge/nolog leeuser.sav
 ;;$ delete/nolog U1*.TMP.*,U2*.TMP.*
 ;;$ dsm/envir=mgrmail/data="''usercnt'" ENUSER^XMUT5Q
 ;;$! submit/que=forum7_batch XMUSRCNT.COM
 ;;$ set nover
 ;;$ exit
 ;;$ERROR:
 ;;$ say "Error has occurred during processing."
 ;;$ SAY " "
 ;;$! goto eof
 ;;$exit
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMUTCOM1   1845     printed  Sep 23, 2025@19:49:45                                                                                                                                                                                                    Page 2
XMUTCOM1  ;(WASH ISC)/CAP-XMUSRCNT.COM Count users (shareware) ;04/17/2002  12:10
 +1       ;;8.0;MailMan;;Jun 28, 2002
ZZZ       ;$!USERS.COM
 +1       ;;$!            milt's special
 +2       ;;$ set noon
 +3       ;;$ ANS="N"
 +4       ;;$ pur/nolog leeuser.log
 +5       ;;$! del/nolog u1*.tmp.*,u2*.tmp.*
 +6       ;;$! say " Scanning VMS interactive users..............."
 +7       ;;$ SH USER/INTER/full/OUTPUT=U1.TMP
 +8       ;;$! say " Scanning VMS batch users (ZSLOT) ............"
 +9       ;;$ SH USER/BATCH/full/OUTPUT=U2.TMP
 +10      ;;$ search/output=u11.tmp u1.tmp forum
 +11      ;;$ search/output=u22.tmp u2.tmp bf
 +12      ;;$ search/output=u222.tmp u22.tmp op_/match=nor
 +13      ;;$ APPEND U222.TMP U11.TMP
 +14      ;;$ cnt=0
 +15      ;;$ bfcnt=0
 +16      ;;$ open/read a U11.TMP
 +17      ;;$READ_LOOP:    !read USERS.tmp and start extracting what we need
 +18      ;;$ read/end=eof/error=error a line
 +19      ;;$ if f$extract(0,1,ans) .nes. ""  then goto next_step
 +20      ;;$! say line
 +21      ;;$ next_step:
 +22      ;;$ if f$extract(1,2,line) .eqs. "BF" then bfcnt=bfcnt+1
 +23      ;;$ cnt=cnt+1
 +24      ;;$ goto read_loop
 +25      ;;$ next_one:
 +26      ;;$EOF:   !end of file
 +27      ;;$ close a
 +28      ;;$ set ver
 +29      ;;$ open/append a XMUSRCNT.sav
 +30      ;;$ vmscnt=cnt-bfcnt
 +31      ;;$ time_stamp=f$time()
 +32      ;;$ scnt=f$string(cnt)
 +33      ;;$ svmscnt=f$string(vmscnt)
 +34      ;;$ sbfcnt=f$string(bfcnt)
 +35      ;;$ usercnt="''scnt',''sbfcnt',''svmscnt',''time_stamp'"
 +36      ;;$ write a "*****************************************************"
 +37      ;;$ write a time_stamp
 +38      ;;$ write a " VMS logins = "'VMSCNT'"."
 +39      ;;$ write a " VMS Batch jobs running = "'bfcnt'"."
 +40      ;;$ write a " TOTAL Interactive and Batch users = "'CNT'"."
 +41      ;;$ write a ''usercnt'
 +42      ;;$ close a
 +43      ;;$ purge/nolog leeuser.sav
 +44      ;;$ delete/nolog U1*.TMP.*,U2*.TMP.*
 +45      ;;$ dsm/envir=mgrmail/data="''usercnt'" ENUSER^XMUT5Q
 +46      ;;$! submit/que=forum7_batch XMUSRCNT.COM
 +47      ;;$ set nover
 +48      ;;$ exit
 +49      ;;$ERROR:
 +50      ;;$ say "Error has occurred during processing."
 +51      ;;$ SAY " "
 +52      ;;$! goto eof
 +53      ;;$exit