b From:	HENRY::IN%"xrjjm%6173.span%jpl-vlsi.arpa%sri-kl.ARPA%relay.cs.net@rca.com" 19-MAR-1987 16:24 To:	Info-Vax@sri-kl.arpa1 Subj:	A (rough draft of a) VMSMAIL.DAT Utility...   , Comment:   Begin User Supplied Mail Headers.G *Site:     NASA Goddard Space Flight Center - Greenbelt, Maryland, USA. M *From:     John J. McMahon, Systems Programmer, STX - ST Systems Corporation. 4 *Project:  COBE Science Data Room (CSDR), Code 401.1> *Reply-To: (Arpa-Internet)       XRJJM%6173.SPAN@JPL-VLSI.ARPA, *Reply-To: (Bitnet)              ZMJJM@SCFVMF *Reply-To: (Span/Physnet/Hepnet) 6173::XRJJM = CSDR::XRJJM (Node 6.29)  K A couple weeks ago someone asked if he could access the "Number of New Mail K Messages Waiting" from DCL.  Anyhow, curiosity set in for me, and I decided B to create a DCL utility to read items out of the VMSMAIL.DAT file.  J For those of you interested in trying this, I would suggest looking at theN MAILUAF.COM program in SYS$EXAMPLES: and/or the source code for Rich Garland's FINGER program.   3 Now, before I get to the program... My question is: I 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?  7 Here is the program (No Licenses/Warranty ... as Usual) P 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:I 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'  4 $ 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'6 $ name := "''F$Extract(68+addr_length,fnmlng,record)'"- $ address =  F$Extract(0,addr_length,address) 6 $ If fnmlng .ne. 0 then Write Sys$Output "Hello ",nameP $ if addr_length .ne. 0 then Write Sys$Output "Your VMS Mail is forwarded to ",-	   address A $ IF MESSAGES .NE. 0 THEN WRITE SYS$OUTPUT "You have ",messages,-  " pieces of VMS mail waiting." $ ex:  $ close file $ exit --- Cut Here ---  H Please forward any comments to the addresses specified in my ugly "User * Supplied" Mail Headers Above....  Regards,P ^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^v1 John J. McMahon (Fast-Eddie)                      7 Disclaimer: Views expressed in this letter are my own,  E             and are not meant to represent the views of my employers. 