[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

2917.0. "External Applications hookup problems" by SUBWAY::REILLY (Mike Reilly - New York Bank District) Fri May 01 1992 19:03

    I have added a Telnet command to the Applications pulldown, and have 
    used the <DF> option to create a mcc_launched_xxxx.dat file. If the
    SNMP entity is displayed on the map with it's fullname then the data
    file is created correctly. If the entity is displayed with an
    alternate name then a message box with the message:
    
    'no corresponding entity instance exists' appears.  The datafile
    produced in this case is empty.
    
    Does the application launching facility work with identifiers other
    than fullnames?
    
    
    Another idea..
    
    The file created by the launch application has a unique name which
    is determined by the time-stamp.  This file name should also include
    the process id of the user who invoked the application, as many
    iconic map users may be using the same directory, and there will be
    no way to distinguish which user invoked the application.
     
    Why does it take so long to invoke the external applications?  The data file
    is created really fast, but there is a long delay before the dxterm
    window appears.  dxterm on it's own also starts up really fast.
    
    
    BTW: this ability to hook up to external applications will be a much
    used feature, as it provides a very easy way for third party
    vendors to hook up to DECmcc. I'm glad this feature made it into
    1.2.
    
    - Mike
    
    
T.RTitleUserPersonal
Name
DateLines
2917.1Need more infoBARREL::LEMMONMon May 04 1992 12:4949
    > I have added a Telnet command to the Applications pulldown, and have 
    > used the <DF> option to create a mcc_launched_xxxx.dat file. If the
    > SNMP entity is displayed on the map with it's fullname then the data
    > file is created correctly. If the entity is displayed with an
    > alternate name then a message box with the message:
    > 
    > 'no corresponding entity instance exists' appears.  The datafile
    > produced in this case is empty.
    > 
    > Does the application launching facility work with identifiers other
    > than fullnames?
        
    	Yes it does and it was tested against node4 and snmp.  Are the
    entities selected fully registered?  If not, try fully registering
    them to see if it can be launched.   It shouldn't matter though. 
    
    > Another idea..
    > 
    > The file created by the launch application has a unique name which
    > is determined by the time-stamp.  This file name should also include
    > the process id of the user who invoked the application, as many
    > iconic map users may be using the same directory, and there will be
    > no way to distinguish which user invoked the application.
    
    	This shouldn't be a problem unless the two users issue the launch 
    at the EXACT same time, right down to the second.  I do not think this
    will happen that often. ( I am assuming you are concerned about
    collisions.  That is two different users accessing the same file.)    
    
    > Why does it take so long to invoke the external applications?  The data file
    > is created really fast, but there is a long delay before the dxterm
    > window appears.  dxterm on it's own also starts up really fast.
    
    	The iconic map does a SPAWN/WAIT "execute command specified".  In
    your case it is doing a CREATE/TERM.   The delay is not in DECmcc.  It
    is in the CREATE/TERM command.  Try issuing the same command from the 
    command line.  You will notice it takes just as long to start up.
    
    
    > BTW: this ability to hook up to external applications will be a much
    > used feature, as it provides a very easy way for third party
    > vendors to hook up to DECmcc. I'm glad this feature made it into
    > 1.2.
    
    	Glad you like it!
    
	/Jim    
    
    
2917.2exitSUBWAY::REILLYMike Reilly - New York Bank DistrictMon May 04 1992 16:4069
    >> Does the application launching facility work with identifiers other
    >> than fullnames?
        
    >	Yes it does and it was tested against node4 and snmp.  Are the
    > entities selected fully registered?  If not, try fully registering
    > them to see if it can be launched.   It shouldn't matter though. 
    
    
    Via the FCL I find that the entities are registered twice, I guess
    the autoconfig utility managed to register them a second time!!!.
    
    MCC> dir snmp .ip.newr02-e0-ny-jpmorgan-com
    
    SNMP JPM_DEV:.ip.newr02-e0-ny-jpmorgan-com
    AT 1992-05-04-11:44:40.971
    
    Directory successful.
                      Registered Name = JPM_DEV:.ip.newr02-e0-ny-jpmorgan-com
                              Address = 146.149.1.101
                                 Name = newr02-e0.ny.jpmorgan.com 
    MCC> dir snmp .ip.NEWR02-e0
    
    SNMP JPM_DEV:.ip.NEWR02-e0
    AT 1992-05-04-11:44:44.565
    
    Directory successful.
                      Registered Name = JPM_DEV:.ip.NEWR02-e0
                                 Name = NEWR02-e0
                              Address = 146.149.1.101
    MCC>
    
	When the aplication is launched against the newr02-e0.ny.jpmorgan.com 
    entity it works correctly. When launched against the NEWR02-e0
    entity it failed.  
    
    -------------------------------------------------------------------------
    
    In regard to the file naming convention, I don't think that a
    time stamp on it's own will work. If I invoke an application it
    could take up to 60 seconds before the application gets to read the
    data file, by that time there could be other data files in the
    directory ( created by other users ).  How would I know which 
    data file was mine? 
    
    I have also noticed that the timestamp field in the filename is not
    fixed in lengh. If there is a leading zero in any part of the
    time-stamp then the zero is removed.
    
    Eg 		time 11:45:30 becomes	mcc_launched_114530.dat
    while            11:12:03 becomes   mcc_launched_11123.dat
    and		     11:01:23 becomes   mcc_launched_11123.dat
    
    I vote for leaving the zeros in the filename, as it will make my
    shell scripts much easier ;-). I bet there are many time combinations
    which would cause the data file to be overwritten. 
     
    ---------------------------------------------------------------------
    
    With regard to the time delay before an application starts up there
    appears to be a problem somewhere in the DECmcc system. I am testing
    this on Ultrix where a 'dxterm -e manage' will create a FCL window
    in about 3-8 seconds while an FCL invocation via the iconic map take
    over 45 seconds every time. I can understand why there would be a
    long delay in VMS where process creation is a resource hog, but
    there should not be a similar delay on a Unix system.
    
    
    - Mike
     
