home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!agate!ucbvax!UH01.Colorado.EDU!DWING
- From: DWING@UH01.Colorado.EDU (Dan Wing)
- Newsgroups: comp.os.vms
- Subject: Re: How to repeat "new Mail message" ?
- Message-ID: <01GTTQ24GO5U006MJF@VAXF.COLORADO.EDU>
- Date: 22 Jan 93 23:22:01 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 49
-
- Joachim Glaubrecht, jogl@tolkien.imib.rwth-aachen.de, writes:
-
- >all of us know the "Warning" 'You have 1 new Mail message.' after the
- >infos of 'Last interactive' and 'Last non-interactive login'.
- >
- >because many VMS-Sysops clear the screen for a Mesage-Of-The-Day-Info,
- >before the User can enter DCLs at the "$" prompt
-
- I don't get excited too often, but WHAT A STUPID THING TO DO. A user on your
- system has no way of validating their last-login times, and have little, if
- any, chance of seeing "xx unsucessful logins" messages!!!
-
- If they really feel a need to clear the screen, it could be done in the file
- pointed to by SYS$WELCOME -- this file is displayed prior to the "new mail
- message" display and prior to the "last login" displays.
-
- >, i'd like to
- >repeat this "Mail"-hint as the LAST Command in my LOGIN.COM.
- >How can i do this ?
-
- Try something similar to:
-
- $ OPEN/READ/SHARE=WRITE FILE MAIL.MAI
- $ READ/noLOCK/ERROR=NO_NEW_MAIL/INDEX=1/KEY=NEWMAIL FILE RECORD
- $
- $ COUNT = 1
- $LOOP:
- $ READ/noLOCK/END_OF_FILE=DISPLAY_COUNT FILE RECORD
- $ IF F$EXTRACT(9,7,RECORD) .NES. "NEWMAIL" THEN GOTO DISPLAY_COUNT
- $ COUNT = COUNT + 1
- $ GOTO LOOP
- $
- $DISPLAY_COUNT:
- $ WRITE SYS$OUTPUT "You have ", COUNT, " new messages"
- $NO_NEW_MAIL:
- $ CLOSE FILE
- $ EXIT
-
- Depending on how many new messages you have, this can take quite awhile. The
- reason it appears so quickly when you login is that VMS is getting the value
- from VMSMAIL_PROFILE.DATA, but that file doesn't allow World read access.
- However, you can read your own MAIL file. You may, instead, just want to
- check to see if you *have* mail instead of counting how many messages you
- have -- this would be much faster and almost as effective. Or write it in
- a real language instead of DCL.
-
- -Dan Wing, dwing@uh01.colorado.edu or wing_d@ucolmcc.bitnet (DGW11)
- Systems Administrator, University Hospital, Denver
-
-