Article View: mod.computers.vax
Article #3818A (rough draft of a) VMSMAIL.DAT Utility...
From: xrjjm%6173.span
Date: Wed, 18 Mar 1987 10:35
Date: Wed, 18 Mar 1987 10:35
64 lines
3366 bytes
3366 bytes
Comment: Begin User Supplied Mail Headers.
*Site: NASA Goddard Space Flight Center - Greenbelt, Maryland, USA.
*From: John J. McMahon, Systems Programmer, STX - ST Systems Corporation.
*Project: COBE Science Data Room (CSDR), Code 401.1
*Reply-To: (Arpa-Internet) XRJJM%6173.SPAN@JPL-VLSI.ARPA
*Reply-To: (Bitnet) ZMJJM@SCFVM
*Reply-To: (Span/Physnet/Hepnet) 6173::XRJJM = CSDR::XRJJM (Node 6.29)
A couple weeks ago someone asked if he could access the "Number of New Mail
Messages Waiting" from DCL. Anyhow, curiosity set in for me, and I decided
to create a DCL utility to read items out of the VMSMAIL.DAT file.
For those of you interested in trying this, I would suggest looking at the
MAILUAF.COM program in SYS$EXAMPLES: and/or the source code for Rich Garland's
FINGER program.
Now, before I get to the program... My question is:
Where can I find the details on how MAIL.MAI and VMSMAIL.DAT are set up ?
I checked the VMS MAIL Reference and didn't find anything...
Ideas?
Here is the program (No Licenses/Warranty ... as Usual)
The program assumes that you have READ access to the SYS$SYSTEM:VMSMAIL.DAT file
from DCL (either through normal file protection, or privledge).
What the program does:
a) Extracts your personal name, number of pieces of new mail waiting and
forwarding address from VMSMAIL.DAT
b) Writes them out to SYS$OUTPUT
If you use the CHECKSUM utility on this, it should result with
CHECKSUM$CHECKSUM = 1667695124
--- Cut Here ---
$ Write Sys$Output "Executing MAILINFO.COM"
$ on control_y then goto ex
$ User[0,31] := 'F$GETJPI(0,"USERNAME")'
$ sysmail = "SYS$SYSTEM:VMSMAIL.DAT"
$ open /share /read file 'sysmail'
$ read /index=0 /error=ex /key="''User'" file record
$ address = F$Extract(68,255,record)
$ addr_length = F$CVUI(67*8,8,record)
$ fnmlng = F$CVUI(66*8,8,record)
$ dirlng = F$CVUI(65*8,8,record)
$ MESSAGES = F$CVUI(33*8,8,RECORD)
$ address := 'address'
$ name := "''F$Extract(68+addr_length,fnmlng,record)'"
$ address = F$Extract(0,addr_length,address)
$ If fnmlng .ne. 0 then Write Sys$Output "Hello ",name
$ if addr_length .ne. 0 then Write Sys$Output "Your VMS Mail is forwarded to ",-
address
$ IF MESSAGES .NE. 0 THEN WRITE SYS$OUTPUT "You have ",messages,-
" pieces of VMS mail waiting."
$ ex:
$ close file
$ exit
--- Cut Here ---
Please forward any comments to the addresses specified in my ugly "User
Supplied" Mail Headers Above.... Regards,
^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
John J. McMahon (Fast-Eddie)
Disclaimer: Views expressed in this letter are my own,
and are not meant to represent the views of my employers.
Technical Details
Message-ID:
<870318023525.03r@Jpl-VLSI.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!ames!ucbcad!ucbvax!JPL-VLSI.ARPA!xrjjm%6173.spanShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!ames!ucbcad!ucbvax!JPL-VLSI.ARPA!xrjjm%6173.span From: xrjjm%6173.span@JPL-VLSI.ARPA Newsgroups: mod.computers.vax Subject: A (rough draft of a) VMSMAIL.DAT Utility... Message-ID: <870318023525.03r@Jpl-VLSI.ARPA> Date: Wed, 18-Mar-87 05:35:25 EST Article-I.D.: Jpl-VLSI.870318023525.03r Posted: Wed Mar 18 05:35:25 1987 Date-Received: Fri, 20-Mar-87 03:40:43 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 64 Approved: info-vax@sri-kl.arpa