[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | -={ H A C K E R S }=- |
Notice: | Write locked - see NOTED::HACKERS |
Moderator: | DIEHRD::MORRIS |
|
Created: | Thu Feb 20 1986 |
Last Modified: | Mon Aug 03 1992 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 680 |
Total number of notes: | 5456 |
106.0. "PHONE and more from .COM files" by SPRITE::OSMAN () Mon Apr 01 1985 17:19
I've got a .COM procedure that I'd like to offer in-house for people to
experiment with and I'd be interested in hearing if it was useful.
The procedure is called ALLTALK.COM. What you do with it is say
$ @ALLTALK TERMIN TERMOUT
Presumably you'd "say" it from your own command procedure.
The ALLTALK procedure causes "TERMIN" to be defined as a logical name pointing
at the terminal input to a new logged in process, and TERMOUT to point
at the terminal output of the same process.
Your procedure can WRITE any text you want to TERMIN, which data
gets seen as terminal input for the job. Any terminal output generated
by DCL or other programs within the job is available for you to READ from
logical name TERMOUT.
I've found two main uses for this so far:
o For your .COM files that want to interact with programs that usually
require their input and output to be on a "real" terminal. The ALLTALK
procedure makes the job believe it is on a real terminal, so hence gets
around this problem.
o For interacting with programs for which you want your command
procedure to supply different input to a program DEPENDING on what
the program has output. For instance, if a program has said
"TYPE RETURN FOR MORE", a your procedure might want to do
that. Normally, .COM files don't have that option. With ALLTALK,
they do.
Here's an example I've written that collects all the logged in user names
for a chosen node into a distribution list file. The distribution list
file may then be optionally used in MAIL to send the logged in users
a message.
The example uses PHONE. I chose PHONE since it is a product that generally
is NOT runnable from a .COM file or from batch. ALLTALK succeeds, though.
------------------------ example starts on next line ------------------
$ on warning then exit
$ @mycoms:alltalk term_in term_out
$ cr[0,8] = 13
$ inquire node "Node whose logged in users you'd like to store in a file"
$ open/write file foo.dis
$ write term_in "phone directory ''node'", cr
$ lup:
$ read term_out line
$ if f$locate ("listed", line) .ne. f$length (line) then goto done
$ if f$locate ("available", line) .ne. f$length (line) then -
write file "''node'::''f$edit (f$extract (16,16,line),"trim")'"
$ goto lup
$ done:
$ close file
$ write sys$output "Please look at file FOO.DIS."
$ exit
----------------------- end of example ------------------------------
If you'd like to try your own application for ALLTALK, please copy it
from
SPRITE::USER1:[OSMAN.COMFILES]ALLTALK.COM
I'd be interested in hearing any useful "war" stories as responses to
this note.
Thanks.
/Eric Osman
T.R | Title | User | Personal Name | Date | Lines
|
---|