home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21848 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  2.2 KB

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