[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

3482.0. "symbols <> partialstrings" by BRAT::BUKOWSKI () Fri Jul 31 1992 15:28

Hello,
	It seems as though MCC doesn't allow symbols to work like I need.
	Is there any way I can accomplish the following?

	Mike



MCC> define b  BRIDGE .bridge
%MCC-I-SYMDEF, Symbol defined.
MCC> DISPLAY SYMBOLS
                            Symbol Name   Symbol Value
                            -----------   ------------
                                      B : BRIDGE .bridge

MCC> SHOW B .MKO1_9702 ALL CHAR
%MCC-I-NOPARCMD, .MKO1_9702 ALL CHAR
                 ^
%MCC-I-SYNTAXERR, Syntax error -- unable to interpret remainder of line
%MCC-W-ATTRSYNTAX, syntax error in attribute .

MCC> SHOW B.MKO1_9702 ALL CHAR
%MCC-I-NOPARCMD, B.MKO1_9702 ALL CHAR
                 ^
%MCC-I-SYNTAXERR, Syntax error -- unable to interpret remainder of line
%MCC-W-CLASSSYNTAX, syntax error in entity: .

MCC>

T.RTitleUserPersonal
Name
DateLines
3482.1TOOK::DUGALLisa-MarieMon Aug 03 1992 13:0613
Hi Mike,

I think what you wanted to do was the following:

MCC> define b BRIDGE             (you don't need the .bridge on the symbol)
MCC> DISPLAY SYMBOLS
                            Symbol Name   Symbol Value
                            -----------   ------------
                                      B : BRIDGE 

MCC> SHOW B .MKO1_9702 ALL CHAR


3482.2maybe we need special charactersBRAT::BUKOWSKIMon Aug 03 1992 14:3718
    RE. -1
    
       My first note must have been confusing.  What I am trying to do is
    create a symbol so I may substitute the entity class and dns directory
    in which I would like to register the entity.  You see; I will be having
    a dozen or so first level hotline folks using this to provide first
    level troubleshooting and I need to keep it simple.   It is tedious
    typing "SHOW BRIDGE .MKO.BRIDGE.MKO2_9045 ALL CHAR".  I Would rather
    tell the folks that all they have to remember is to type 
    "SHOW B.MKO2_9045 ALL CHAR".  The problem is the substitution for
    symbol "b" is never translated because MCC interperets it as a DNS 
    directory.  Could a special character be added into MCC so that it
    could recognize that a symbol follows the special character within a 
    directive?  Just like the "'" in DCL.  Hence "SHOW 'B.MKO2_9045 ALL
    CHAR".
    
    MKO Network Management,
    Mike
3482.3symbol substitution can't be done on partial stringsMCC1::DITMARSPeteWed Aug 05 1992 19:4868
Sorry, FCL is only going to try to do symbol substitution on what it thinks of 
as a token.  Token delimiters include whitespace (tabs & spaces) and
commas.  Because your symbol "B" is only part of a token (a partial 
string, like you said in the topic title), FCL isn't going to find it 
in the symbol table.

>    directory.  Could a special character be added into MCC so that it
>    could recognize that a symbol follows the special character within a 
>    directive?  Just like the "'" in DCL.  Hence "SHOW 'B.MKO2_9045 ALL
>    CHAR".

Not a bad idea.  However, in FCL you'd find that the actual syntax
would have to be something like "SHOW 'B'.MK02_9045 ALL CHAR" because
you want the symbol "B" to be expanded and then have the string 
".MK02_9045" appended to it.  Same is true in DCL, except in DCL "."
is already treated as a token delimiter.

There've been several suggestions to address this particular issue, e.g.
establishing a "default" DNS directory to use.  I can't promise anything 
about which, if any, of the solutions to this problem will be implemented
in future versions of FCL.  Extending FCL's syntax, which is supposed to
track NCL's syntax, and which is already much maligned, doesn't strike me
as an especially likely probability for V1.3, given the relative priority
and ROI of such functionality.

In the mean time, you could define symbols for each of the bridges, e.g.

MCC> define b9045 bridge .MKO.BRIDGE.MKO2_9045
MCC> show b9045 ALL CHAR

I know this seems to entail more work on your part, but you could easily
set up DCL command scripts that build the symbol definition file
automatically based on the current MCC configuration and then run this 
DCL script periodically to rebuild the symbol definition script and keep
it up to date.  Also, "b9045" is easier to type than 'B.MK02_9045, so
your target audience might even be happier (and more successful).

An issue raised by this is that having a large number of symbols defined 
can slow FCL's parsing down.  How many symbols resulting in what kind of
a slow down is entirely configuration dependent.  I've never tested this,
but I'd assume you could safely define hundreds or maybe thousands of 
symbols before you'd see any real impact.

Another raised by this is that FCL prints out a message every time
a symbol is defined.  This can be annoying if the symbols are defined in
the MCC_INIT file and are seldom used.  So maybe you'd define only a
few symbols in the user's MCC_INIT file, which in turn invoke the symbol 
definition file when needed.

For example:

MCC_INIT.COM:

define bridges do sys$Login:define_mcc_bridges.com
define nodes do sys$login:define_mcc_nodes.com

DEFINE_MCC_BRIDGES.COM:

define b9045 bridge .MKO.BRIDGE.MKO2_9045
define b9046 bridge .MKO.BRIDGE.MKO2_9046
:


Then, the user would do the following before trying to talk to bridges:

MCC> bridges
(many symbol definition messages go scrolling by)
MCC> show b9045 ALL CHAR