[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

1909.0. "AutoStart - modifiable?" by HABS11::MASON (Explaining is not understanding) Thu Dec 14 1989 00:25

    What is the mechanism used in the AutoStart command?  Can the command
    be modified, as in the Application Menu of FileView?  If so, how?
    
    Thanks...Gary
T.RTitleUserPersonal
Name
DateLines
1909.1DECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Thu Dec 14 1989 14:173
Did you try Customize/Appliation Definitions menu from the session manager?

Burns
1909.2Uh...(blush)...no. Shall try same...HABS11::MASONExplaining is not understandingThu Dec 14 1989 22:301
    
1909.3Doesn't work...HABS11::MASONExplaining is not understandingFri Dec 15 1989 14:175
    The kind of mod I wish to make (execute command file) seems not to be
    to the liking of SM.  Everything I try reverts to the original RUN
    command as shipped.
    
    Gary
1909.4Work around...MELTIN::dickGvriel::SchoellerFri Dec 15 1989 16:226
You are looking to redefine the predefined ones?  You can't.  What you can
do is put in some new ones that look the same but are capitalized differently
(or some other way to make them slightly different).  These can be defined
any way you please.

Dick
1909.5Bingo...thanksHABS11::MASONExplaining is not understandingFri Dec 15 1989 19:081
    
1909.6Sigh...reverted to failure again...HABS11::MASONExplaining is not understandingMon Dec 18 1989 17:1228
    Unfortunately, my Bingo card was too sensitive, and now I'm back at
    square one.
    
    I have defined a menu item under AutoStart called CardFiler (note the 
    capital "F").  I have included the following as the menu command (note 
    that I have tried several options here, none of which work):
    
    	spawn/nowait/proc="CardFiler" @sys$startup:cardfiler$start
    
    The cardfiler$start.com file contains:
    
    	$ card :== $decw$cardfiler
    	$ card sys$manager:contacts.card
    	$exit
    
    The application does not get autostarted, though the message in the SM
    window is
    
    	Starting CardFiler  (18-DEC-1989 13:18)
    
    I have the identical construct associated with the same application in
    FileView, through the Verbs and Menus menu item, and it works just fine
    when invoked from the Applications menu.
    
    Any suggestions?  And, while we are at it, I would like to find the new
    location to include a statement to bring it up iconified.
    
    Thanks...Gary
1909.7*run* cardfilerUVRMNT::HERRLICHAlan HerrlichMon Dec 18 1989 19:5910
What is happening is that the Session Manager creates a detached (?) process to do the command,
do the command the detached process spawns the cardfiler and then the detached
process had nothing to do so it exits taking your spawn/nowait process with it.
Kind of like submitting the same command to batch.

So take out the spawn... in your case just make it

@sys$startup:cardfiler$start

					- Alan
1909.8PRAVDA::JACKSONKing CynicWed Dec 27 1989 16:1828
Along the lines of the previous reply


Why is it that ifI want to run DECwrite and I build my command
definition as:

RUN/PROCESS="DECwrite" sys$system:decwrite



it doesn't work.  If I then define my command to be 

Run sys$system:decwrite 


Everything works fine and DECwrite is then started.


I'd really like to have process names associated with these things, so 
when I do a show system, I don't have a bunch of JACKSON_N processes 
lying around.


(I know I can use a command procedure to set the process name, but I
don't want to do that, why doesn't the above work?)


-bill
1909.9RUN/PROCESS creates a subprocess4GL::SCHOELLERWho's on first?Wed Dec 27 1989 17:4310
.8

Bill,

RUN/PROCESS creates a subprocess.  The parent process has nothing to keep it
from going away.  When the parent process goes away, so does the subprocess.
Without building up a method for running detached, you are out of luck as far
as process names are concerned.

Dick
1909.10PRAVDA::JACKSONKing CynicWed Dec 27 1989 17:5512
Argh!


So, it looks like I'll have a bunch of COM files that do the trick.



Can we (Digital) make something better for the next release of DECwindows?



-bill
1909.111 .com file, not many4GL::SCHOELLERWho's on first?Wed Dec 27 1989 18:4755
Bill,

Rather than have a .com file for each command that you might want to put in the
menu, you can have a command that implements detach a command and then create
symbols to run all of the applications.

Below the form feed there is a .com file that will do just that.  You then
create a few symbols from login.com and decw$login.com (I use symbols.com) and
use the command "detach <command> [arguments or qualifiers]" for each
application in the menu.

$detach == "@dev:[dir]detach_job"
$decwrite == "$decwrite"
$paint == "$decw$paint"
 .
 .
 .

$! detach_job.com
$ if "''p1'" .nes. "" then goto doit
$	write sys$output "Detach what?"
$	exit
$doit:
$ this_command = f$environment("procedure")
$ comdir = f$parse (this_command, "", "", "DIRECTORY")
$ comdev = f$parse (this_command, "", "", "DEVICE")
$!
$ sys_login = F$LOGICAL ("SYS$LOGIN")
$ logdir=f$logical("DECW$LOG")
$ if logdir .eqs. "" then logdir = "''sys_login'"
$ pname=f$extr(0,15,p1)
$ pname=f$elem(0,"/",pname)
$ lfile="''logdir'''pname'_d.log"
$ cfile="''sys_login'''pname'_d.com"
$ def/user sys$output nl:
$ show display/symb
$ display=""
$ if decw$display_transport .nes. "LOCAL" then display=decw$display_node
$!
$ open/write comfile 'cfile'
$ write comfile "$!set ver"
$ if f$edit(pname,"UPCASE") .eqs. "BANNER" then write comfile "$set proc/priv=all"
$ write comfile "$cfile=f$env(""PROCEDURE"")"
$ write comfile "$pfile=f$elem(0,"";"",cfile)"
$ write comfile "$del 'pfile';*"
$ write comfile "$def sys$login ''f$logical ("sys$login")'"
$ write comfile "$def sys$scratch ''f$logical ("sys$login")'"
$ write comfile "$@sys$login:login.com"
$! write comfile "set ver"
$ write comfile "$@''comdev'''comdir'display.com ''display'"
$ write comfile "$''p1' ''p2' ''p3' ''p4' ''p5' ''p6' ''p7' ''p8'"
$ close comfile
$!
$ ru/det/authorize/priv=all/page=100000/outp='lfile'/inpu='cfile'/proc="''pname'" sys$system:loginout.exe/file=60
$ purge/keep=2/nolog 'lfile'
1909.12And here's my another versionHPSRAD::KOMAREntropy isn't what it used to beFri Dec 29 1989 15:1077
    	
    I've been running detached processes for a while.  I usually do it on a
    cluster which doesn't allow its users the Detach priv (for obvious
    security reasons, like I might create a detached process :-), hence
    it uses run/det sys:loginout.  Furthermore, this is just a shell which
    invokes a .com file in the detached process.  The original version of
    this file came from a decw$mail developer.

	The whole process is complicated, but so is VMS.

	The symbols I use look like:
