[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

1378.0. "CREATE/TERM command parameter" by BISTRO::CONNOLLY () Wed Sep 06 1989 09:12

    I just installed VMS V5.2 and DECwindows V2.0 FT and decided to convert
    my CHILD commands into CREATE/TERM commands. According to the
    documentation in the release notes CREATE/TERM has a command parameter.
    Although it doesn't specifically say I suspected that the syntax was
    the same as for CHILD, a quoted string, but it doesn't seem to work.

    I use the following CREATE/TERM command which does everything expected
    of it except perform the designated command. I have tried other DCL
    commands and different syntax forms without any positive results.
    
    $ CREATE/TERM
            /PROCESS="VWSlat" -
            /DETACH -
            /WINDOW_ATTRIBUTES=( -
                                ICON_NAME="LAT", -
                                TITLE="VWSlat", -
                                INITIAL_STATE=ICON, -
                                X_POSITION=10, -
                                Y_POSITION=625, -
                                COLUMNS=80, -
                                ROWS=10) -
            "RUN SYS$SYSTEM:VWSlat"
    
    I also noticed that if I define /PROCESS to be a name that has more
    than 15 characters I get the following error:
    
        %SYSTEM-F-IVLOGNAM, invalid logical name

    Is this limitation of 15 characters a bug or a feature? I suspect a
    feature since it seems to be consistent with the VMS SPAWN/PROCESS but
    why the message, invalid logical name? Wouldn't a message indicating an
    invalid CREATE/TERM parameter be just as easy to implement and a little
    more informative? It took a long time to isolate the cause of that
    seemingly innocent error message.

T.RTitleUserPersonal
Name
DateLines
1378.1QUARK::LIONELFree advice is worth every centWed Sep 06 1989 12:238
    The 15-character limit on process names is a VMS limitation.  The
    error message is inane, I'll admit.  I recall griping about it many
    years ago.
    
    Can't help on the other problems.
    
    			Steve

1378.2ERIS::CALLASThe Torturer's ApprenticeWed Sep 06 1989 13:466
    re the stupid error message:
    
    Noted. I'll fix it in a future release.
    
    	Jon

1378.3Cannot use /DETACH and parameterEZWIND::LEVYBound to cover just a little more groundWed Sep 06 1989 15:2218
The following works for me:

CREATE/TERM-
 /PROCESS="VWSlat"-
 /WINDOW_ATTRIBUTES=(-
  ICON_NAME="LAT",-
  TITLE="VWSlat",-
  X_POSITION=10,-
  Y_POSITION=625,-
  COLUMNS=80,-
  ROWS=10) -
  $SYS$SYSTEM:VWSlat
  
Your problem is using the /DETACH qualifier. The documentation states that
the parameter is only used when /DETACH is not specified.

	- Dave

1378.4Correction...works for me with restrictionsEZWIND::LEVYBound to cover just a little more groundWed Sep 06 1989 20:3937
Since HANNAH:: seems to be sick today, I'll put this here.

I have to change my previous reply to say "with restrictions".  I'll enter a 
QAR on this.

I have Identical commands in a command procedure, in my FileView Verbs and 
Menus, and in the Session Manager Applications Definitions.  The commands are 
as follows:

$CREATE/TERM-
 /PROCESS="DECterm_VWSlat"-
 /WINDOW_ATTRIBUTES=(-
  ICON_NAME="LAT",-
  INITIAL_STATE=ICON,-
  TITLE="VWSlat",-
  X_POSITION=10,-
  Y_POSITION=625,-
  COLUMNS=80,-
  ROWS=10) -
  RUN SYS$SYSTEM:VWSlat
$!

My results are that things work fine if I execute the command procedure from
a DECterm or if I execute the commands from FileView.  

However, I am unable to successfully execute this from the Session Manager 
Applications Menu.  An ICON is created (or if I remove the INITIAL_STATE=ICON,
a DECterm window is created), but it disappears with no error message that I
can find very quickly.

Am I doing something wrong?  Is this a bug?  Is there some way to find the 
error message? 

Thanks,

	- Dave 

1378.5I'm also having problems with create/term in session managerLNKUGL::BOWMANBob Bowman, CSC/CS SPACE TeamWed Sep 06 1989 22:4410
I have been playing with .-1 in the session manager today too.

I found I could sometimes get the session up, but only when generating certain
kinds of errors. When I eliminated the errors, the application refused to run
any longer. It almost acts as if it is getting an EOF (^Z) on the input right
after it starts, as I get the window up, VWSLAT starts, displays its prompt
and immediately exits.

Anyone have any clues?

1378.6CREATE/TERMINAL/WAITHANNAH::MESSENGERBob MessengerWed Sep 06 1989 23:3118
Re: .4

When you run an application from the session manager, the session manager
creates a detached process (let's call this Process A), and in that process
it runs the command you specified, in this case CREATE/TERMINAL.  If you don't
use /DETACH, CREATE/TERMINAL creates a subprocess (Process B) in the DECterm
window.  Once the window has been created, the CREATE/TERMINAL command
completes.  If you ran CREATE/TERMINAL from a DECterm window you'll get a DCL
prompt, but if you ran it from the session manager, its process (Process A)
will exit.  Since Process B is a subprocess of Process A, it will also exit,
and your DECterm window will disappear.

You can get around this by specifying /WAIT on your CREATE/TERMINAL command
line.  This means the CREATE/TERMINAL command won't complete until Process B
exits.

				-- Bob

1378.7THANKS!EZWIND::LEVYBound to cover just a little more groundThu Sep 07 1989 12:2912
Many thanks, Bob!

That also helps to explain why I'd see the process count on the system 
increment by 2.

It's really too bad that the /DETACH qualifier will not use the parameter!

It's nice to autostart things like VWSlat, but I may need to manually start
it from FileView in order to conserve resources.  We'll see...

	- Dave

1378.8One solution...LNKUGL::BOWMANBob Bowman, CSC/CS SPACE TeamThu Sep 07 1989 14:3523
Now that I understand what is happening, here is a solution to autostarting in
only one process...

I defined the Lat application in the Session manager as:

Create/term/detach/process="DECwLat"/window=(rows=10,columns=80,title="DECwLat",
icon_name="DECwLat",Initial_state=Icon)

This of course will start a detached terminal session, but it will run your
LOGIN.COM. So in login.com I added the line:

$If f$getjpi("","PRCNAM") .eqs. "DECwLat" then @sys$login:run_lat.com


and in run_lat.com I have:

$define/user sys$input sys$command
$run sys$system:vwslat.exe
$logout

I can now autostart the VWSlat software and when it exits, the process is gone.
No extra resources are used.

1378.9You just gave me an ideaPRNSYS::LOMICKAJJeff LomickaThu Sep 07 1989 16:0114
Hey, Bob,

Here's an idea!  Allow /NOPROCESS to accept a command parameter,
and LIB$DO_COMMAND the parameter value as you exit.

Bear in mind that I don't remember the exact syntax for CREATE/TERMINAL:

This way, you could do a
    CREATE/TERMINAL/NOPROCESS/LOGICAL_NAME=(SYS$INPUT,SYS$OUTPUT) RUN VWSLAT
thus getting CREATE/TERMINAL to create a new terminal device to use as
the primary I/O device for the process.

If I get a chance I'll add this capability to CHILD and see how it works out.

1378.10Good stuff!NECSC::LEVYBound to cover just a little more groundThu Sep 07 1989 19:258
    Thanks for the idea, Bob!
    
    Much better than the answer I got from the QAR (which basically said
    that it would be re-worked in V3).  Very creative.  I guess that's why
    you guys at the CSC-CS get the big bucks, eh?  :-)
    
    	- Dave

1378.11Sounds interesting...HANNAH::MESSENGERBob MessengerThu Sep 07 1989 21:1217
Re: .9

I'll be interested in hearing how it works out, Jeff.  I think the main
reason DECterm doesn't allow a command to be passed with anything but
/PROCESS/NODETACH is that there were restrictions in CHILD about the
kinds of commands that could be run in a detached process, and I didn't
want to have to worry about that.  It looks like LIB$DO_COMMAND might have
similar restrictions, e.g. you have to be running in a process that has a
CLI.  It will help if you try this stuff in CHILD and see what the problems
are.

Of course, people can always use the DECW$TERM_PORT routine to create their
DECterm windows from a program and create their processes any way they like --
a small matter of programming.

				-- Bob

1378.12PRNSYS::LOMICKAJJeff LomickaFri Sep 08 1989 14:237
If CHILD or CREATE/TERMINAL is running, then you KNOW that the command
interpreter is there.  What I'm talking about is NOT creating a new
process, but instead, re-using the process that is running CHILD.

I'll let you (all) know when I have something.


1378.13create/term/window_attr colorsBINKLY::KUMPFjohn, vax chip design, hudson, MA, USAFri Nov 16 1990 21:4217
my system manager gave me a list of pre-defined colors to use with the

	create/terminal/window_attributes=(background=?,forground=?)

command.

i admit it is a long list.
still, is there a way to specify any color i want in terms of
Red/Green/Blue percentages like i do from SM's customize window menu?

for example, i'd like to specify a dark red window with R20 G0 B0 ,
or a yellow window with R100 G100 B0

thanks in advance,

john
1378.14yes...WIDGIT::WESTSCARY : A programmer with a screwdriver.Sat Nov 17 1990 21:1613
  You should be able to use the syntax #rrrrggggbbbb when specifying
the colors.

  I think I've done this before...just not sure...I'm at home and have no
way of checking this at the moment.

  Give it a try and see what happens...

	CREATE/TERM/WINDOW=(FORE=#FF4356FC2323, BACK=#FFFF0000F444)

					-=> Jim <=-

1378.15add a named colorVINO::MCARLETONReality; what a concept!Mon Nov 19 1990 14:278
    
    You could also have the system manager add a named color to the
    SYS$MANAGER:DECW$RGB.COM file for you.
    
    Add a line that looks like this and restart the server.
    
$ decw$define_server "DECW$RGB_myblue" "2537,1200,37779"
    
1378.16#rrrrggggbbbb makes me happyBINKLY::KUMPFjohn, vax chip design, hudson, MA, USAMon Nov 19 1990 14:404
works like a charm, jim

thanks tons.