$ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990 $! On 9-NOV-1990 16:53:05.86 By user FYSEPS $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. USERS.MAR;27 $! 2. USERSMSG.MSG;1 $! 3. USERS.HLP;20 $! 4. USERS_INSTALL.COM;13 $! 5. USERS_DEINSTALL.COM;2 $! 6. USERS_BUILD.COM;5 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ ve=f$getsyi("version") $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ if .not. f$verify() then $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:= CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b)); LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1); IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE; MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1; ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")= 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF"; POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r); ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1; COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE, "output_file"));ENDPROCEDURE;Unpacker;QUIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create 'f' X`09.title users X`09.ident /V7.41/ X X;+ X; The best users program ever made by some REAL programmers X; X;`09By: Tord Malmgren FyL NFE F260/FYSEPS X;`09 Magnus Marcuson FyL NFE F261/FYSEPS X; At: SESUF51.BITNET, VAND.PHYSTO.SE.INTERNET (130.237.208.35) X; X;+ X; v 3.1 88-12-04 ; Almost the first version, no CDU, no nothing - But FAST V !!! X; v 3.2 88-12-06`20 X; v 4.0 89-03-23 ; Enable CDU BATCH,SUBPROCESS,PROCESS(def) and ALL, Tord X; v 5.0 89-05-18 ; Change CDU-checking, bold, and CDU GROUP, Tord X; v 5.1 89-05-31 ; Added /BRIEF, Magnus X; v 5.11 89-06-01 ; Optimizing code (the faster the better), Tord X; v 5.12 89-08-10 ; Fix /SUBPROCESS . Now, it really works (I hope), Tord X; v 5.13 89-08-11 ; Change from loops to MOVC5 and adding LIB$SIGNAL, Tord X; v 5.2 89-08-15 ; Enhanced ERROR checking, Tord and Magnus X; v 5.3 89-08-15 ; Start using system internals for /BRIEF, Magnus X; v 5.4 89-08-15 ; Enable qualifier (CDU) USER (Value required), Tord X; v 5.41 89-08-15 ; Changed formatting to $FAO in /BRIEF routine, Magnus X; v 6.0 89-08-16 ; Implemented $FAO for the rest, Tord X; v 7.0 89-08-16 ; Sorted output, NICE!, Magnus X; v 7.1 89-08-17 ; Enable CDU NETWORK and changed CDU checking (again), Tor Vd X; v 7.2 90-01-30 ; CR/LF, CDU USER to par., Username for Process Name, Tord X; v 7.3 90-09-20 ; Changed CDU USER to (list), Tord X; v 7.31 90-09-23 ; Changed the output when not logged in, Tord X; v 7.4 90-10-28 ; Enabled CDU DETACHED to show the detached processes, Tor Vd X; v 7.41 90-10-29 ; Fixed the NULL process and NULL-username, Tord X;- X X`09.external users_nrdprc X`09.external users_sumpcl X`09.external users_ntlgin X`09.external sys$gw_ijobcnt,sys$gw_bjobcnt ;defined in SYS$SYSTEM:SYS.STB V,be sure to link with it X X Xnumpag:`09.long`09`09`09;Number of pages of Virtual memory to allocate Xbaseadr:.long Xspaces:`09.ascii / / Xsune:`09.long Xstdsc:`09.long 12,string Xstcvt:`09.ascid "!12AF" Xpid:`09.long`20 X`09.long 0 Xmpid:`09.long X`09.long 0 Xprcnam:`09.blkb 15 Xprclen:`09.long Xprcdsc:`09.long 15,prcnam Xusname:`09.blkb 13 Xuslen:`09.long Xusdsc:`09.long 12,usname Xstate:`09.long Xlgntim:`09.quad Xcurtim:`09.quad Xterm:`09.blkb 7 Xtermlen:.long Ximage:`09.blkb 128 Ximglen:`09.long Xtme:`09.long Xallan:`09.blkb 22 Xtimdesc:.long 22,allan Xuic:`09.long Xmode:`09.long Xefwm:`09.long Xprccnt:`09.long 0 Xquch:`09.byte 0 Xprqu:`09.byte 0 Xshow:`09.byte Xshow1:`09.byte Xshow2:`09.byte Xavo:`09.long Xgrp1:`09.long Xgrp2:`09.long Xcurprc:`09.long 0 Xusen:`09.byte 0`09`09`09`09`09; NOT enabled Xstring:`09.blkb 12 Xvalue:`09.long 12,string Xvallen:`09.long 0 Xst:`09.blkb 5 Xgen:`09.byte 0 XDCL:`09.ascii / (DCL)/ X X Xjpi_item: X`09.word 4,jpi$_mode X`09.address mode X`09.long 0 X X`09.word 4,jpi$_pid X`09.address pid X`09.long 0 X X`09.word 4,jpi$_master_pid X`09.address mpid X`09.long 0 X X`09.word 15,jpi$_prcnam X`09.address prcnam X`09.address prclen X X`09.word 12,jpi$_username X`09.address usname X`09.address uslen X X`09.word 4,jpi$_state X`09.address state X`09.long 0 X X`09.word 8,jpi$_logintim X`09.address lgntim X`09.long 0 X X`09.word 4,jpi$_uic X`09.address uic X`09.long 0 X X`09.word 4,jpi$_grp X`09.address grp1 X`09.long 0 X X`09.word 7,jpi$_terminal X`09.address term X`09.address termlen X X`09.word 128,jpi$_imagname X`09.address image X`09.address imglen X X`09.word 4,jpi$_efwm X`09.address efwm X`09.long 0 X X X`09.long 0 ; end of jpi structure X X Xstlist:`09.ascii /COLPG/ X`09.ascii /MWAIT/ X`09.ascii /CEF / X`09.ascii /PFW / X`09.ascii /LEF / X`09.ascii /LEFO / X`09.ascii /HIB / X`09.ascii /HIBO / X`09.ascii /SUSP / X`09.ascii /SUSPO/ X`09.ascii /FPG / X`09.ascii /COM / X`09.ascii /COMO / X`09.ascii /CUR /`09`09; end of state list X Xefwmls:`09.ascii /RWAST/ X`09.ascii /RWMBX/ X`09.ascii /RWNPG/ X`09.ascii /RWPFF/ X`09.ascii /RWPAG/ X`09.ascii /RWBRK/ X`09.ascii /RWIMG/ X`09.ascii /RWQUO/ X`09.ascii /RWLCK/ X`09.ascii /RWSWP/ X`09.ascii /RWMPE/ X`09.ascii /RWMPB/ X`09.ascii /RWSCS/ X`09.ascii /RWCLU/ X`09.ascii /RWMAX/`09`09; End of efwm-list X Xbatch:`09.ascid /BATCH/ Xsubpro:`09.ascid /SUBPROCESS/ Xproc:`09.ascid /PROCESS/ Xall:`09.ascid /ALL/ Xgroup:`09.ascid /GROUP/ Xsumm:`09.ascid /BRIEF/ Xuser:`09.ascid /USER/ Xnet:`09.ascid /NETWORK/ Xdet:`09.ascid /DETACHED/ Xqlis:`09.long batch,subpro,proc,all,net,det Xvlis:`09.byte 2,1,4,31,8,16 X X Xwildpid:.long -1 X Xincint:`09.ascii <27>/`5B1m/ Xnincit:`09.ascii <27>/`5Bm/ Xttbuf:`09.byte 10 X`09.blkb 79 X`09.byte 13 Xttbdsc:`09.long 81,ttbuf Xbufcvt:`09.ascid "!2/ !4XW !12AD !15AF `5B!3OW,!3OW`5D !5AD !7AD !6AD !14AD V " Xheader:`09.ascii <10>/ PID Username Process Name UIC State Con Vnect TTY Subsys/ Xheadfo: .ascii <13><10>/ ---- ------------ --------------- --------- ----- - V------ ------ -------------/<13> Xtty:`09.ascid /sys$output/ Xttchan:`09.word Xsms:`09.ascid / Interactive: !SL, Batch: !SL./ Xsmslen:`09.word Xsmdsc:`09.long 60,smbuf Xsmbuf:`09.blkb 60 X Xdvi_item: X`09.word 4,dvi$_devdepend2 X`09.address avo X`09.long 0 X`09.long 0`09`09`09; End of dvi-list X Xjpi_itm2: X`09.word 4,jpi$_grp X`09.address grp2 X`09.long 0 X`09.long 0`09`09`09; End of short jpi-list X Xcp:`09.long X Xg_item:`09.long 0 Xg_tmp:`09.long Xs16:`09.long 20 Xout:`09.long 4 Xtotlen:`09.long 0 Xnulls:`09.long 0 X`09.long 0 X`09.long 0 X X`09.entry users,0 X X X`09movl #1,r9`09`09`09`09;Init for the Sort X X`09$assign_s devnam=tty,- X`09`09chan=ttchan X`09jsb errchk`09`09`09`09; Check for ERROR X X`09pushal summ X`09calls #1,cli$present X`09blbc r0,160$ X`09brw 150$ X X160$:`09$getjpiw_s pidadr=curprc,- X`09`09itmlst=jpi_itm2 X`09jsb errchk`09`09`09; Check for ERROR X X`09$getdviw_s devnam=tty,- X`09`09itmlst=dvi_item X`09jsb errchk`09`09`09; Check for ERROR X X`09pushal user X`09calls #1,cli$present X`09blbs r0,225$ X`09brw 602$ X X225$:`09movb #1,usen X`09pushal vallen X`09pushal value X`09pushal user X`09calls #3,cli$get_value X`09movl r0,r10`09`09; save the code in r-zip X`09pushal g_tmp X`09pushal s16`09`09; # of bytes. 12+4+4 (username+link+length) X`09calls #2,g`5Elib$get_vm`09; and get the memory needed X`09movl g_tmp,g_item`09; the base address of list X`09movc3 #12,string,@g_tmp`09; Move in the username X`09addl2 vallen,totlen`09; store the total size if not logged in X`09addl2 #2,totlen X`09movl g_tmp,r11`09`09; and save the address for next item X`09movl #0,12(r11)`09`09; set a zip as long, and for later use X`09movl vallen,16(r11)`09; and store the length aswell X X205$:`09cmpl r10,#`5EX3FD39`09; is it the last one? X`09bneq 602$`09`09; yes, then skip X`09pushal vallen`09`09; else find new user X`09pushal value X`09pushal user X`09calls #3,cli$get_value X`09movl r0,r10 X`09pushal g_tmp X`09pushal s16 X`09calls #2,g`5Elib$get_vm`09; and get the memory X`09movl g_tmp,12(r11)`09; store it as a link to the other one X`09movc3 #12,string,@g_tmp X`09addl2 vallen,totlen X`09addl2 #2,totlen X`09movl g_tmp,r11`09`09; and memory the new address X`09movl #0,12(r11) X`09movl vallen,16(r11) X`09brb 205$ X X X602$:`09pushal group X`09calls #1,cli$present X`09blbc r0,611$ X`09movb #1,gen X X611$:`09moval qlis,r8 X`09movab vlis,r7 X`09movl #6,r5 X X600$:`09pushl (r8)+ X`09calls #1,cli$present X`09blbc r0,601$ X`09bisb2 (r7),quch X601$:`09incl r7 X`09sobgtr r5,600$ X X`09extzv #0,#5,quch,show1 X`09bneq 510$ X`09bisb2 #4,quch`09`09`09`09; default process X X510$:`09$gettim_s curtim`09`09`09; Get current time X`09jsb errchk`09`09`09`09; Check for ERROR X X`09clrl r11 X X`09bitb #2,quch X`09beql 800$ X`09bitb #13,quch X`09bneq 800$ X`09tstw sys$gw_bjobcnt X`09bneq 800$ X`09$exit_s X X800$:`09addw3 sys$gw_ijobcnt,sys$gw_bjobcnt,r11 X`09addl2 #4,r11`09`09`09`09;not more than 4 logins in a few microseconds X`09mull2 #81,r11 X`09divl2 #512,r11 X`09addl3 r11,#1,numpag`09`09`09;max num. of pages X X`09pushal baseadr X`09pushal numpag X`09calls #2,g`5Elib$get_vm_page`09`09;And get the Memory requiredd to do the V sort X`09jsb errchk`09`09`09`09; Check for ERROR X X10$:`09clrq lgntim X`09clrb image X X`09$getjpiw_s pidadr=wildpid,- X`09`09 itmlst=jpi_item X X`09cmpw r0,#ss$_nomoreproc X`09bnequ 79$ X`09brw 13$ X X79$:`09cmpw r0,#ss$_nopriv X`09beqlu 10$ X X`09tstl uic X`09beqlu 10$ X X`09cmpw r0,#ss$_suspended X`09beql 500$ X X`09jsb errchk`09`09`09; Check for ERROR X X500$:`09tstb usen X`09beql 415$ X`09movl g_item,r10 X X226$:`09cmpc3 16(r10),(r10),usname X`09beql 415$ X`09movl 12(r10),r10 X`09tstl r10 X`09bneq 226$ X`09brb 10$ X X415$:`09clrb prqu X`09cmpl mode,#jpi$k_network X`09bneq 114$ X`09bisb2 #8,prqu`09`09`09; network X`09brb 86$ X X114$:`09cmpl mode,#jpi$k_batch X`09bnequ 104$ X`09bisb2 #2,prqu`09`09`09; batch X`09brb 86$ X X104$:`09cmpl pid,mpid X`09beql 106$ X`09bisb2 #1,prqu`09`09`09; subprocess X`09brb 86$ X X106$:`09cmpl mode,#jpi$k_detached X`09bnequ 105$ X`09bisb2 #16,prqu`09`09`09; detached X`09brb 86$ X X105$:`09cmpl mode,#jpi$k_interactive X`09bnequ 86$ X`09bisb2 #4,prqu`09`09`09; neither of above - process X`09brb 86$ X X86$:`09tstb gen X`09beql 610$ X`09cmpb grp1,grp2 X`09bneq 120$ X X610$:`09bitb prqu,quch X`09bneq 14$ X X120$:`09brw 10$ X X14$:`09tstb usname X`09bneq 16$ X`09movl #0,uslen X16$:`09decl state X`09mull3 #5,state,r2 X`09cmpl #1,state X`09beql 505$ X`09movc3 #5,stlist`5Br2`5D,st X`09brb 103$ X X505$:`09decl efwm X`09mull3 #5,efwm,r10 X`09movc3 #5,efwmls`5Br10`5D,st X X103$:`09tstl lgntim X`09bneq 504$ X`09tstl lgntim+4 X`09bneq 504$ X X`09movq spaces,allan+2 X`09brb 46$ X X504$:`09subl2 curtim,lgntim X`09sbwc curtim+4,lgntim+4 ; Subtract quadwords to get connect time X X`09$asctim_s timlen=tme,- X`09`09timbuf=timdesc,- X`09`09timadr=lgntim X`09jsb errchk`09`09`09; Check for ERROR X X46$:`09tstb term X`09beql 81$ X`09decl termlen X X81$:`09tstb image X`09bneq 99$ X`09movl #9,r8 X`09movab dcl,r7 X`09brb 15$ X X99$:`09movl imglen,r6 X`09movab image,r5 X X7$:`09cmpb #`5Ea"<",(r5) X`09bneq 6$ X`09movb #`5Ea"`5B",(r5) X X6$:`09cmpb #`5Ea">",(r5) X`09bneq 2$ X`09movb #`5Ea"`5D",(r5) X X2$:`09incl r5 X`09sobgtr r6,7$ X X`09movl imglen,r8 X`09movab image,r7 X X1$:`09locc #`5Ea"`5D",r8,(r7) X`09beql 5$ X`09addl3 #1,r1,r7 X`09movl r0,r8 X`09brb 1$ X X5$:`09locc #`5Ea".",r8,(r7) X`09beql 15$ X`09subl2 r0,r8 X X15$:`09pushl r7 X`09pushl r8 X`09pushal term X`09pushl termlen X`09pushal allan+3`09`09`09; Time X`09pushl #7 X`09pushal st X`09pushl #5 X`09movzwl uic,-(SP) X`09movzwl uic+2,-(SP) X`09pushal prcnam X`09pushl prclen X`09pushal usname X`09pushl uslen X`09movzwl pid,-(SP) X`09pushal ttbdsc X`09pushal sune X`09pushal bufcvt X`09calls #15,sys$fao X`09jsb errchk X X`09cmpl state,#13 X`09bneq 903$ X`09movb #`5Ea">",ttbuf+2 X903$: X X X; And now, sort (insertion) X X X; r6=local index for the sort X; r7=local count for the number of entries X; r9=global count for the number of entries X; r11=vector to the allocated sort area X X X`09movl #1, r6`09`09`09;index for the sort X`09movl baseadr,r11 X`09subl3 #1,r9,r5 X`09cmpl r9,#1`09`09`09;the first one? X`09bneq 702$ X`09movc3 #81,ttbuf,(r11) X`09brw 705$ X X X702$:`09cmpc3 #12,ttbuf+7,7(r11) X`09bgeq 701$`09`09`09;Don't swap X;`09INsert X`09 X`09subl3 r6,r9,r10`09`09`09;Number of lines to move X`09mull #81,r10`09`09`09;Number of bytes to move X`09movc3 r10,(r11),81(r11) X`09movc3 #81,ttbuf,(r11) X`09brb 705$ X X701$:`09addl #81,r11 X`09incl r6 X`09sobgtr r5,702$ X X`09movc3 #81,ttbuf,(r11)`09`09;Well,then we'll just have to insert it in the V rear,won't we?`09 X X705$:`09;It's inserted at the right place now X`09incl r9 X`09brw 10$ X X13$:`09movl baseadr,r11 X`09cmpl r9,#1 X`09bneq 605$ X`09brw 606$ X X605$:`09$qiow_s chan=ttchan,- X`09`09func=#io$_writevblk!io$m_nofiltr,- X`09`09p1=header,- X`09`09p2=#155 X`09jsb errchk`09`09`09; Check for ERROR X X`09decl r9 X X512$:`09cmpb 2(r11),#`5EA">" X`09bneq 503$ X`09bitl #tt2$m_avo,avo X`09beql 503$ X X`09$qiow_s chan=ttchan,- X`09`09func=#io$_writevblk!io$m_nofiltr,- X`09`09p1=incint,- X`09`09p2=#4 X`09jsb errchk`09`09`09; Check for ERROR X X503$:`09$qiow_s chan=ttchan,- X`09`09func=#io$_writevblk!io$m_nofiltr,- X `09`09p1=(r11),- X`09`09p2=#81 X`09jsb errchk`09`09`09; Check for ERROR X X420$:`09cmpb 2(r11),#`5EA">" X`09bneq 110$ X`09bitl #tt2$m_avo,avo X`09beql 110$ X X`09$qiow_s chan=ttchan,- X`09`09func=#io$_writevblk!io$m_nofiltr,- X`09`09p1=nincit,- X`09`09p2=#3 X`09jsb errchk`09`09`09; Check for ERROR X X110$:`09incl prccnt X`09addl #81,r11 X`09decl r9 X`09tstl r9 X`09beql 922$ X`09brw 512$ X X922$:`09$qiow_s chan=ttchan,- X`09`09func=#io$_writevblk!io$m_nofiltr,- X`09`09p1=headfo,- X`09`09p2=#81 X`09jsb errchk`09`09`09; Check for ERROR X X606$:`09tstl prccnt X`09beql 232$ X`09brw 9999$ X232$:`09bitb #4,quch X`09bneq 233$ X`09brw 700$ X233$:`09tstl vallen X`09bneq 234$ X`09brw 700$ X X X;This should be the output when user not logged in X234$:`09pushal out X`09addl2 #4,totlen X`09pushal totlen X`09subl2 #4,totlen X`09calls #2,g`5Elib$get_vm`09`09; Get the memory X`09movl out,@out X`09movl g_item,r10`09`09`09; Store the user-list address X`09addl3 #4,out,r9 X231$:`09movc3 16(r10),(r10),(r9)`09; move in the user-name X`09addl2 16(r10),r9`09`09; and inc the address X`09movw #`5Ea/, /,(r9)`09`09; move in /, / X`09addl2 #2,r9 X`09movl 12(r10),r10`09`09; and get a new address X`09tstl r10`09`09`09; check if it's zip or not X`09bneq 231$ X`09subl2 #2,totlen X X`09pushl out+4 X`09pushl totlen X`09pushal out X`09pushal sune X`09pushal stcvt X`09calls #5,sys$fao X X`09addl2 #4,out X`09pushl out X`09pushl totlen X`09pushl #2 X`09pushal users_ntlgin X`09calls #4,g`5Elib$signal X`09brb 700$ X X9999$:`09pushl prccnt X`09pushl #1 X`09pushal users_nrdprc X`09calls #3,g`5Elib$signal X X;And free the allocated memory X700$:`09pushal baseadr X`09pushal numpag X`09calls #2,g`5Elib$free_vm_page`09`09;And get the Memory required to do the V sort X`09jsb errchk`09`09`09; Check for ERROR X X`09$exit_s X X X150$:`09movzwl sys$gw_bjobcnt,-(SP) X`09movzwl sys$gw_ijobcnt,-(SP) X`09pushl #2 X`09pushal users_sumpcl X`09calls #4,g`5Elib$signal X`09jsb errchk X X`09$qiow_s chan=ttchan,- X`09`09func=#io$_writevblk!io$m_nofiltr,- X`09`09p1=smbuf,- X`09`09p2=smslen X`09jsb errchk`09`09`09; Check for ERROR X X`09$exit_s X X X Xerrchk:: X X`09blbs r0,300$ X`09$exit_s r0`09`09`09; Let him know what the ERROR is ! X300$:`09rsb X X`09.end users $ CALL UNPACK USERS.MAR;27 1325730656 $ create 'f' X.title Message for USERS X.facility USERS,1 X.severity INFORMATIONAL XNRDPRC`09/FAO_COUNT=1 XSUMPCL`09/FAO_COUNT=2 XNTLGIN /FAO_COUNT=1 X.end $ CALL UNPACK USERSMSG.MSG;1 1258901811 $ create 'f' X3 USERS X X This is a small fast routine scanning the system list of processes X and displays them after the qualifiers specified by the user. Any X questions, comments or bug report should be sent to Tord Malmgren or X Magnus Marcuson in person or via E-mail to FYSEPS X X Format: X X USERS `5Busername`5B,...`5D`5D X X4 Examples X X $ USERS X PID Username Process Name UIC State Connect TTY Subsys X ---- ------------ --------------- --------- ----- ------- ------ ------ X 0696 F260 19:07 Tord@Home `5B370,524`5D HIB 0 03:04 TXF4 RTPA VD`20 X >07F5 F260 Tord@Home-VAND `5B370,524`5D CUR 0 00:00 RTA1 USER VS`20 X ---- ------------ --------------- --------- ----- ------- ------ ------ X %USERS-I-NRDPRC, Number of Displayed Processes: 2`20 X X $USERS/BRIEF X %USERS-I-SUMPCL, Interactive Jobs: 8, Batch Jobs: 2`20 X X4 Command_Qualifiers X X/ALL X X /ALL X X This qualifier is analougous to specifying the qualifiers /BATCH, X /DETACHED, /NETWORK, /PROCESS and /SUBPROCESS X X/BATCH X X /BATCH X X Displays all batches active X X/BRIEF X X /BRIEF X X Yields a brief information about the system - number if interactive X processes and the number of active batches X X/DETACHED X X /DETACHED X X Displays all the specified processes that is detached X X/GROUP X X /GROUP X X Displays only the selected processes that is active within your group X X/NETWORK X X /NETWORK X X Displays the active network processes in the system X X/PROCESS X X /PROCESS (default) X X Displays all interactive processes that is running in the system X X/SUBPROCESS X X /SUBPROCESS X X Displays all subprocesses in the system list X $ CALL UNPACK USERS.HLP;20 1144919164 $ create 'f' X$ SET VERIFY X$! X$! X$! Install the USERS program (If you install this routine, please notify X$! the authors on the addresses specified in USERS.MAR) X$! X$! X$! Check if the user has SYSPRV and CMKRNL X$! X$ IF .NOT.F$PRIVILEGE("SYSPRV") THEN GOTO NOPRV X$ IF .NOT.F$PRIVILEGE("CMKRNL") THEN GOTO NOPRV X$! X$! X$! Now, Install the CLD file into the system default table. X$! X$ SET COMMAND /TABLES=SYS$LIBRARY:DCLTABLES /OUTPUT=SYS$LIBRARY:DCLTABLES - X USERS.CLD X$ RUN SYS$SYSTEM:INSTALL XSYS$LIBRARY:DCLTABLES/REPLACE X/EXIT X$! X$! X$! Now install the Image with the necessary WORLD privilege X$! (to be able to obtain world-wide process info) If the utility X$! already is installed; add the qualifier /REPLACE X$! X$ RUN SYS$SYSTEM:INSTALL XUSERS.EXE/OPEN/PRIVILEGE=WORLD X/EXIT X$! X$! X$ SET NOVERIFY X$ WRITE SYS$OUTPUT "%USERS_INSTALLATION-I, installation updated." X$ WRITE SYS$OUTPUT "%USERS_INSTALLATION-I, log out and in again to have the" V+ X " new definitions activated" X$ EXIT X$NOPRV: X$ SET NOVERIFY X$ WRITE SYS$OUTPUT "%USERS_INSTALLATION-W, one of the privileges SYSPRV or C VMKRNL are not set" X$ EXIT $ CALL UNPACK USERS_INSTALL.COM;13 353068204 $ create 'f' X$ SET NOON X$ SET VERIFY X$ IF .NOT.F$PRIVILEGE("SYSPRV") THEN GOTO NOPRV X$ IF .NOT.F$PRIVILEGE("CMKRNL") THEN GOTO NOPRV X$ SET COMMAND /TABLES=SYS$LIBRARY:DCLTABLES /OUTPUT=SYS$LIBRARY:DCLTABLES - X /DELETE=USERS X$ RUN SYS$SYSTEM:INSTALL XSYS$LIBRARY:DCLTABLES/REPLACE XUSERS.EXE/DELETE X/EXIT X$! X$! X$ SET NOVERIFY X$ WRITE SYS$OUTPUT "%USERS_DEINSTALLATION-I, log out and in again to have th Ve"+ X " new definitions activated" X$ EXIT X$NOPRV: X$ SET NOVERIFY X$ WRITE SYS$OUTPUT "%USERS_DEINSTALLATION-W, one of the privileges SYSPRV or V CMKRNL are not set" X$ EXIT $ CALL UNPACK USERS_DEINSTALL.COM;2 1548964272 $ create 'f' X$ SET VERIFY X$! X$! This routine compiles the utility, and links it X$! X$! Start with creating a message object file X$! X$ MESSAGE USERSMSG X$! X$! X$! Compile it X$! X$ MACRO/DISABLE=(TRACEBACK,DEBUG) USERS X$! X$! X$! and link it with the other objects X$! X$ LINK/NODEBUG/NOTRACEBACK USERS,USERSMSG,SYS$SYSTEM:SYS.STB/SEL X$! X$! X$! Use USERS_INSTALL.COM to install USERS X$! X$ SET NOVERIFY X$ EXIT X X X $ CALL UNPACK USERS_BUILD.COM;5 994188076 $ v=f$verify(v) $ EXIT