GENERAL: The following two programs are user message logging utilities written in VAX C. REPLY will log any messages sent to your terminal to a file and issue a reply message to the sender. The reply message can be specified when the program is executed, or a default message can be used. MESSAGE, based on REPLY, runs as a "background program" (using spawn/nowait), and simply logs all received messages to a log file before printing them to the screen. This could be useful if, for example, you receive a message just before the screen clears (as often happens in a screen editor, graphics package, etc). Unfortunatly, both programs must be run while you are logged in at a terminal; you can not be detached, disconnected, or logged out. The reason for this is that (as far as I can tell), VMS will not send a message to any user unless there is a physical terminal attached to that user. If anyone finds (or knows) a way around this, let me know. REPLY was written for basically two reasons: 1) a co-worker wanted a program to send reply messages like the GONE EXEC and it's variations under CMS, and, 2) I was trying to learn the C language and was experimenting with the SMG library routines. REPLY seemed a logical way to learn about both of these. I did not see it as being a real useful program at the time, but apparently from the response I have had, it has indeed turned out to be useful to many people. My boss later suggested that I make the MESSAGE program so that he would not miss any messages due to the screen clearing, or perhaps so that he could maintain a hardcopy listing of any stupid arguments or death threats he received from students here at the university. Some of the code may look a bit stupid or redundent, but is necessary as I have mixed SMG I/O routines with C I/O routines, and sometimes they confuse each other. If any future modifications are made, the first of them will be to remove all SMG routines, rewriting the entire program in C, using mailboxs and a spawned job to do the work. REPLY: This program will log to a log file any messages sent to you while you are out. It will then issue a reply message to the sender if it was a user message. The program will correctly handle the following types of messages: SEND messages from the current node (log and reply) SEND messages from another node (log and reply) MAIL messages (log, no reply) BATCH messages (log, no reply) TRANS messages (prog by Brian Nelson) (log, no reply) ^T messages (must be set for system) (log, no reply) NOTE: The source code must be changed in order for REPLY to handle ^T and TRANS messages correctly. This is simply a matter of replacing our node name in the source with your node name. See the source code for more information. There are two ways of running REPLY. The first method is with the standard VMS RUN command. If run this way, REPLY will use the default reply message. The other way is to define a DCL symbol or command to run REPLY. For example, if the executable file is in sys$system, then: $ REPLY :== $ sys$system:reply.exe Then, to run the program with the default message, simply enter: $ REPLY To run the program with a different message, type: $ REPLY "I am in a meeting - I will be back at 2:30 PM" When the program is run, it sets up a small menu. This tells you the number of user messages received (messages sent via SEND), the number of system messages received (all other messages, including ^T), the current date and time, and a command explaination and command prompt. There are two commands in the program: Q (for quit) and E (for edit). Q will simply exit the program. E will spawn the default editor to allow you to edit the message logging file. Note that if several messages are sent rapidly, some may not be logged, as the message trap must be disabled in order to spawn a reply message. Using the EDIT option also disables the trap. Note also that currently the user name and node name together must not exceed 16 characters or the reply will fail!!! This could be easily changed but I have not got around to it yet... All messages are stored in "SYS$LOGIN:MESSAGES.LOG." MESSAGE: This program will log any messages sent to you in a disk file and then display it on the screen, so that you will have a disk copy of any messages that are sent your way. This is useful for reviewing messages sent just before the screen clears or that have scrolled off the screen, or for obtaining a copy of death threats and what-have-you that may be sent to you, etc. The program is run by a command of the format: SPAWN/NOWAIT RUN MESSAGE I would suggest that you set up a logical symbol for it, as in: $ message :== "spawn/nowait run message" Messages are stored in "SYS$LOGIN:MSG.LOG." There are a few problems with using this program. If you try to execute another command that must take over your terminal, you will get a "divice is active" error. The most notable instance of this is the DCL "SET HOST" command. Because messages are logged to a file and then printed to the screen, incomming messages in DCL will not reprint the current input line as a message normally would. This means that if you are typing in a line when a message comes in, you will have to type a ^R to have DCL reprint the line (assuming you like to be able to see what you are entering). COMPILATION: Each program is completely contained in one source file. Simply compile and link as you would any normal VAX C program. For example: $ cc REPLY $ assign sys$library:vaxcrtl.olb lnk$library $ link REPLY $ deassign lnk$library FILES INCLUDED: The following files are included: REPLY.DOC This file. REPLY.C The source for REPLY. REPLY.EXE The executable REPLY program. MESSAGE.C The source for MESSAGE. MESSAGE.EXE The executable MESSAGE program. KNOW BUGS: REPLY has been known to bomb from time to time after returning from the some editors. With the SED (or TED) editor by Brian Nelson, this happens very often. I do not know why this happens or how to fix it, or if it exist under all versions of VMS. It appears to be a problem with the SMG data being overwritten in some way. MESSAGE has no known bugs.