From:	MERC::"uunet!WKUVX1.BITNET!FILESERV-Mgr"  6-MAY-1992 20:46:18.20
To:	galaxy::gleeve
CC:	
Subj:	NOTICE.01_OF_06

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.2-007  22-FEB-1990
$!   On  6-MAY-1992 09:35:28.72   By user GOATHUNTER (@WKUVX1.BITNET)
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$!+ THIS PACKAGE DISTRIBUTED IN 6 PARTS, TO KEEP EACH PART
$!  BELOW 30 BLOCKS
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. [.NOTICE]AAAREADME.TXT;1
$!       2. [.NOTICE]BUILD_NOTICE.COM;1
$!       3. [.NOTICE]CVTHELP.TPU;1
$!       4. [.NOTICE]DESCRIP.MMS;1
$!       5. [.NOTICE]HG$PUT_OUTPUT.B32;1
$!       6. [.NOTICE]HG$PUT_OUTPUT.MAR;1
$!       7. [.NOTICE]HGMACROS.REQ;1
$!       8. [.NOTICE]NOTICE.B32;1
$!       9. [.NOTICE]NOTICE.HELP;1
$!      10. [.NOTICE]NOTICE.MAR;1
$!      11. [.NOTICE]NOTICE_CLD.CLD;1
$!      12. [.NOTICE]NOTICE_MGR.COM;1
$!      13. [.NOTICE]NOTICE_MSG.MSG;1
$!      14. [.NOTICE]NOTICE_STARTUP.COM;1
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$UNPACK: SUBROUTINE ! P1=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete 'f'*
$ exit
$file_absent:
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'."
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped."
$ delete 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=
CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));
LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);
IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;
MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;
ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=
1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";
POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);
ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;
COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,
"output_file"));ENDPROCEDURE;Unpacker;QUIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create 'f'
X                              NOTICE 01-004
X                              Hunter Goatley
X                         goathunter@WKUVX1.BITNET
X                               May 6, 1992
X
XNOTICE  informs  users  of  important (?) notices when they log in to a VMS
Xsystem.  When a user logs in, he/she is informed of any new  notices  added
Xto the system since his/her last interactive login.
X
XNOTICE  was  written to provide some means for notifying users of important
Xsystem changes (new software, new operating hours, etc.) without having  to
Xdisplay a text file each time they log in.  The heart of NOTICE is a normal
XVMS text library, which contains the text of  all  NOTICE  messages.   When
XNOTICE  is run without any parameters or qualifiers, a brief description of
Xall notices added to the system since the user's last interactive login  is
Xdisplayed:
X
X`09$ notice
X
X`09NOTICE topics.  Type NOTICE <topic-name> for more information.
X
X`09Topic      Date         Description
X`09---------  -----------  -----------
X`09VUG        22-APR-1992  VMS Users Group meeting, April 23
X
X`09$
X
XSuch  a  call  to  NOTICE  would  typically  be  placed in the system login
Xprocedure (SYS$SYLOGIN) so it is executed each  time  an  interactive  user
Xlogs in.
X
X
XHOW NOTICE WORKS
X----------------
XA  simple  command procedure is provided to help you manage the NOTICE text
Xlibrary (NOTICE_MGR.COM).  Anytime you wish to notify your  users  of  some
Xevent,  you  can add a module to the text library.  When NOTICE is executed
Xwithout parameters, it compares their last interactive login time (which is
Xthe  last  time  they  logged  in  *before*  the  current session) with the
Xinsertion date of each module in the NOTICE text library.  If a module  has
Xbeen  added  since  the last time the user logged in, it is included in the
Xlist of NOTICES that is displayed (accompanied by a bell).
X
XUsers  can  examine the actual text of the message by adding the topic name
Xto the NOTICE command:
X
X`09$ NOTICE FINALS
X
XNOTICE  works  like  TYPE/PAGE on video terminals---the user is prompted to
Xpress RETURN before each screen is scrolled so they  can  read  the  notice
Xwithout having it scroll off-screen.
X
XNOTICE can be configured to always display a topic in the NOTICE list.
X
XNOTICE/LIST will display all of the notices available.
X
X
XSETTING UP NOTICE
X-----------------
XTo  build  NOTICE, just execute the BUILD_NOTICE.COM command procedure (or,
Xif you have BLISS, just use MMS):
X
X`09$ @build_notice
X`09Assembling NOTICE....
X`09Linking NOTICE.....
X`09Producing on-line help....
X`09NOTICE build complete
X`09$
X
XYou must then create the NOTICE text library.  You can either use
XNOTICE_MGR.COM to do it, or you can execute the following commands:
X
X`09$ LIBRARY/TEXT/CREATE NOTICE.TLB`09!Or any other name you want
X
XYou then define a system logical to point to the library
X(NOTICE_STARTUP.COM can be edited to do this):
X
X`09$ DEFINE/SYSTEM/EXEC NOTICE_LIBRARY dev:`5Bdir`5DNOTICE.TLB
X
XThe  protection  on the NOTICE library should be set to W:R and full access
Xby SYSTEM:
X
X`09$ SET FILE/PROT=W:R dev:`5Bdir`5DNOTICE.TLB
X
XWith  W:R access to the text library, NOTICE requires no privileges, though
Xyou may want to install it to speed access to it:
X
X`09$ INSTALL ADD dev:`5Bdir`5DNOTICE.EXE/OPEN/HEADER/SHARE
X
X(Again, this command is included in NOTICE_STARTUP.COM.)
X
XFinally,  you'll  need to define NOTICE as a foreign command in SYS$SYLOGIN
X(by default, SYS$MANAGER:SYLOGIN.COM) and execute it for all users.
X
X`09$ notice :== $dev:`5Bdir`5Dnotice.exe`09!Define globally!
X`09$ notice`09`09`09`09!Display any new notices
X
XThere  is  a help file that can be added to a help library.  You may put it
Xin either the system help library or a site-specific library:
X
X`09$ LIBRARY/HELP/INSERT SYS$HELP:HELPLIB NOTICE.HLP`09!System help
X
X
XADDING NOTICES TO THE TEXT LIBRARY
X----------------------------------
XThere are only two restrictions on the text of NOTICE messages:
X
X  o  The TOPIC name *should* be no more than 10 characters.  The topic
X     name cannot be truncated when users type NOTICE <topic>, so keeping
X     it under 10 characters makes it easier to type the topics.
X
X  o  The *first* line in the message is used as the brief description
X     shown at login time and when NOTICE/LIST is executed.
X
XA typical format might look like the following:
X
X`09-------------------------------------------------
X`09New NOTICE utility added to the system
X
X`09A new utility, NOTICE, has been added to the system to inform you of
X`09important system announcements.
X`09-------------------------------------------------
X
XIf  the  file  above  was  added  as module NOTICE to the text library, the
XNOTICE listing for it would look like:
X
X`09$ notice
X
X`09NOTICE topics.  Type NOTICE <topic-name> for more information.
X
X`09Topic      Date         Description
X`09---------  -----------  -----------
X`09NOTICE     22-APR-1992  New NOTICE utility added to the system
X
X`09$
X
XWhen  a  user  types  NOTICE  NOTICE (in this example), the screen would be
Xcleared and the following would be displayed:
X
X`09--------------------------------------------------
X`09Notice NOTICE, dated 23-APR-1992 19:01:23.34
X
X`09New NOTICE utility added to the system
X
X`09A new utility, NOTICE, has been added to the system to inform you of
X`09important system announcements.
X`09--------------------------------------------------
X
X
X
XMANAGING THE NOTICE LIBRARY
X---------------------------
XThe  command procedure NOTICE_MGR.COM can be used to manage the NOTICE text
Xlibrary.  When executed, the following menu is displayed:
X
X`09$ @notice_mgr
X
X`09NOTICE library maintenance
X
X`09  1.  List the library contents
X`09  2.  Add/replace a module to/in the library
X`09  3.  Touch a module in the library (update date)
X`09  4.  Edit a module in the library
X`09  5.  Delete a module from the library
X`09  0.  Exit
X
X`09Choice <0>:`20
X
XNOTICE_MGR is not bullet-proof, but it does work.  Typically, you would add
Xa module using option 2.  You will be prompted for the  file  name  to  add
X(you  will  be placed in an editor if the named file doesn't exist) and for
Xthe module name.  The module name is then used as the <topic> name  on  the
XNOTICE command line.
X
XOption 3, "Touch a module," lets you update the insertion date for a module
Xso that users will see the module listed again the next time they log in. A
Xsample  use for this option would be an announcement added a week before an
Xevent.  To remind users again, you might "touch" the module again  the  day
Xof the event so that users will see it again that day.
X
XNOTICE_MGR is, I believe, pretty self-explanatory and easy to use.
X
X
XSETTING UP "PERMANENT" NOTICES
X------------------------------
XIf you would like to ensure that a notice is displayed every time a user is
Xlogged  in  (for  very  important  notices  like  operating  hours   during
Xholidays), you simply add a dollar sign ($) to the beginning of the name of
Xthe module.  For example, suppose the  file  FINALS.TXT  contains  the  lab
Xhours  during finals week.  If you add it to the library with a module name
Xof "$FINALS", the user will see topic "FINALS"  displayed  at  every  login
Xuntil  the module is deleted.  Note that the user never sees the "$" in the
Xtopic name---only the NOTICE administrator knows it's there.
X
X
XLIMITATIONS
X-----------
XThe  only  known  NOTICE  limitations  are  imposed  by the use of the text
Xlibrary (for example, it would be nice to have modules automatically expire
Xat  a certain time).  However, the big advantage of using a text library is
Xthat the DCL LIBRARY command can be used to manage the NOTICE  database;  a
Xnew interface did not have to be written.
X
X
XAUTHOR INFO AND FEEDBACK INFORMATION
X------------------------------------
XQuestions, comments, or suggestions are welcome.
X
XHunter Goatley, VMS Systems Programmer`09    E-mail: goathunter@WKUVX1.BITNE
VT
XAcademic Computing, STH 226`09`09    Voice:  (502) 745-5251
XWestern Kentucky University
XBowling Green, KY 42101
$ CALL UNPACK [.NOTICE]AAAREADME.TXT;1 2037628647
$ create 'f'
X$ say := write sys$output
X$ if f$search("SYS$SYSTEM:BLISS32.EXE") .eqs. "" then goto _Assemble_Em
X$ say "Compiling NOTICE...."
X$ bliss notice,hg$put_output
X$ goto _Continue
X$ _Assemble_Em:
X$ say "Assembling NOTICE...."
X$ macro notice,hg$put_output
X$ _Continue:
X$ set command/object notice_cld
X$ message notice_msg
X$ say "Linking NOTICE...."
X$ link/notrace notice,hg$put_output,notice_cld,notice_msg
X$ say "Producing on-line help...."
X$ edit/tpu/nosection/nodisplay/command=cvthelp.tpu notice.help
X$ runoff notice.rnh
X$ say "NOTICE build completed"
X$ exit
$ CALL UNPACK [.NOTICE]BUILD_NOTICE.COM;1 40660588
$ create 'f'
X!`09TITLE`09CVTHELP.TPU
X!`09IDENT`0901-000
X!
X!++
X!
X!  Program:`09CVTHELP.TPU
X!
X!  Author:`09Hunter Goatley
X!
X!  Date:`09January 12, 1992
X!
X!  Purpose:`09Convert .HELP files to RUNOFF .RNH files.  Substitutes
X!`09`09RUNOFF commands for tags imbedded in the .HELP file.
X!
X!  Calling sequence:
X!
X!`09$ EDIT/TPU/NOJOURNAL/NODISPLAY/COMMAND=CVTHELP file.HELP
X!
X!  Modified by:
X!
X!`0901-000`09`09Hunter Goatley`09`09 12-JAN-1992 15:15
X!`09`09Original version.
X!
X!--
XProcedure eve_convert_help
XLocal`09temp
X`09,x
X`09;
X
X   qualifier_level := 0;
X   hg$substitute_topic(current_buffer, "<MAIN>", ".indent-3", "1");
X   hg$substitute_topic(current_buffer, "<QUALIFIER>", ".indent-3", "");
X   hg$substitute_topic(current_buffer, "<TOPIC>", ".indent-3", "2");
X   hg$substitute_topic(current_buffer, "<SUBTOPIC>", ".indent-3", "3");
X   hg$substitute_topic(current_buffer, "<SUBSUBTOPIC>", ".indent-3", "4");
X   hg$substitute_comment(current_buffer,"<INIT>",".noflags;.lm3;.rm70");
X   hg$substitute_comment(current_buffer,"<LITERAL>",".lm+4;.literal");
X   hg$substitute_comment(current_buffer,"<LARETIL>",".end literal;.lm-4");
X   hg$substitute_comment(current_buffer,"<DOT1LIST>",'.list 1,"o"');
X   hg$substitute_comment(current_buffer,"<DOT0LIST>",'.list 0,"o"');
X   hg$substitute_comment(current_buffer,"<ENTRY>",".le");
X   hg$substitute_comment(current_buffer,"<TSIL>",".end list");
X   hg$substitute_comment(current_buffer,"<CENTER>",".center");
X   hg$substitute_comment(current_buffer,"<FORMAT>",".sk;.indent2");
X   hg$substitute_comment(current_buffer,"<NOTE>",".note");
X   hg$substitute_comment(current_buffer,"<ETON>",".end note");
X   hg$substitute_comment(current_buffer, LINE_BEGIN & LINE_END,".sk");
X   hg$substitute_comment(current_buffer, LINE_BEGIN & "`7C", "");
X
XEndProcedure;`09`09! eve_convert_help
X
XProcedure hg$substitute_comment (the_buffer, target, new)
XLocal`09temp
X`09,save_pos
X`09,x
X`09;
X  on_error;
X  endon_error;
X
X  save_pos := mark(none);
X  position(beginning_of(the_buffer));
X  loop
X`09x := search(target, forward);
X`09exitif x = 0;
X`09position (x);
X`09erase_character(length(x));
X`09copy_text(new);
X  endloop;
X
X  position(save_pos);
X
XEndProcedure;`09`09! hg$substitute_comment
X
+-+-+-+-+-+-+-+-  END  OF PART 1 +-+-+-+-+-+-+-+-
