tencati@JPL-VLSI.ARPA.UUCP (04/06/87)
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