| We have the same problem here. The procedure below works well for us, you might
need to change some things, like queue names, to suit your environment.
All it does is submit a batch job to a queue on the BOOT node(s). The batch job
in turn creates a DETACHED process running FileView. In this way, you won't clog
up the batch queue.
Once FileView is running, you can start any more applications you wish -- they
then run as sub-processes of the VUE$MASTER process.
All you have to do then is place @VUE in your DECW$LOGIN.COM, and of course set
up the SECURITY on your W/station to allow the remote process to have access.
One thing to be careful of. The process name of the detached process created on
the boot nodes is <nodename>::VUE. The procedure used the first part of this
string to find out where to direct the SET DISPLAY/CREATE command. Ensure that
your LOGIN.COM does not set up a personal process name for processes whose mode
is anything other than INTERACTIVE!
Also, make sure your process quotas are sufficient to handle the number of
applications you want to spawn from VUE.
Enjoy,
/Mike
================================================================================
$!
$! V U E . C O M
$!
$! Mike Grossmith
$! September 1988
$!+++
$! This procedure provides a convenient means for users with "low powered"
$! workstations to start a number of DECwindows applications on a remote
$! node with more resources.
$!
$! It requires a generic batch queue that feeds the system(s) on which
$! the remote applications are to run. The symbol REMOTE_QUEUE points to this
$! queue.
$!
$! CALLING SEQUENCE:
$!
$! This procedure can be called as follows:-
$!
$! @VUE MODE [QUEUE] [TARGET_NODE]
$!
$! P1 - MODE. May be either Local or Remote (the first character
$! is all that is required. Specifes whether the applications
$! are to be started on the local or the remote queue
$!
$! P2 - QUEUE. All the local or remote queue definitions to be overriden
$!
$! P3 - TARGET. Allows the target of the dislpay to be selected
$!
$! For debugging purposes, the DCL sumbol VUE$DEBUG may be set TRUE
$! prior to invoking this procedure. This will cause two log files
$! to be created for examination later.
$!
$! NOTE: The procedure must be called from the LOCAL session.
$!
$! The symbol LOCAL_QUEUE points to a queue on the local system.
$! In INTERACTIVE mode -- submit a batch job to this nodes queue
$! In BATCH mode -- start a detached VUE process
$! In OTHER mode -- run the VUE image, with the display directed
$! at the originating node
$!---
$ set noon
$ node = f$getsyi("NODENAME")
$!+++
$! The next two lines can be edited to reflect any particular system configuration
$!---
$ remote_queue = "SYS$BATCH"
$ local_queue = "SYS$''node'_BATCH"
$
$ if f$mode() .eqs. "INTERACTIVE"
$ then
$ if f$getsyi("NODE_VOTES") .ne. 0
$ then
$ write sys$output ""
$ write sys$output "%VUE-F-NOTSAT You can ONLY run this procedure from a SATELLITE node"
$ write sys$output ""
$ EXIT
$ endif
$ if f$type(vue$debug) .eqs. "" then vue$debug = 0
$ vue$verify = 'f$verify(VUE$DEBUG)'
$ if P1 .eqs. "" then P1 = "REMOTE"
$ P1 = f$edit(P1,"TRIM,UPCASE")
$ P2 = f$edit(P2,"TRIM,UPCASE")
$ P3 = f$edit(P3,"TRIM,UPCASE")
$!+++
$! Sort out which queue we are going to use. If P2 is specified, then use
$! that queue. If not, then choose LOCAL or REMOTE depending on P1
$!---
$ if P2 .eqs. ""
$ then
$ if P1 .eqs. "LOCAL"
$ then queue = local_queue
$ else
$ if P1 .eqs. "REMOTE"
$ then queue = remote_queue
$ endif
$ endif
$ else queue = P2
$ endif
$
$ if P3 .eqs. "" then P3 = node
$!+++
$! Now set things up for DEBUG mode is required
$!---
$ if vue$debug
$ then
$ params = "DEBUG,''P3'"
$ log_sw = "LOG=VUE-BATCH.LOG"
$ else
$ params = """"",''P3'"
$ log_sw = "NOLOG"
$ endif
$!+++
$! Submit this procedure to the appropriate queue
$!---
$ submit /noprint /'log_sw' /queue='queue' /parameter=('params') 'f$environment("PROCEDURE")'
$ if vue$debug then vue$verify = 'f$verify(VUE$VERIFY)'
$ exit
$ else if f$mode() .eqs. "BATCH"
$ then
$ if p1 .eqs. "DEBUG"
$ then outdev = "VUE-DETACHED.LOG"
$ else outdev = "NLA0:"
$ endif
$ set process/priv=ALTPRI
$ run sys$system:loginout -
/detach -
/input='f$environment("PROCEDURE")' -
/authorize -
/output='outdev' -
/error=vue.err -
/ast_limit=500 -
/buffer_limit=100000 -
/enqueue_limit=1000 -
/file_limit=100 -
/io_buffered=200 -
/io_direct=200 -
/working_set=300 -
/maximum_working_set=16384 -
/page_file=100000 -
/priority=4 -
/queue_limit=200 -
/subprocess_limit=20 -
/job_table_quota=2048 -
/process_name="''p2'::VUE"
$ exit
$ else if f$mode() .eqs. "OTHER"
$ then
$ target_node = f$element(0, ":", f$getjpi("","PRCNAM"))
$ set display/create/node='target_node'
$! spawn/nowait/process="''target_node'::Cal"/input=NL: run sys$system:DECW$CALENDAR.EXE
$! spawn/nowait/process="''target_node'::Mail"/input=NL: run sys$system:DECW$MAIL.EXE
$! spawn/nowait/process="''target_node'::Notes"/input=NL: notes/decwindows
$ run sys$system:VUE$MASTER
$ exit
$ endif
$EXIT
|
| This procedure will do it also with nothing needed.
Load it and get help.
rr :== @[xxx]remote_run.com
rr help - for help
rr mcr remote_node::vue$master - to run vue
rr remote_node::notes/decw - to run notes
rr mcr remote_node|username|pasword|::vue$master - run vue and no proxy
rr mcr remote_node::dwcwrite < set def [user.doc.dwrite] -
run decwrite but set the def dir first
*****************************************************************************
$ 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 = "DSTEG" ! node if not specifid
$ def_run_opt = "VERB" ! function if not specifid
$ def_prog = "DECW$MAIL" ! application if not specifid
$ ext_cnt=0 ! extra cmd parameter counter
$ ecmd1 := ! extra commands
$ run_opt := ! run option (@,MCR) for remote system
$ node := ! node to go to
$ node_access := ! combine node/password
$ password :=
$ prog := ! program to be run
$ user :=
$!
$ file_num = 0
$ func = "func" ! part of file name
$ tell = "write sys$output"
$ file = "write temp"
$ run_opts = "MCR/MC/M//RUN/R/$/@/VERB/V/" ! this is whats allowed now
$ no_run_opt = "VERB/" ! no command opts needed
$ sel_opts = "NODE/PROGRAM/PROG/" ! this is whats allowed now
$ ext_opts = "SU/SETUP/</./" ! set up commands
$ parm :=
$ parm1 :=
$ x=0 ! parameter counter
$!
$NOINPUT: ! no parameters
$ if p1 .NES. "" then goto start
$ inquire p1 "Command? [""''def_run_opt'""] "
$ if p1 .eqs. "" then p1 = def_run_opt
$ 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:
$ TYPE SYS$INPUT:
Remote run an object and display it on the local node.
Run Modes are as follows:
Mode1 - to select: type:
Node NODE name
Command MCR, VERB, RUN or @
Program PROG filespec
Setup commands run prior
to initial Command SETUP (or '<', '.') spec
(SETUP has be the last parameters on the cmd line)
i.e. $ RUN NODE foo PROG CMS/DECW EXT SET DEF [.DEV]
Mode2 - (@, RUN, VERB or MCR) NODE::FILESPEC < set def [.doc]
Mode3 - (@, RUN, VERB or MCR) node filespec SETUP set def [-]
Password: To use a password include it as normal with the node name except
use ""|"" around the user name and password instead of space and
quotes.
NODE|user|password|::
Note: To run a program with parameters put the command and the parameters
in quots
$ EXIT
$START:
$DO_PARM:
$ x=x+1
$ if x .GT. 8 then goto run
$ p'x' = f$edit(p'x', "UPCASE,COMPRESS,TRIM")
$ parm = p'x'
$ if parm .EQS. "" then goto run
$ if parm .eqs. "HELP" then goto help
$ IF (F$LOCATE(f$element(0," ",parm)+"/",RUN_OPTS) .NE. F$LENGTH(RUN_OPTS)) -
.OR. (F$LOCATE(f$element(0," ",parm)+"/",NO_RUN_OPT) .NE. -
F$LENGTH(NO_RUN_OPT)) THEN goto run_opt
$ IF F$LOCATE(f$element(0," ",parm)+"/",SEL_OPTS) .NE. F$LENGTH(SEL_OPTS) THEN goto 'parm
$ IF F$LOCATE(f$element(0," ",parm)+"/",EXT_OPTS) .NE. F$LENGTH(EXT_OPTS) THEN goto ext
$ gosub options
$ goto do_parm
$!
$NODE: ! get the node name
$ x=x+1
$ if x .GT. 8 then goto do_parm
$ parm = p'x'
$NODE1:
$ node = f$extract(0,f$locate(":","''parm'"),"''parm'")
$ goto do_parm
$!
$RUN_OPT: ! get the node name
$ run_opt = f$element(0," ",parm)
$ if run_opt .EQS. "V" then run_opt := VERB
$ if run_opt .EQS. "R" .OR. run_opt .EQS. "$" then run_opt := RUN
$ if (run_opt .EQS. "M") .OR. (run_opt .EQS. "MC") then run_opt := MCR
$ parm = parm - f$element(0," ",parm)
$ if F$LENGTH(parm) .NE. 0 then gosub options
$ goto do_parm
$!
$EXT: ! extra commands
$ if ext_cnt .NE. 0 then x=x+1
$ if x .GT. 8 then goto do_parm
$ parm = p'x'
$ if parm .EQS. "" then goto do_parm
$ IF F$LOCATE(f$element(0," ",parm)+"/",EXT_OPTS) .NE. F$LENGTH(EXT_OPTS)
$ THEN ext_cnt = ext_cnt+1
$ ecmd'ext_cnt' :=
$ parm = parm - f$element(0," ",parm)
$ if F$LENGTH(parm) .EQ. 0 then goto ext
$ ENDIF
$ ecmd'ext_cnt' = ecmd'ext_cnt' + parm + " "
$ goto ext
$!
$!
$PROGRAM: ! get the program name
$PROG:
$ x=x+1
$ parm = f$edit(p'x', "UPCASE,COMPRESS,TRIM")
$PROG1:
$ prog = parm
$ if f$extract(0,1,prog) .EQS. "@"
$ then run_opt = f$extract(0,1,prog)
$ prog = prog - run_opt
$ endif
$PROG2:
$ if f$locate("::","''prog'") .EQ. f$length("''prog'") then goto prog3
$ parm = prog
$ node = f$element(0,":",parm)
$ if f$locate("|","''node'") .NE. f$length("''node'")
$ then user = f$element(1,"|",node)
$ password = f$element(2,"|",node)
$ node = f$element(0,"|",node)
$ endif
$ 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 run_opt .EQS. "" then run_opt = def_run_opt
$ IF F$LOCATE(run_opt+"/",NO_RUN_OPT) .NE. F$LENGTH(no_run_opt) .OR. -
f$locate("/","''prog'") .NE. f$length("''prog'") then run_opt :=
$!
$ 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'")
$ 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
$!
$!
$!
$ on warning then EXIT
$ 'tell "Connecting to ''node'"
$! dir/out=nla0: 'node::
$NAME:
$!
$ gosub rename
$ on warning then goto got_name
$ node_access = node
$ if user .NES. "" then node_access = "''node'""''user' ''password'"""
$ dir/out=nla0: 'node_access::'WS_node'_'func'.com
$CNG_NAME:
$ goto NAME
$GOT_NAME:
$!
$ 'tell "Creating a command file on ''node' with"
$ x=0
$TELL_CMD:
$ if ext_cnt .NE. x
$ then
$ x=x+1
$ ecmd'x' = f$edit(ecmd'x', "COMPRESS,TRIM")
$ parm = ecmd'x'
$ 'tell " ""$''parm'"" "
$ goto tell_cmd
$ ENDIF
$ 'tell " ""$''run_opt' ''prog'"" displayed on ''WS_node' "
$!
$!
$! This is the batch file that will create the process and run the command
$!
$!
$ 'tell "Creating Batch File "
$ on ERROR then EXIT
$ if local_flag .nes. "true"
$ then open/write temp 'node_access::'WS_node'_'func'.com
$ else open/write temp sys$login:'WS_node'_'func'.com
$ endif
$ 'file "$ define sys$print nl:"
$ 'file "$ IF F$MODE() .NES. """BATCH""" THEN goto pass_2"
$ 'file "$ proc_num = 0"
$ 'file "$ user = F$EDIT(f$getjpi(0,""USERNAME""),""COLLAPSE"") "
$ 'file "$ proc_name = ""''WS_node'$"" + ""''func'"""
$ 'file "$ proc_name = f$edit(proc_name, ""COLLAPSE"")
$ 'file "$ if (f$length(proc_name) .GT. 12 ) then - "
$ 'file " proc_name = f$extract(0,12,proc_name) "
$!
$ 'file "$CHECK: "
$ 'file "$ save_pname = proc_name"
$ 'file "$ on warning then goto cont"
$ 'file "$ sho proc/nooutput 'proc_name "
$ 'file "$ gosub rename "
$ 'file "$ goto check "
$!
$ 'file "$CONT:"
$ 'file "$ on warning then proc_name = user "
$ 'file "$ sho proc/nooutput 'user "
$ 'file "$ on warning then goto try_again"
$!
$ 'file "$CONT1:"
$ 'file "$ set verify"
$ 'file "$ run/detached sys$system:loginout.exe -"
$ 'file " /input=''WS_node'_''func'.com -"
$ 'file " /error=''WS_node'_''func'.log -"
$ 'file " /output=''WS_node'_''func'.log -"
$ 'file " /proc='proc_name - "
$ 'file " /AUTHORIZE - "
$ '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 "$TRY_AGAIN:"
$ 'file "$ on warning then goto end"
$ 'file "$ proc_name = save_pname"
$ 'file "$ goto cont1"
$!
$ '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 "
$!
$ 'file "$PASS_2:
$ 'file "$ SET VER
$ 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 goto end"
$ x=0
$EXT_CMDS:
$ if ext_cnt .NE. x
$ then
$ x=x+1
$ parm = ecmd'x'
$ 'file "$ ''parm'"
$ goto ext_cmds
$ ENDIF
$ 'file "$ ''run_opt' ''prog'"
$!
$ 'file "$ END:"
$ 'file "$ on warning then CONTINUE"
$ 'file "$ purge ''WS_node'_''func'.log, ''WS_node'_''func'.com"
$ 'file "$ set display/noperm "
$!
$ close temp
$!
$ 'tell "Submitting Batch Command File..."
$ if local_flag .nes. "true"
$ then submit/remote/nonotify/noprint 'node_access::'WS_node'_'func'.com
$ else submit/notify/noprint sys$login:'WS_node'_'func'.com
$ endif
$ EXIT
$!
$rename:
$! if f$locate("_",func) .EQ.f$length(func) then
$ file_num = file_num + 1
$ func = f$extract(0,f$locate("_",func),func) + "_" + f$string(file_num)
$ return
|