Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ames!ucbcad!ucbvax!vaxb.rhbnc.ac.UK!CHAA006 From: CHAA006@vaxb.rhbnc.ac.UK Newsgroups: comp.os.vms Subject: Dynamic "Sys$Announce" (or Sys$Welcome) display. Message-ID: <8708081128.AA28523@ucbvax.Berkeley.EDU> Date: Sat, 8-Aug-87 07:29:11 EDT Article-I.D.: ucbvax.8708081128.AA28523 Posted: Sat Aug 8 07:29:11 1987 Date-Received: Sun, 9-Aug-87 10:52:30 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 109 There's been a lot of discussion recently concerning Sys$Announce and Sys$Welcome, started (I think) by Zar's comment re. maximum text length. I have been surprised that no-one has suggested the possibility of having a dynamic Sys$xxx display, automatically generated whenever a user logs-in. The following (Fortran) code provides that possibility. To use it, compile and link in the normal way, run it /detached (so that it lurks somewhere in your system), and then re-define Sys$Announce as follows :- $ Define /System Sys$Announce "@''f$logical(""Sys$Announce_Mbx"")'" Of course, you'll want to modify the actual text it produces. ** Phil. Philip Taylor (Royal Holloway & Bedford New College; University of London; U.K) Janet : chaa006@uk.ac.rhbnc.vaxa (or) chaa006@uk.ac.rhbnc.vaxb ([+Janet.000005181000] or [+Janet.000005181100]) Arpa : chaa006%vaxa.rhbnc.ac.uk@cs.ucl.ac.uk (or) : chaa006%vaxb.rhbnc.ac.uk@cs.ucl.ac.uk Bitnet/NetNorth/Earn: chaa006@vaxa.rhbnc.ac.uk (or) chaa006%rhbnc.vaxa@ac.uk (or) : chaa006@vaxb.rhbnc.ac.uk (or) chaa006%rhbnc.vaxb@ac.uk ============================== C U T H E R E ============================== program sys$announce C C --- Creates & services a mailbox, defined as the translation of Sys$Announce C implicit none integer * 2 channel integer sys$crembx, sys$hiber call function ( & sys$crembx & (%val (1), & channel, , , & %val ('1131'X), , & 'SYS$ANNOUNCE_MBX')) call enable (channel) call function (sys$hiber ()) end subroutine enable (channel) C C --- Enables routine AST to deal with ASTs on CHANNEL C implicit none include '($iodef)' integer * 2 channel integer ast, sys$qiow external ast call function (sys$qiow & (, %val (channel),%val (io$_setmode .or. io$m_readattn), & , , , ast, channel, , , ,)) return end subroutine ast (channel) C C --- Gets a few useful things, and writes them to the mailbox; C --- also re-declares itself as AST handler C implicit none include '($iodef)' include '($syidef)' integer * 2 channel integer max, n, lib$day_of_week integer sys$asctim, lib$getsyi, str$trim, sys$qiow character cr, lf character * 6 nodename character * 23 datime character * 132 buffer character * (9) days (7) integer length data days /'Monday', 'Tuesday', 'Wednesday', 'Thursday', & 'Friday', 'Saturday', 'Sunday'/ cr = char (13) lf = char (10) call function (lib$day_of_week (, n)) call function (sys$asctim (, datime, , )) call function (lib$getsyi (syi$_nodename, ,nodename, length)) write (buffer, 9000) nodename (1:length), & days (n), datime, cr, lf call function (str$trim (buffer, buffer, length)) call function (sys$qiow & (, %val (channel),%val (io$_writevblk), & , , , %ref (buffer), %val (length) , , , ,)) call function (sys$qiow & (, %val (channel),%val (io$_writeof .or. io$m_now), & , , , , , , , ,)) call enable (channel) return C C --- Change the following line as necessary !!! SYSDEP !!! C 9000 format (' RHBNC VAX-Cluster on node ', & A, ' at ', A, X, A, A, A) end subroutine function (status) C C --- Signals errors if they occur C implicit none integer status if (.not. status) call lib$signal (%val (status)) return end