2917.3BARREL::LEMMONTue May 05 1992 17:0451
    
    >Via the FCL I find that the entities are registered twice, I guess
    >the autoconfig utility managed to register them a second time!!!.
    
     I will see if I can reproduce the problem here.
     
    
    >In regard to the file naming convention, I don't think that a
    >time stamp on it's own will work. If I invoke an application it
    >could take up to 60 seconds before the application gets to read the
    >data file, by that time there could be other data files in the
    >directory ( created by other users ).  How would I know which 
    >data file was mine?
    
    The file name must be unique.  A user can, for example, select entity A,
    launch application FOO then quickly select entity B and launch 
    application BAR.  In this case there will be two data files 
    created,  mcc_launched_<t1>.dat and mcc_launched_<t2>.dat where
    t1 and t2 are the timestamps of when the application was launched.
    
    The file name created is actually passed to the application via the
    command line.  The <DF> in your command line is replaced with the
    file name.   If your application doesn't expect the file name 
    generated, you can write a shell script or com file to rename it
    to what it expects and then run the application.
    
    
    
    >I have also noticed that the timestamp field in the filename is not
    >fixed in lengh. If there is a leading zero in any part of the
    >time-stamp then the zero is removed.
    >
    >I vote for leaving the zeros in the filename, as it will make my
    >shell scripts much easier ;-). I bet there are many time combinations
    >which would cause the data file to be overwritten. 
    
    I agree and am looking into this. 
     
    >With regard to the time delay before an application starts up there
    >appears to be a problem somewhere in the DECmcc system. I am testing
    >this on Ultrix where a 'dxterm -e manage' will create a FCL window
    >in about 3-8 seconds while an FCL invocation via the iconic map take
    >over 45 seconds every time. I can understand why there would be a
    >long delay in VMS where process creation is a resource hog, but
    >there should not be a similar delay on a Unix system.
    
    Hmm.  It should be about the same.  Was the iconic map running (hence
    sucking up system resources) when you ran this test?
    
    /Jim     
    
