SUE@MAX.ACS.WASHINGTON.EDU.UUCP (02/08/88)
DOES ANYONE KNOW HOW I CAN CAPTURE THE REPLY FROM A "SEND/COMMAND <NODE> SHOW USERS" INTO A FILE, INCLUDING ERROR MESSAGES SUCH AS "NO SUCH NODE DEFINED". I'VE TRIED CAPTURING THIS INTO A FILE WITHOUT SUCCESS--THE OUTPUT IS FORCED INTO MY TERMINAL.
thierbac@umbc3.UMD.EDU (Ed Thierbach ) (02/11/88)
In article <UWAVM.ACS.WASHINGTON.EDU:LEMmtcIY*> SUE@MAX.ACS.WASHINGTON.EDU writes: > > DOES ANYONE KNOW HOW I CAN CAPTURE THE REPLY FROM A >"SEND/COMMAND <NODE> SHOW USERS" INTO A FILE, INCLUDING ERROR MESSAGES >SUCH AS "NO SUCH NODE DEFINED". > I'VE TRIED CAPTURING THIS INTO A FILE WITHOUT SUCCESS--THE OUTPUT IS >FORCED INTO MY TERMINAL. Since the messages you receive back are broadcast messages, I see two alternatives: 1: The easiest way is to sign on again by using the command $SET HOST 0/LOG. All of the terminal output of this session will be saved in a file called SETHOST.LOG, and you can weed through it to find the messages. Of course, this is no good if you want to use the messages right away, like in a command procedure. Also, you need NETMBX privilege to use SET HOST. 2: You can write a program that issues the command and traps all incoming broadcast messages. One of my old student assistants (I left, he didn't) was working on a program that did this, but I don't have the code any more. This is quite a bit harder than 1), and would take a fairly decent knowledge of system services. Maybe some other netlander has better solutions, but these are the only ones that come to mind. -------- Ed Thierbach VAX System Manager Roy F. Weston, Inc. (I gotta get a better signature.......)
carl@CITHEX.CALTECH.EDU (Carl J Lydick) (02/11/88)
> DOES ANYONE KNOW HOW I CAN CAPTURE THE REPLY FROM A > "SEND/COMMAND <NODE> SHOW USERS" INTO A FILE, INCLUDING ERROR MESSAGES > SUCH AS "NO SUCH NODE DEFINED". > I'VE TRIED CAPTURING THIS INTO A FILE WITHOUT SUCCESS--THE OUTPUT IS > FORCED INTO MY TERMINAL. There are a number of ways to do this. 1) You could write a program that associates a mailbox with your terminal and traps incoming broadcast messages to a file. I don't know the details of how to do this, but I know it can be done because there is a utility (TPU) that comes with VMS that will do it. 2) You can use the command EDIT/TPU (if you've got an ANSI terminal), then execute the EVE command "DCL SEND/COMMAND <NODE> SHOW USERS". The results will be put in the buffer MESSAGES. 3) You can use the DCL command "SET HOST 0/LOG", log in again, issue the SEND command, wait until it finishes, and then log out. The results will be in the log file (SETHOST.LOG, by default).
jdc@naucse.UUCP (John Campbell) (02/11/88)
In article <785@umbc3.UMD.EDU>, thierbac@umbc3.UMD.EDU (Ed Thierbach ) writes: > In article <UWAVM.ACS.WASHINGTON.EDU:LEMmtcIY*> SUE@MAX.ACS.WASHINGTON.EDU writes: > > > > DOES ANYONE KNOW HOW I CAN CAPTURE THE REPLY FROM A > >"SEND/COMMAND <NODE> SHOW USERS" INTO A FILE... > Ed gives some very good advice... > Since the messages you receive back are broadcast messages, I see two > alternatives: > 1: The easiest way is to sign on again by using the command $SET HOST 0/LOG. ... > > 2: You can write a program that issues the command and traps all incoming > Writing such a program does not have to be hard. I capture broadcast messages in my editor using smg$set_boradcast_trapping. As long as the program is resident, an AST goes off whenever a broadcast message occurs. The only part you would need to code is something to issue the DCL command while the AST remained in effect... -- John Campbell ...!arizona!naucse!jdc unix? Sure send me a dozen, all different colors.
payne@watdcsu.waterloo.edu (Doug Payne) (02/12/88)
In article <569@naucse.UUCP> jdc@naucse.UUCP (John Campbell) writes: > > DOES ANYONE KNOW HOW I CAN CAPTURE THE REPLY FROM A > "SEND/COMMAND <NODE> SHOW USERS" INTO A FILE... > Even easier than writing a program, why not just use an existing program? Try issuing the SEND command from inside TPU, via the TPU DCL command. The messages which you want will appear in the MESSAGES buffer. Note that any error messages such as _No such node nnnn defined_ will appear in the DCL buffer. Note also that such RSCS messages will contain a BELL character. However, since you're already in TPU, it's easy to edit the stuff to your heart's content. Doug