[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

2328.0. "SET HOST menu anybody?" by BOXTOP::SKI () Wed Feb 21 1990 19:09

    We recently switched from VWS to DECwindows.  (VAXstation II, 9 meg mem.,
    running as a cluster satellite, VMS V5.3-1, DECwindows V2)

    I really like DECwindows, but I was shocked when I discovered there was
    no "Set Host" menu like the one we had with VWS.  This VAXstation is
    used by the night operators to control and monitor many systems in
    the lab simultaneously.  What we do now is create a new DECterm and
    do the SET HOST command at the DCL prompt.  But there are so many
    windows to create "by hand" this way that it becomes quite tedious.

    What we want is a tremendously simple menu where we can just click on
    the node we want to set host to and it will start a new window containing
    the set host session (if "session" is the correct nomenclature).
    In other words, we want a menu like the VWS Set Host Menu.

    It would be perfect if this menu could be an application we could put
    in the startup list.  That way we could just login, click on the node(s)
    we need to work on, and we're off and running.

    Has anybody written a DECwindows menu like this?  Does anybody have
    any sources before I go reinventing the wheel?

T.RTitleUserPersonal
Name
DateLines
2328.1(.0 continued)BOXTOP::SKIWed Feb 21 1990 19:1825
    The com file below is what I've come up with so far, but it's far
    from being a traditional DECwindows menu, and still requires the
    user to bring up that first DECterm in order to run the com file.

    I already tried VWSLAT, but that's no better than what I have
    written below.  I want a "click on the node" menu.

----------------------------------------------------------------------------
$!!!!! HOST.COM !!!!!
$! Create a DECwindow with a 'set host' process in it, using any node
$! the user requests.  The node can be passed as P1, or can be prompted for.
$!
$ IF P1 .NES. "" THEN GOTO Have_Node
$ IF P1 .EQS. "" THEN INQUIRE/NOPUNCTUATION P1 "Set Host To Node: "
$ IF P1 .EQS. "" THEN EXIT
$ Have_Node:
$ Node := 'P1'
$ IF F$GETSYI("NODENAME") .NES. "BLOTTO"
$    THEN WRITE SYS$OUTPUT "You cannot do that from where you are."
$         WRITE SYS$OUTPUT "You have to be logged into BLOTTO using DECwindows."
$         EXIT
$ ENDIF
$ CREATE/TERMINAL/NOWAIT/BROADCAST -
    /WINDOW=(TITLE="Window to ''Node'",ICON="''Node'",INITIAL_STATE=WINDOW)-
    SET HOST 'Node'
2328.2rootmenuWAIT::DESAIJatin DesaiWed Feb 21 1990 19:484
Look at the ROOTMENU program in ELKTRA::DW_EXAMPLES.

Jatin
2328.3Use the Session Manager or FileViewTOOK::MERSHONRic - LAT/VMS EngineeringThu Feb 22 1990 18:4118
	You can do what you want to very easily by using
	Customize in the Session Manager to add some
	"Applications" which execute the CREATE /TERMINAL
	command.  Supply SET HOST as the command to
	CREATE /TERMINAL.  Create a few of these
	"Applications" and you could name each of these
	to be the remote node you are trying to access.
	Then when you want to connect to the node, you
	simply "select" the node from the Applications
	Menu.  It's that easy!

	Or, if you like FileView, write a VUE COM file
	to do the same thing for you.  There's information
	in the DECwindows User's Guide on how to do this.

	-ric.

2328.4Tried 'em lots of times....no goMSBTEM::SKIFri Feb 23 1990 12:5832
    RE: .3

>>>	You can do what you want to very easily by using
>>>	Customize in the Session Manager to add some
>>>	"Applications" which execute the CREATE /TERMINAL
>>>	command.  Supply SET HOST as the command to
>>>	CREATE /TERMINAL.  Create a few of these
>>>	"Applications" and you could name each of these
>>>	to be the remote node you are trying to access.
>>>	Then when you want to connect to the node, you
>>>	simply "select" the node from the Applications
>>>	Menu.  It's that easy!

    Nope.  Sorry Ric, but that doesn't work.  In fact, that was the first
    way I tried to do it (seemed the easiest way to me too).  This creates
    the terminal window for about 1 second, then it disappears.  I've also
    tried creating detached processes this way....same results.  I've also
    tried making the menu command call a COM file containing the commands,
    this didn't work either.  From the errors, it appears the problem is
    with the SYS$INPUT device that the new terminal window is using --
    gives the error "input device is not a terminal,"  this error appears
    to come from the SET HOST part of command/commmand-procedures.

    Does this work for you?  What versions of VMS and DECwindows are you
    using?  Mine are VMS V5.3-1 and DECwindows V2.

>>>	Or, if you like FileView, write a VUE COM file
>>>	to do the same thing for you.  There's information
>>>	in the DECwindows User's Guide on how to do this.

    COM files wouldn't do it for me either.  That is when I started
    writing my own program to do it.
2328.5CREATE /TERMINAL /WAITTOOK::MERSHONRic - LAT/VMS EngineeringFri Feb 23 1990 14:027
	Sorry that I didn't point out that you must include the
	/WAIT qualifier to the CREATE /TERMINAL command.  This
	works fine for me!

	-ric.

2328.6Thank youMSBIS1::SKIFri Feb 23 1990 15:0438
    I made several more ditch efforts to get it to work from the
    session manager.  I found this to work (but it's not a pretty sight):

    MENU ITEM =
    	CADLIB

    MENU COMMAND =
    	CREATE/TERMINAL/DETACH/LOGGED_IN/INPUT=SYS$LOGIN:1.COM

    SYS$LOGIN:1.COM =
    	$ DEFINE SYS$COMMAND 'F$PROCESS()
    	$ SET HOST CADLIB

    The window gets created, then the SYLOGIN.COM is execute, giving many
    warning messages about the device not being a mailbox, then 1.COM is
    executed and the SET HOST session starts in the window.  Touch Down!
    Like I said, not a pretty sight, but it works.
----------
    I just read your last reply about including /WAIT in the menu command.
    Hey!  That works perfectly!  But why /WAIT and not /NOWAIT?
    HELP says this:

    CREATE
       /TERMINAL
          /WAIT
          /NOWAIT (default)

       Requires that you wait for the subprocess to terminate before you
       enter another DCL command. The /NOWAIT qualifier allows you to
       enter new commands while the subprocess is running. This qualifier
       is used only with /NODETACH.


    Even after seeing it work with my own eyes, no lightbulb has appeared
    over my head.  I'm confused but happy.

    Thank you for the help, Ric.

2328.7DCL command file to do this for any node.SSDEVO::COXThu Apr 26 1990 22:4551
I wrote a DCL command file to do this for any node.  The command file has 
comments that lead you through the setup for your own system.  Hope this helps.
$! Sethost.com						Tom Cox.
$! Command file to create a subprocess Decterm window.  
$! For VMS 5.3 (or higher) decWindows use.
$! Created  20-Mar-90 Tcox  
$! Modified 24-Mar-90 Tcox  Added node name parameter passing.
$! Modified 27-Mar-90 Tcox  Added process name appender.
$! Usage: 
$!    From DCL or the session manager execute this command file.  Pass as the
$!   P1 parameter the node name you wish to set host to.  The window icon and
$!   title will be given the node name with an underscore and integer appended
$!   starting at 1, which will form a unique process name.
$!    If you want the process to log into the remote node then place an 
$!   equivalent set of commands in your login.com similar to these:
$!!+------------------------------------------------------------------
$!!
$!!   $ if f$extract(0,6,process_name) .eqs. "COMET" 
$!!   $ then 
$!!   $ set host comet
$!!   username
$!!   password
$!!   $ logout
$!!   $ endif
$!!
$!!-------------------------------------------------------------------
$! Sethost.com
$!
$!   Force process name to be unique.
$ append_no = 0
$ save_process_name :="""''f$process()'"""
$ process_name :='p1'
$loop:
$ append_no = append_no + 1
$ if append_no .ne. 1 then process_name :='p1'_'append_no
$ on error then goto loop	!see if process already exists...by error. 
$ set process/name='process_name
$! no error, so fall through...otherwise goto loop and increment append_no
$ on error then exit		!reinstate error exit.
$ set process/name='save_process_name		  !restore sm process name.
$ create/terminal=Decterm                       - !create a terminal window
        /process='process_name			- !Decterm connection.
	/detach/logged				- !Detached/logged in.
	/application_keypad/insert		- !keyboard environment
	/little_font				- !display environment
	/nobroadcast				-
	/window_attribute=(			- !window
	 columns=80,				-
	 rows=40,				-
	 title='process_name', 			-
	 icon_name='process_name')
2328.8LATMASTER + DECserver emulator = Set Host menuHKOVC::TERENCEFrom Middlesex, UWOFri Apr 27 1990 05:144
    Install LATMASTER and use the DECserver emulator to set host/lat to the
    remote node.
    
    -Terry
2328.9Where is it?BEBE::GALLEGOSFri Apr 27 1990 14:174
Where is the LATMASTER located at? Is it available on the net?

Thanks,
Robert
2328.10TOOK::HKOVC::TERENCEFrom Middlesex, UWOMon Apr 30 1990 02:204
    Yes, it is available on the net. Check out conference TOOK::LATMASTER
    for detail.
    
    -Terry