Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!JPL-VLSI.ARPA!tencati From: tencati@JPL-VLSI.ARPA.UUCP Newsgroups: mod.computers.vax Subject: VMSmail msg count Message-ID: <870406105313.05g@Jpl-VLSI.ARPA> Date: Mon, 6-Apr-87 13:53:13 EST Article-I.D.: Jpl-VLSI.870406105313.05g Posted: Mon Apr 6 13:53:13 1987 Date-Received: Wed, 8-Apr-87 06:35:31 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 30 Approved: info-vax@sri-kl.arpa Here's yet another program to list outstanding messages for a user. This routine takes between zero and eight usernames as parameters. It requires SYSPRV to run. Cheers, Ron Tencati JPL-VLSI.ARPA ---------------------------------cut here--------------------------------------- $set noon $ if p1 .eqs. "" then inquire p1 "Check mail for user" $ n = 1 $ prev_priv = f$setprv("SYSPRV") $ sysmai = "SYS$SYSTEM:VMSMAIL.DAT" $ open /share=write /read f1 'sysmai' $Loop: $ arg = P'n $ fulluser[0,31] := 'arg $ read /index=0 /err=done /key="''fulluser'" f1 record $ num = f$cvui(33*8,8,record) $ Fulluser = f$edit(fulluser,"TRIM") $ write sys$output "''fulluser' has ''num' messages." $ n = n+1 $ if n .le. 8 then goto loop $done: $ close f1 $ prev_priv = f$setprv(prev_priv) $ exit