[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

2151.0. "Problems running applications from a 2nd DECterm?" by CREDIT::BNELSON (Caribbean Dreamin'....) Fri Jan 26 1990 15:09

    Hi,


    	I'm having some problems since we upgraded to V5.3 and DW V2.  I
    used to create DECterms and applications by submitting command
    procedures to batch queues on the nodes I wished to run them.  These
    command procedures used CHILD.  Well, I thought I would upgrade the
    procedure that creates DECterms to use CREATE/TERM, since that is the
    "supported" method.  Everything goes fine, the windows get created, and
    the log files are errorless.


    	However, I've noticed some peculiar behaviour -- if I create a
    second DECterm on any node, be it my workstation or a node in our main
    cluster -- I can't run any DECwindows applications from it.  At first I
    thought it might just be some of the programs I've picked up off the
    net, but it turns out no DECwindows application can open the display.
    The first DECterm created works fine, this only happens with the 2nd.
    For some reason, the call to XOpenDisplay is failing (I'm not a
    DECwindows programmer).


    	Has anyone else seen this?  Is there anything I can do about it?
    Both terms are created using the exact same procedure.  I've done a
    SHOW LOG DECW$*, and both appear to be the same.  Below find the
    commands I use in my com file:


$	SET DISPLAY/CREATE'extra_switch'
$	CREATE/TERM=DECTERM/DETACH/WINDOW_ATTRIBUTES=( -
                                   ROWS = 48, -
                                   COLUMNS = 80, -
                                   TITLE = "''node' - Session ''session'", -
                                   ICON_NAME = "''node':''session'", -
                                   X_POSITION = 'horizontal', -
                                   Y_POSITION = 'vertical', -
                                   INITIAL_STATE = ICON ) -
             /RESOURCE_FILE='my_disk'['my_username'.DECW]DECW$TERMINAL_DEFAULT.DAT


    	EXTRA_SWITCH is either /TRANSPORT=LOCAL or /NODE=DURNIK, depending
    on whether it's a remote or local session.


    	<Sigh>.  I also notice that there is now no way in V2 to place the
    icons where you want them.  I think I'm wearing the legs off of my
    mouse.  ;-)


    Brian

T.RTitleUserPersonal
Name
DateLines
2151.1SMAUG::MENDELI don&#039;t want to burn in Paradise!Fri Jan 26 1990 16:4320
    I think I had this same problem.

    What you need to do is execute a SET DISP/CREATE in, how shall I say it,
    the *new* process - the one who's terminal is the new DECTERM window.

    I put this in my login.com from the accounts I create/term from:

    $ if f$loc("TWA",f$trnlnm("TT")) .lt. 3
    $ then
    $     ! 
    $     ! In a DECterm window
    $     ! 
    $     SET DISPLAY/CREATE
    $     SET TERMINAL/PAGE=40  
    $     icon_name = f$trnlnm("SYS$NODE") - "_" - "::" + "  " + f$proc()
    $     window_name = icon_name + "  ""I don't want to burn in Paradise!"" "
    $     say escape,"]O21;",window_name,escape,"\"
    $     say escape,"]O2L;",icon_name,escape,"\"
    $  
    $ endif ! DECterm
2151.2And with just a bit more twiddling....QUILL::BNELSONCaribbean Dreamin&#039;....Mon Jan 29 1990 11:517
That fixes it for DECterms created on the workstation itself; for DECterms
created on the main nodes of my cluster, you need to add the /NODE=
<workstation> qualifier to the SET DISPLAY/CREATE command.


Brian
2151.3SMAUG::MENDELI don&#039;t want to burn in Paradise!Mon Jan 29 1990 13:0318
    Ouch! Maybe your right. But this is weird.

    For some reason, SET DISP/CREATE is good enough to run MOPS, which
    is all I needed. 

    Anyway, to now fix *my* login .com, is there any logical name or
    symbol that points to the node that the display is on? Then, I can do
    a 

	$ SET DISPLAY/CREATE/NODE=''f$trnlnm("logical_name")'
	
    or
	
	$ SET DISPLAY/CREATE/NODE=''symbol_name'

    So that I can automatically do what *should* automatically be done ...

    Kevin
2151.4I don't know an easy wayQUILL::BNELSONCaribbean Dreamin&#039;....Tue Jan 30 1990 13:3419
I figure I won't (I hope) be changing workstations too often, so I simply
hardcoded the name of my workstation in.

The closest I could come to what you'd need (and personally, I'd prefer
not to have the hardcoded version too!) is the DCL command SHOW DISPLAY.
What you *could* do is do this command and specify some tmp file as
SYS$OUTPUT, and parse it to find out the info you need.  Problem is that's
a lot of work for little return, and what if VMS decides to change how
it looks in future verions (which they have been known to do)?  You have
to go and rework that code.

Hopefully they will put in something in VMS sometime soon that will allow
DCL programs to get this info through a symbol or logical or lexical.



Brian

2151.5AITG::DERAMODan D&#039;Eramo, nice personTue Jan 30 1990 19:0536
	If the display device has already been set, then you do not
	need to capture and parse the output of the SHOW DISPLAY
	command.  Instead use the undocumented [?] qualifier /symbols
	to have the parameters of the display device assigned to
	DCL symbols.  See the example below.

	However, the problem .0 and .3 mentioned was that the display
	device wasn't set [except for the first created DECterm process]
	and he needs to know what to use in the set display command.

	Dan

$! Example use of show display/symbols
$ spawn/nosymbols
%DCL-S-SPAWNED, process DERAMO_1 spawned
%DCL-S-ATTACHED, terminal now attached to process DERAMO_1
$ show symbol *
  $RESTART == "FALSE"
  $SEVERITY == ""
  $STATUS == ""
$ show display/symbols

    Device:    WSA1:  [exec]
    Node:      0
    Transport: LOCAL
    Server:    0
    Screen:    0

$ show symbol *
  $RESTART == "FALSE"
  $SEVERITY == "1"
  $STATUS == "%X00000001"
  DECW$DISPLAY_NODE == "0"
  DECW$DISPLAY_SCREEN == "0"
  DECW$DISPLAY_SERVER == "0"
  DECW$DISPLAY_TRANSPORT == "LOCAL"
2151.6SMAUG::MENDELI don&#039;t want to burn in Paradise!Wed Jan 31 1990 13:199
	Yes, this is chasing your tail. SHOW DISPLAY doesn't have the node
	name yet, because we're trying to figure out what it is in order to
	SET DISPLAY!

	It would sure be nice if there was *some* hook, *somewhere* ...

	If there were a way to go, having the WSA unit number...

	Kevin