xrjjm%6173.span@JPL-VLSI.ARPA (03/18/87)
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.nagy%43198.hepnet@LBL.ARPA.UUCP (04/10/87)
>I sometimes get the following error message from DEBUG when >running a program. What's strange is it goes away after a minute ... > VAX DEBUG Version V4.5-6 > >%DEBUG-I-CRMPSCFAIL, DEBUG internal error: debugger call to $CRMPSC failed >-SYSTEM-F-SECTBLFUL, section table (process/global) is full The problem is not the number of global sections, but the number of image sections within one program. Try raising the SYSGEN parameter PROCSECTCNT. I once had to double it (from 32 to 64 as I remember) to install an early version of Datatrieve.