2917.4SUBWAY::REILLYMike Reilly - New York Bank DistrictTue May 05 1992 17:3723
    >The file name created is actually passed to the application via the
    >command line.  The <DF> in your command line is replaced with the
    >file name.   If your application doesn't expect the file name 
    >generated, you can write a shell script or com file to rename it
    >to what it expects and then run the application.
    
    I hadn't realized that the file name was passed to the invoked
    application. I guess this eliminates my concerns with regard to
    multiple users. Maybe the information in the 'Use' guide should be
    expanded a little as it doesn't explicitly say that the data file
    name is passed.
    
    
    Re: Application invocation delays.
    
    It may be something to do with the setup of my workstation.
    
    Could somebody else who is running 1.2.7 on Ultrix try invoking the
    FCL via the pulldown, and enter dxterm - e manage from the command
    and see which gets you into the FCL first?
    
    _ Mike
      
2917.5need more infoZUR01::FUEGLISTERRoland Fueglister, 760-2498Thu May 14 1992 18:5712
				Hi,

I would like to click on a snmp entity and launch a telnet command to that
snmp host from the application window. But until now I couldn't figure
out, how to do that.
The information in the DECmcc Use Guide about using the <DF> possibility is not
very useful.
Can sombody give an example how to do it?

Any help will be appreciated.

			Regards, Roland
