| What makes you think it *should* work?
If you say TYPE node::"0=mumble", then the task 'mumble' should be
capable of being 'typed' -- i.e., it should accept the incoming logical
link and send an output stream to it.
Since you didn't mention anything about this handshaking, I assume
it's not being done.
So, after some timer fires and 'mumble' still hasn't accepted the
logical link, the connection attempt is aborted -- hence the error
you see at the TYPE end of things.
At the 'mumble' end, the task carries on regardless. There's no
reason why it should exit just because a logical link, which it wasn't
using anyway, has been cancelled.
Using "TYPE" to mean "run this task", when the task in question is
not primarily intended to produce an output stream, is not very
pleasant. If I had to fix this up in the shortest time possible,
then I'd make the "mumble.COM" procedure accept the link, write
one record saying "thanks" to the link, and then close the link.
This would dismiss the link to TYPE in a way which would not annoy
TYPE.
A better way would be to spend a short while avoiding TYPE completely.
|
| Below is a program I collected from here and modified
It should do what you want with out any prep on the remote system
Extract it and type "@FILENAME.COM HELP" and a brief help message
will display. Hope it helps
$ goto top
$!
$ ! remsub.com
$ ! created to get around using DECnet 0 tasks for
$ ! corporate security reasons!
$ ! executed on your workstation
$ !Features:
$ ! 1. Uses submit/remote to keep the net police happy.
$ ! 2. Run's /detatched to free up the batch queue slot.
$ ! 3. Takes node-name, command
$ ! 4. Runs from the workstation.
$ ! modified 1/12/89 to optionally accept process_name and general cleanup
$ ! == ken miller ==
$ ! modified 3/89 to allow more defaults and cmd line input and help
$ !
$TOP:
$! set these to what ever defaults you want?
$ def_node = "LAS057" ! node if not specifid
$ def_cmd = "VERB" ! function if not specifid
$ def_prog = "DECW$MAIL" ! application if not specifid
$ cmd :=
$ cmd1 :=
$ node :=
$ prog :=
$!
$ func = "func"
$ tell = "write sys$output"
$ file = "write temp"
$ run_opts = "MCR/MC/M//RUN/R/@/VERB/V/" ! this is whats allowed now
$ no_cmd = "VERB/" ! no command opts
$ sel_opts = "NODE/PROGRAM/PROG/" ! this is whats allowed now
$ ext_opts = "EXT/EXTEND/CMD1/" ! extended command
$ parm :=
$ parm1 :=
$ x=0
$!
$NOINPUT:
$ if p1 .NES. "" then goto start
$ inquire p1 "Command? [""''def_cmd'""] "
$ if p1 .eqs. "" then p1 = def_cmd
$ inquire p2 "Application? [""''def_prog'""] "
$ if p2 .eqs. "" then p2 = def_prog
$ inquire p3 "Remote Node? [''def_node'] "
$ if p3 .eqs. "" then p3 = def_node
$ Goto start
$!
$HELP:
$ 'tell "Remotely run an object and display it here "
$ 'tell " Run options are as follows: "
$ 'tell " Option1 - to select node type: NODE name "
$ 'tell " to select the command type: MCR, VERB, RUN or @ "
$ 'tell " to select the program type: PROG filespec "
$ 'tell " to select Optional command "
$ 'tell " for the remote system it "
$ 'tell " should be the last elements "
$ 'tell " type: EXT spec "
$ 'tell " i.e. $ RUN NODE foo PROG CMS/DECW EXT SET DEF [.DEV]"
$ 'tell " "
$ 'tell " Option2 - (@, RUN, VERB or MCR) NODE::FILESPEC EXTENDED_CMDS"
$ 'tell " "
$ 'tell " Option3 - (@, RUN, VERB or MCR) NODE FILESPEC EXTENDED_CMDS"
$ 'tell " "
$ 'tell " Note :To run a program with parameters put the command and "
$ 'tell " and the parameters in quots"
$ EXIT
$START:
$DO_PARM:
$ x=x+1
$ parm = p'x'
$ if parm .eqs. "HELP" then goto help
$ if parm .EQS. "" then goto run
$ IF (F$LOCATE(parm+"/",RUN_OPTS) .NE. F$LENGTH(RUN_OPTS)) .OR -
(F$LOCATE(parm+"/",NO_CMD) .NE. F$LENGTH(NO_CMD)) THEN goto cmd
$ IF F$LOCATE(parm+"/",SEL_OPTS) .NE. F$LENGTH(SEL_OPTS) THEN goto 'parm
$ IF F$LOCATE(parm+"/",EXT_OPTS) .NE. F$LENGTH(EXT_OPTS) THEN goto ext
$ gosub options
$ goto do_parm
$!
$NODE: ! get the node name
$ x=x+1
$ parm = p'x'
$NODE1:
$ node = f$extract(0,f$locate(":","''parm'"),"''parm'")
$ goto do_parm
$!
$CMD: ! get the node name
$ parm = p'x'
$ cmd = parm
$ if cmd .EQS. "V" then cmd := VERB
$ if cmd .EQS. "R" then cmd := RUN
$ if (cmd .EQS. "M") .OR. (cmd .EQS. "MC") then cmd := MCR
$ goto do_parm
$!
$EXT: ! get the node name
$ x=x+1
$ parm = p'x'
$ if parm .EQS. "" then goto do_parm
$ cmd1 = cmd1 + parm + " "
$ goto ext
$!
$!
$PROGRAM: ! get the program name
$PROG:
$ x=x+1
$ parm = p'x'
$PROG1:
$ prog = parm
$ if f$extract(0,1,prog) .NES. "@" then goto prog2
$ cmd = "@"
$ prog = f$extract(1,f$length(prog),prog)
$PROG2:
$ if f$locate("::","''prog'") .EQ. f$length("''prog'") then goto prog3
$ parm = prog
$ node = f$extract(0,f$locate(":","''parm'"),"''parm'")
$ prog = f$extract(f$locate("::","''prog'")+2,f$length("''prog'"),"''prog'")
$PROG3:
$ goto do_parm
$!
$OPTIONS:
$ if prog .EQS. "" then goto PROG1
$ if node .EQS. "" then goto node1
$ return
$
$!
$RUN:
$! set defaults
$ if prog .EQS. "" then prog = def_prog
$ if node .EQS. "" then node = def_node
$ if cmd .EQS. "" then cmd = def_cmd
$ IF F$LOCATE(cmd+"/",NO_CMD) .NE. F$LENGTH(no_cmd) .OR. -
f$locate("/","''prog'") .NE. f$length("''prog'") then cmd :=
$!
$ WS_node = f$extract(0,f$locate(":",f$trnlnm("SYS$NODE")),f$trnlnm("SYS$NODE"))
$ if WS_node .eqs. node
$ then local_flag = "true"
$ else local_flag = "false"
$ endif
$!
$! strip down the function and give us a name
$ func = f$edit(prog, "UPCASE,COMPRESS,TRIM")
$ func = f$extract(0,f$locate("/","''func'"),"''func'")
$ if f$locate(":","''func'") .NE. f$length("''func'") then -
func = f$extract(f$locate(":","''func'")+1,f$length("''func'"),"''func'")
$ if f$locate("]","''func'") .NE. f$length("''func'") then -
func = f$extract(f$locate("]","''func'")+1,f$length("''func'"),"''func'")
$ if f$locate("$","''func'") .NE. f$length("''func'") then -
func = f$extract(f$locate("$","''func'")+1,f$length("''func'"),"''func'")
$ if f$locate(" ","''func'") .NE. f$length("''func'") then -
func = f$extract(0,f$locate(" ","''func'"),"''func'")
$ func = f$extract(0,f$locate("_","''func'"),"''func'")
$!
$!
$!
$! This is the command file that will run the requested program
$!
$!
$!
$ 'tell "Creating a command file on ''node' with"
$ if cmd1 .NES. "" then 'tell " ""$ ''cmd1'"" "
$ 'tell " ""$''cmd' ''prog'"" displayed on ''WS_node' "
$ if local_flag .nes. "true"
$ then open/write temp 'node::'WS_node'_'func'_1.com
$ else open/write temp sys$login:'WS_node'_'func'_1.com
$ endif
$ 'file "$ set verify"
$ if local_flag .nes. "true"
$ then 'file "$ set display/create/node=''WS_node'"
$ else 'file "$ set display/create/transport=local"
$ endif
$ 'file "$ on warning THEN continue"
$ 'file "$ ''cmd1'"
$ 'file "$ ''cmd' ''prog'"
$ 'file "$ set display/noperm "
$ 'file "$ del ''WS_node'_''func'_%.com;*"
$ 'file "$ purge ''WS_node'_''func'_%.log"
$ 'file "$ exit"
$ close temp
$!
$!
$! This is the batch file that will create the process and run the command
$!
$!
$!
$!
$ 'tell "Creating Batch File "
$ if local_flag .nes. "true"
$ then open/write temp 'node::'WS_node'_'func'_2.com
$ else open/write temp sys$login:'WS_node'_'func'_2.com
$ endif
$ 'file "$ define sys$print nl:"
$ 'file "$ set verify"
$ 'file "$ proc_num = 0"
$ 'file "$! "
$ 'file "$ proc_name = ""''WS_node'$"" + ""''func'"""
$ 'file "$ proc_name = f$edit(proc_name, ""COLLAPSE"")
$ 'file "$ pid = f$getjpi(0, ""PID"")"
$ 'file "$ if proc_name .nes. """" then goto check"
$ 'file "$ proc_name = ""RR$XX"" + pid"
$ 'file " + f$extract(f$length(pid)-5,5,pid)"
$ 'file "$CHECK:
$ 'file "$ on warning then goto cont"
$ 'file "$ sho proc/nooutput 'proc_name "
$ 'file "$ gosub rename "
$ 'file "$ goto check "
$ 'file "$CONT:"
$ 'file "$ start_run:"
$ 'file "$ msg = f$fao(""Starting '!AS' on Node !AS"", proc_name, f$trnlnm(""SYS$NODE""))"
$ 'file "$ write sys$output msg"
$ 'file "$ run/detached sys$system:loginout.exe -"
$ 'file " /input=''WS_node'_''func'_1.com -"
$ 'file " /error=''WS_node'_''func'_1.log -"
$ 'file " /output=''WS_node'_''func'_1.log -"
$ 'file " /proc='proc_name - "
$ 'file " /buffer_limit=30000/enqueue_limit=800/extent=10000 -"
$ 'file " /io_buffered=100/io_direct=100/maximum_working_set=2048 -"
$ 'file " /page_file=30000/authorize/file_limit=64/working_set=512
$ 'file "$ exit"
$ 'file "$rename:
$ 'file "$ proc_num = proc_num + 1
$ 'file "$ proc_name = f$extract(0,f$locate(""_"",proc_name),proc_name) + ""_"" + f$string(proc_n
$ 'file "$ return
$ close temp
$!
$ 'tell "Submitting Batch Command File..."
$ if local_flag .nes. "true"
$ then submit/remote/nonotify/noprint 'node::'WS_node'_'func'_2.com
$ else submit/notify/noprint sys$login:'WS_node'_'func'_2.com
$ endif
$ EXIT:
|