+                               NOTICE 01-007 ,                               Hunter Goatley1                          goathunter@WKUVX1.BITNET *                               July 6, 1993  K NOTICE  informs  users  of  important (?) notices when they log in to a VMS K system.  When a user logs in, he/she is informed of any new  notices  added 3 to the system since his/her last interactive login.   K NOTICE  was  written to provide some means for notifying users of important K system changes (new software, new operating hours, etc.) without having  to K display a text file each time they log in.  The heart of NOTICE is a normal K VMS text library, which contains the text of  all  NOTICE  messages.   When K NOTICE  is run without any parameters or qualifiers, a brief description of K all notices added to the system since the user's last interactive login  is 
 displayed:  
 	$ notice/new   ? 	NOTICE topics.  Type NOTICE <topic-name> for more information.   $ 	Topic      Date         Description$ 	---------  -----------  -----------: 	VUG        22-APR-1992  VMS Users Group meeting, April 23   	$  K Such  a  call  to  NOTICE  would  typically  be  placed in the system login K procedure (SYS$SYLOGIN) so it is executed each  time  an  interactive  user  logs in.     HOW NOTICE WORKS ----------------K A  simple  command procedure is provided to help you manage the NOTICE text K library (NOTICE_MGR.COM).  Anytime you wish to notify your  users  of  some K event,  you  can add a module to the text library.  When NOTICE is executed K with the /NEW qualifier, it compares  their  last  interactive  login  time K (which  is  the last time they logged in *before* the current session) with K the insertion date of each module in the NOTICE text library.  If a  module K has  been  added  since the last time the user logged in, it is included in > the list of NOTICES that is displayed (accompanied by a bell).  K Users  can  examine the actual text of the message by adding the topic name  to the NOTICE command:   	$ NOTICE FINALS  K NOTICE  works  like  TYPE/PAGE on video terminals---the user is prompted to K press RETURN before each screen is scrolled so they  can  read  the  notice $ without having it scroll off-screen.  F NOTICE can be configured to always display a topic in the NOTICE list.  D NOTICE with no parameters will display all of the notices available.     SETTING UP NOTICE  ----------------- K To  build  NOTICE, just execute the BUILD_NOTICE.COM command procedure (or, ! if you have BLISS, just use MMS):    	$ @build_notice 	Assembling NOTICE.... 	Linking NOTICE..... 	Producing on-line help....  	NOTICE build complete 	$  A You must then create the NOTICE text library.  You can either use C NOTICE_MGR.COM to do it, or you can execute the following commands:   = 	$ LIBRARY/TEXT/CREATE NOTICE.TLB	!Or any other name you want   8 You then define a system logical to point to the library. (NOTICE_STARTUP.COM can be edited to do this):  8 	$ DEFINE/SYSTEM/EXEC NOTICE_LIBRARY dev:[dir]NOTICE.TLB  K The  protection  on the NOTICE library should be set to W:R and full access 
 by SYSTEM:  ( 	$ SET FILE/PROT=W:R dev:[dir]NOTICE.TLB  K With  W:R access to the text library, NOTICE requires no privileges, though 1 you may want to install it to speed access to it:   4 	$ INSTALL ADD dev:[dir]NOTICE.EXE/OPEN/HEADER/SHARE  8 (Again, this command is included in NOTICE_STARTUP.COM.)  K Finally,  you'll  need to define NOTICE as a foreign command in SYS$SYLOGIN C (by default, SYS$MANAGER:SYLOGIN.COM) and execute it for all users.   4 	$ notice :== $dev:[dir]notice.exe	!Define globally!) 	$ notice/new				!Display any new notices   K If you have an executable image that's executed as part of SYLOGIN, you can K call the notice routine NOTICE_MAIN in NOTICE_SYLOGIN.OBJ to avoid an extra  image activation.   K There  is  a help file that can be added to a help library.  You may put it = in either the system help library or a site-specific library:   ? 	$ LIBRARY/HELP/INSERT SYS$HELP:HELPLIB NOTICE.HLP	!System help     " ADDING NOTICES TO THE TEXT LIBRARY" ----------------------------------? There are only two restrictions on the text of NOTICE messages:   F   o  The TOPIC name *should* be no more than 10 characters.  The topicH      name cannot be truncated when users type NOTICE <topic>, so keeping?      it under 10 characters makes it easier to type the topics.   E   o  The *first* line in the message is used as the brief description :      shown at login time and when NOTICE/LIST is executed.  / A typical format might look like the following:   2 	-------------------------------------------------' 	New NOTICE utility added to the system   E 	A new utility, NOTICE, has been added to the system to inform you of   	important system announcements.2 	-------------------------------------------------  K If  the  file  above  was  added  as module NOTICE to the text library, the & NOTICE listing for it would look like:  
 	$ notice/new   ? 	NOTICE topics.  Type NOTICE <topic-name> for more information.   $ 	Topic      Date         Description$ 	---------  -----------  -----------? 	NOTICE     22-APR-1992  New NOTICE utility added to the system    	$  K When  a  user  types  NOTICE  NOTICE (in this example), the screen would be - cleared and the following would be displayed:   3 	-------------------------------------------------- - 	Notice NOTICE, dated 23-APR-1992 19:01:23.34   ' 	New NOTICE utility added to the system   E 	A new utility, NOTICE, has been added to the system to inform you of   	important system announcements.3 	--------------------------------------------------        MANAGING THE NOTICE LIBRARY  --------------------------- K The  command procedure NOTICE_MGR.COM can be used to manage the NOTICE text 9 library.  When executed, the following menu is displayed:    	$ @notice_mgr   	NOTICE library maintenance     	  1.  List the library contents- 	  2.  Add/replace a module to/in the library 2 	  3.  Touch a module in the library (update date)# 	  4.  Edit a module in the library ' 	  5.  Delete a module from the library  	  0.  Exit   
 	Choice <0>:    K NOTICE_MGR is not bullet-proof, but it does work.  Typically, you would add K a module using option 2.  You will be prompted for the  file  name  to  add K (you  will  be placed in an editor if the named file doesn't exist) and for K the module name.  The module name is then used as the <topic> name  on  the  NOTICE command line.  K Option 3, "Touch a module," lets you update the insertion date for a module K so that users will see the module listed again the next time they log in. A K sample  use for this option would be an announcement added a week before an K event.  To remind users again, you might "touch" the module again  the  day 6 of the event so that users will see it again that day.  B NOTICE_MGR is, I believe, pretty self-explanatory and easy to use.     SETTING UP "PERMANENT" NOTICES ------------------------------K If you would like to ensure that a notice is displayed every time a user is K logged  in  (for  very  important  notices  like  operating  hours   during K holidays), you simply add a dollar sign ($) to the beginning of the name of K the module.  For example, suppose the  file  FINALS.TXT  contains  the  lab K hours  during finals week.  If you add it to the library with a module name K of "$FINALS", the user will see topic "FINALS"  displayed  at  every  login K until  the module is deleted.  Note that the user never sees the "$" in the < topic name---only the NOTICE administrator knows it's there.     LIMITATIONS  ----------- K The  only  known  NOTICE  limitations  are  imposed  by the use of the text K library (for example, it would be nice to have modules automatically expire K at  a certain time).  However, the big advantage of using a text library is K that the DCL LIBRARY command can be used to manage the NOTICE  database;  a ) new interface did not have to be written.     $ AUTHOR INFO AND FEEDBACK INFORMATION$ ------------------------------------0 Questions, comments, or suggestions are welcome.  K Hunter Goatley, VMS Systems Programmer	    E-mail: goathunter@WKUVX1.BITNET 7 Academic Computing, STH 226		    Voice:  (502) 745-5251  Western Kentucky University  Bowling Green, KY 42101 