2917.6See if this works for you.SUBWAY::REILLYMike Reilly - New York Bank DistrictThu May 14 1992 20:0864
    Roland,	

    	I got it to work with the following lines in my mcc_resource.dat
    file.
    
    mcc_pml.applications:   DECmcc Command Line (FCL),DECmcc IP
    Autoconfiguration, DECmcc DECnet Phase IV Autoconfiguration,
    DECmcc Reports,Telnet
    
    The above text is all on one line in the file.
    
    and
    
    mcc_pml.applications.Telnet.vms_command: CREATE/TERM/WAIT/WINDOW_ATTRIBUTES=
    (TITLE =\"Telnet\",ICON_NAME=\"Telnet\") 
    @mcc_common:mcc_telnet.com <DF>
    
    The above lines are also all on one line in the file.
    
    In MCC_COMMON: I have the following command file.

    
$ set nover
$!---
$!              MCC_TELNET.COM
$!              ==============
$!      Date:   12-May-1992
$!      By:     Mike Reilly
$!      Desc:   Procedure called by DECmcc applications menu, to invoke Telnet
$!              Parameter P1 is a the data file passed by DECmcc.
$!              This procedure will not work if multiple IP entities are
$!              selected at the same time.
$!              Error checking will be added a few minutes after the error
$!              occurs.
$!---
$!
$ open in_file 'p1
$ read_loop1:
$ read/end=not_found in_file in_line
$ ! Look for an SNMP entity description
$ if f$locate("SENTITY: SNMP",in_line) .eq. f$length(in_line) then -
                                                        $ goto read_loop1
$ ip_address = f$element(1,",",in_line) !Extract the IP address of the entity
$ write sys$output "Attempting to connect to IP host at address ''ip_address'"
$ assign/user sys$command sys$input
$ telnet 'ip_address
$ goto all_done
$not_found:
$ close in_file
$ write sys$output "Did not locate any IP address in the request"
$ wait 00:01
$ delete 'p1
$ exit
$all_done:
$ close in_file
$ delete 'p1;0
$ exit


I hopes this helps. I still have not get around to writing a shell
script for Ultrix, but I have seen DECmcc produce the datafile. 

- Mike

2917.7Telnet worksZUR01::FUEGLISTERRoland Fueglister, 760-2498Fri May 22 1992 10:1712
				Hi Mike,


Your command procedure works fine. Your script was excactly what I was looking 
for.
This feature will help us in selling DECmcc.


				Best Regards,


				Roland
2917.8Telnet to other systems from UltrixSUBWAY::REILLYMike Reilly - New York Bank DistrictFri May 22 1992 20:1842
    Glad to see the Telnet application worked.

    Here are the commands I used to get this to work from DECmcc Ultrix:
    

    In my mcc_resource.dat I added the line:

    mcc_pml.applications.Telnet.ultrix_command: /usr/bin/dxterm -customization
     DXterm.title:"Telnet" -e /usr/mcc/mcc_system/mcc_telnet.sh <DF>
    
    This is all one line.
    
    The mcc.pml.applications line was modified to include a text string
    for 'Telnet'.

    Also in /usr/mcc/mcc_system/mcc_telnet_sh I have the following shell script.
    

#!/bin/sh
#
#       MCC_TELNET.SH
#       =============
#       By:     Mike Reilly, Steve Degler DEC
#       Date:   20-May-1992
#       Desc:
#               Shell Script which allows Telnet sessions from MCC Ultrix.
#       Does not support multiple entities being selected in a domain.
#       $1 is a file passed by DECmcc to this script.
#
address=`awk '/SENTITY/ { print $6 }' $1`
echo connecting to $address
if [ -z "$address" ]
then
echo "No IP address found for entity selected"
rm $1
exit
sleep 5
fi
telnet $address
rm $1

         
2917.9nice to see people using the launch interfaceTOOK::FLETCHERTue Jun 16 1992 17:3813
Both scripts look fine for Fully registered entities.
However, entities that are partially registered (i.e.
entities that the could not be "talked to" upon
registration) they will not work.  

The only information available to from partially 
registered enitities is the registered name which
is fullname.  

Question:  Have you tried re-registering the entity?
	what is the outcome?

Robin
2917.10Please include TELNET Launch as a standard MCC featureCUJO::HILLDan Hill-Net.Mgt.-Customer ResidentFri Jun 19 1992 17:147
    HP OpenView provides TELNET as a standard feature under the Control
    pull-down menu.  My customer really likes this.  Please include it as a
    standard feature in a future release of DECmcc.
    
    Thanks,
    Dan
    
2917.11modified mcc_telnet.comZUR01::FUEGLISTERRoland Fueglister, 760-2498Mon Jun 22 1992 09:5442
					Hi,


The script from .6 does not work, if the SNMP entity has no registered IP name.
Below you will find a modified version, which addresses also this case.

				Regards, Roland




$!		MCC_COMMON:MCC_TELNET.COM
$!
$!procedure called by DECmcc application menu, to invoke Telnet 
$!parameter p1 is the file mcc_launched_xxxxxx.dat
$!
$!
$!
$ open in_file 'p1
$ read_loop1:
$ read/end=not_found in_file in_line
$!look for an SNMP entity description
$ if f$locate("SENTITY: SNMP",in_line) .eq. f$length(in_line) then -
                                                        $ goto read_loop1

$ ip_address = f$element(1,",",in_line) !extract the IP address of the entity
$ ip_address = f$edit(ip_address,"COLLAPSE") ! remove all spaces or tabs
$!if the IP name is missing in the record, remove the trailing parenthese 
$ if f$locate(")", ip_address) .ne. f$length(ip_address) then -
		$ ip_address = f$extract(0,f$length(ip_address)-1,ip_address)
$ close in_file
$ delete 'p1;0
$ write sys$output "Attempting to connect to IP host at address ''ip_address'"
$ assign/user sys$command sys$input
$ telnet 'ip_address
$ exit
$ not_found:
$ close in_file
$ delete 'p1;0
$ write sys$output "Did not locate any IP address in the request"
$ wait 00:01
$ exit