$ decw$write :== @com:run-decw-application com: decw-write
$ decw$tetris :== @com:run-decw-application com:decw-tetris
    
    	Here's my version:  (and following that will be the file it invokes
    	for decWRITE.
    
$!-- run-decw-application.COM ----------------------------------------------
$! 
$!
$ startupfile	= p1 + p2 + ".com"
$ errorFile	= f$trnlnm("sys$scratch") + p2 + ".err"
$ outputFile	= f$trnlnm("sys$scratch") + p2 + ".out"
$ processname	= "pk$" + "''p2'"
$!
$ define/user sys$output get-pid.tmp
$ run/detached sys$system:loginout.exe -
	/input		= 'startupfile' -
	/error		= 'errorFile' -
	/output		= 'outputFile' -
	/process	= "''processname'" - ! "''symbol'" preserves case
	/file_limit	= 100 -
	/buffer_limit	= 30000 -
	/enqueue_limit	= 800 -
	/extent		= 4096 -
	/io_buffered	= 100 -
	/io_direct	= 100 -
	/maximum_working_set= 20000 -
	/page_file	= 20000 -
	/subprocess	= 4 -
	/working_set	= 4000
$!
$!	process has been created, now dig out the pid
$ open/read temp get-pid.tmp
$ read temp /end_of_file=temp_end line
$ temp_end:
$ close temp
$ delete get-pid.tmp;
$!
$ pid == f$element(6," ",line)
$ if "''pid'" .eqs. " " 
$	then eval "couldn't find pid"
$	else eval "created processed id = ", pid
$ endif
$!
$ show process/id='pid
$!
$!
$!-- END OF STARTDWMAIL.COM ---------------------------------------------------
$ exit



$!	decw-write.com
$!
$!	
$ @clu3:[komar]login komar clu3 ; p1 is my login directory, p2 is my login
$!								device
$ procname "pk$decwrite"	; sets the process name
$ @com:pk$set_Display		; sets the decw$display pseudo device
$ set verify
$!
$ define/job sys$print ps$print:
$!
$ run sys:decwrite.exe
$!
$ exit