[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

580.0. "questions on remote file view task to task" by CSC32::G_JOHNSON (Just a nickle's worth of dreams) Tue Apr 11 1989 17:36

    This question was posed by a customer.  They are doing remote startup
    of file view using decnet task to task.  From a decterm they are
    issuing the command $TYPE REMOTE_NODE::USERNAME/TASK=COM_PROC.
    
    	The comm proc does a set displ/create/node=ws_node
    	and a run sys$system:vue$master.
    
    All goes well, the file view is started up and is displayed on the
    local work station.  HOWEVER after a minute or two, an error is
    received in the initiating DECTERM to the effect that
    
    	error opening remote task as input, ACP file create failed,
    network partner exited.
    
    BUT - the file view continues to run correctly!
    
    Now, the question that this begs is this.  1) Why doesn't the file
    view FAIL after the link is dropped?  or 2). Are there two links
    involved?
    
    Thanks for any insight into this.
    
    Greg...

T.RTitleUserPersonal
Name
DateLines
580.1Start a detached processRWCVAX::COULSONRoger Coulson DTN 223-6158Wed Apr 12 1989 10:1229
    RE:.0
    
    Here is how I start Fileview remotely.  From my DECW$LOGIN.COM I do a 
    
    $ SUBMIT/REMOTE/NONOTIFY/NOPRINT node::START_REMOTE_FILEVIEW.COM 
    
    and I have proxy access on node "node::".  It could be started many other 
    ways.  There is nothing magical here.  It comes right out of the books.
    
    		/s/	Roger
    
$! file - start_remote_fileview.com
$!
$ RUN /DETACHED -
	/input=sys$sysdevice:[coulson]remote_fileview.com -
	/output=sys$sysdevice:[coulson]remote_fileview.log -
	/authorize -
	/process="RWCVAX_fileview" -
	sys$system:loginout.exe
$exit
$!
    
$! file remote_fileview.com
$!
$ set display /create /node=rwcvax::
$ @sys$manager:decw$startvue
$! startup fileview on remote node
$!

580.2CSC32::G_JOHNSONJust a nickle's worth of dreamsWed Apr 12 1989 12:436
    Thanks for the com file.  But the problem is not that it doesn't
    work, cuz it DOES!  But the issue is, why does the LINK abort, and,
    having done so why does the file view CONTINUE to run?
    
    Greg...

580.3BOOTIS::BAILEYClock Running, 37 Days LeftWed Apr 12 1989 13:473
WAG,  put a SET VERIFY at the top of the 'remote' command procedure,
this will give some data to pass back over the the link

580.4MU::PORTERgonzo engineeringWed Apr 12 1989 15:1927
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.

580.5Remote runningLAS057::HOSSFELDI'm so confused!Wed Apr 12 1989 15:35237
	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:

580.6But it DOES work. WHY?CSC32::G_JOHNSONJust a nickle's worth of dreamsWed Apr 12 1989 15:4910
    Thanks to those you have replied.  Somehow, though, I must not be
    making myslef very clear.  The point is that it *DOES* work.  The
    fileview DOES come up, it REMAINS up and functional even after the
    message about the link being broken.  The question is WHY does the
    file view CONTINUE to run after the link is broken???
    
    Hope that clarifies my question.
    
    Greg...

580.7When a tree falls...DECWIN::KLEINWed Apr 12 1989 17:298
>>    The question is WHY does the file view CONTINUE to run after
>>    the link is broken???

But I think that was already answered.  FileView doesn't USE the logical link,
therefore it doesn't CARE (or even notice) that it was broken.  I think.  :)

-steve-

580.8Thanks!CSC32::G_JOHNSONJust a nickle's worth of dreamsWed Apr 12 1989 18:097
    Thanks Steve,
    
    	That's what I needed.  Sorry if I missed it from a previous
    reply.
    
    Greg...

580.9To shut it up completely...IO::MCCARTNEYJames T. McCartney III - DTN 381-2244 ZK02-2/N24Wed Apr 12 1989 19:3611
And the way to fix the grumbling about the link abort is:

	$ open scratch sys$net
	$ close scratch

Which then causes the link to be acknowleged, opened and closed, and thus 
TYPE on the other end get and end of file. Upon seeing the EOF, TYPE exits
quietly.


580.10Here's a safety net that I use...GOFER::HARLEYAt home, you can scratch where it itchesWed Apr 12 1989 23:259
    I have a few .com files that I like to run remotely via the type
    method; they all have something like this in them:
    
    $ If F$Mode() .eqs. "NETWORK" Then Define Sys$Output Sys$Net:
    
    I know it's lazy, but it does the job most of the time...
    
    /Harley