[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

1513.0. "CREATE Secondary Ident fails -> Unknwn ARG" by UTES09::GOES (Paul Goes - T&N Digital Utrecht) Tue Sep 17 1991 11:01

Hi,

I'm facing a strange behaviour of DECmcc when 
issuing a CREATE directive for a home-brewed AM.

For short, my problem is the following:

I have two identifiers 'Pabx Name' (FULLNAME) 
and 'LAT Port Name' (LATIN1STRING).

I have defined a CREATE directive that has an
request argument LAT Port Name and want to do
the following in the CREATE-module (entry-point):

  - CREATE PABX .Pabx_Utrecht LAT Port Name = "LTA158"

  - The PABX instance will be placed in a private instance
    repository and the LAT Port Name will be added as
    an secondary identifier.

If I issue the CREATE directive the PM says that it
doesn't know the argument LAT (and not LAT Port Name)
without calling the AM (this was checked by defining 
the MCC_FCL_PM_LOG = 8).

Another strange thing is that in the MCC_PTB_PARSER.DAT
the CREATE directive is included in this way:
Command: CREATE PABX ATTRIBUTE VALUES
and not in this way:
Command: CREATE PABX LAT PORT NAME

My question is : 
 - How is this possible ?
 - Is this the result of the CREATE-directive being an
   ACTION-directive ?
 - Is there another way to define a CREATE directive
   that passes the secondary identifier as an argument ?
   (The LAT Port Name is an identifier that is not known
    to the entity itself so it must be passed)
 - Is it possible to define the following ? :
	DIRECTIVE CREATE ...
        REQUEST
		ARGUMENT Input Value = 1 : Latin1String
		    ...
		END ARGUMENT Input Value;
        END REQUEST
 - Am I missing something, someplace, somewhere ?


In the remainder (of this note) I have included the
.MS file and some screen dumps to illustrate my problem.


>>> extract of the management specification

    MANAGEMENT SPECIFICATION MCC_PABX_AM_SRVC_IF;
       VERSION = V1.1.0;
       SYMBOL-PREFIX = MCC_;


    (* Management Specification of global entity PABX *)

    GLOBAL ENTITY PABX = 59 :
       IDENTIFIER = ( Pabx Name, LAT Port Name ),
       SYMBOL = CLASS_PABX,

       IDENTIFIER ATTRIBUTES

	     ATTRIBUTE Pabx Name = 1 : FullName
                DNS_IDENT = PRIMARY_NAME,
		ACCESS = NONSETABLE,
		DISPLAY = TRUE,
		SYMBOL = PABX_ATTR_NAME
	     END ATTRIBUTE Pabx Id;

             ATTRIBUTE LAT Port Name = 2 : Latin1String
		DNS_IDENT = ALTERNATE_NAME,
		ACCESS = NONSETABLE,
		DISPLAY = TRUE,
		SYMBOL = PABX_ATTR_LAT
             END ATTRIBUTE LAT Port Name;

       END ATTRIBUTES; (* IDENTIFIER *)

       DIRECTIVE CREATE = 12 :
	  DIRECTIVE-TYPE = ACTION,
	  DISPLAY = TRUE,

          REQUEST
              ARGUMENT Attribute Values = 1 : Attrib_List
		 ECHO = TRUE,
		 DISPLAY = TRUE,
		 REQUIRED = TRUE,
		 DEFAULT = NO DEFAULT,
		 SYMBOL = PABX_CREATE_REQ_ARG1
              END ARGUMENT Attribute Values;
          END REQUEST;

	  RESPONSE Create Success = 1 :
	      SYMBOL = PABX_CREATE_SUCC,
	      TEXT = "Entity successfully created.",
	  END RESPONSE Create Success;

	  EXCEPTION Create Duplicate = 1 :
	     SYMBOL = PABX_CREATE_DUP,
	     TEXT = "Attempt to create duplicate entity rejected.",
	  END EXCEPTION Create Duplicate;

	  EXCEPTION Encode Errors = 2 :
	     SYMBOL = PABX_CREATE_ENC_ERR,
	     TEXT = "An error occurred while encoding the PABX package.",
	     ARGUMENT ILV Status = 17 : MCCError
		SYMBOL = PABX__CRE_ARG_ILV_STATUS
	     END ARGUMENT ILV Status;
	  END EXCEPTION Encode Errors;

       END DIRECTIVE CREATE;


>>> Screen dumps :

$ man /enter

MCC> create pabx .pabx_utrecht LAT Port Name = "LTA158"
%MCC-W-ARGUNKNOWN, unknown argument LAT

MCC> create pabx .pabx_utrecht Attribute Values = "LTA158"
%MCC-E-DATATYPE_NOT_SUP, data type is not supported



T.RTitleUserPersonal
Name
DateLines
1513.1A Create directive does not take an Attribute List as an ArgumentNANOVX::ROBERTSKeith Roberts - DECmcc Toolkit TeamTue Sep 17 1991 11:1551
RE: .0

>       DIRECTIVE CREATE = 12 :
>	  DIRECTIVE-TYPE = ACTION,
>	  DISPLAY = TRUE,
>
>          REQUEST
>              ARGUMENT Attribute Values = 1 : Attrib_List
>		 ECHO = TRUE,
>		 DISPLAY = TRUE,
>		 REQUIRED = TRUE,
>		 DEFAULT = NO DEFAULT,
>		 SYMBOL = PABX_CREATE_REQ_ARG1
>              END ARGUMENT Attribute Values;
>          END REQUEST;

The Create Directive does not take an Attribute List as an Argument.
You should make all new, seperate arguments for this directive.

Then, your AM must convert the argument codes to attribute codes
to store in your MIR.

This is what the Alarms FM must do on the Create Directive.

Also - When you issue the create directive:

>>      CREATE PABX .Pabx_Utrecht LAT Port Name = "LTA158"

                    ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
                          |                    |
                          |                    |
This is the Instance Identifier.      On a normal Create directive,
According to your MSL, it can be      This is an argument to the 
1 of 2 attributes:                    directive.  But you're trying
  o Pabx Name                         to make an attribute out of it.
  o LAT Port Name                     but you can't.


I think you're Identifiers are Ok

The Create Request argument need to be fixed - to list two arguments.
Based on the Id code of the Instance Identifier (.Pabx_Utrecht from
above), you can determine if the arguments passed are valid (ie, you
can't give 'Pabx Name' as the instance Identifier *AND* an argument).

Once you validate the the input argument are Ok, you can write your
data to the MIR.

Am I helping?

/keith
1513.2Two arguments-yes ! , two 'string'-identifiers- good or not ?UTES09::GOESPaul Goes - T&N Digital UtrechtThu Sep 19 1991 06:2995
Keith, thanks for your reply,

.1> On a normal Create directive, This is an argument to the directive.
    But you're trying to make an attribute out of it. But you can't.

We can of course (with DECmcc everything is possible ?):

We have defined our argument in the following way:

       DIRECTIVE CREATE = 12 :
	  DIRECTIVE-TYPE = ACTION,
	  DISPLAY = TRUE,

          REQUEST
              ARGUMENT LAT Port Name = 1 : Latin1String
		 ECHO = TRUE,
		 DISPLAY = TRUE,
		 REQUIRED = TRUE,
		 DEFAULT = NO DEFAULT,
		 SYMBOL = PABX_CREATE_REQ_ARG1
              END ARGUMENT LAT Port Name;
          END REQUEST;

On the Create directive:

MCC> create pabx .pabx_utrecht LAT Port Name = "LTA158"

- we read the passed class and instance pair (in in_entity) and place
  this instance in the private MIR (primary identifier).
- we read the passed argument (in in_p) and place that value as a
  secondary identifier in the private MIR.

In the MIR we have now Pabx Name (FullName) and LAT Port Name (Latin1String) as
two identifiers for every instance that is created.

We built this Create directive and it works now.

The Create directive is restricted in this way that you must specify always:

MCC> create pabx <Pabx Name> Lat Port Name = "<LAT Port Name>"

It is not possible to exchange <Pabx Name> and <LAT Port Name>, but this
is ok for us.


But now the next question :

If we change the Create Request to list two arguments, in the following way:

      DIRECTIVE CREATE = 12 :
	  DIRECTIVE-TYPE = ACTION,
	  DISPLAY = TRUE,

          REQUEST
              ARGUMENT Pabx Name = 1 : Latin1String
		 ECHO = TRUE,
		 DISPLAY = TRUE,
		 REQUIRED = FALSE,
		 DEFAULT = NO DEFAULT,
		 SYMBOL = PABX_CREATE_REQ_ARG1
              END ARGUMENT Pabx Name;

              ARGUMENT LAT Port Name = 2 : Latin1String
		 ECHO = TRUE,
		 DISPLAY = TRUE,
		 REQUIRED = FALSE,
		 DEFAULT = NO DEFAULT,
		 SYMBOL = PABX_CREATE_REQ_ARG1
              END ARGUMENT LAT Port Name;
          END REQUEST;

( Note that Required must be false because one of the arguments must be passed.)

In theory we are now able to issue the following directives:

MCC> create pabx .pabx_utrecht LAT Port Name = LTA158
MCC> create pabx LTA158 Pabx Name = .pabx_utrecht

This would be very nice, but now another problem :

In (another theory) it is also possible to issue the following directives:

MCC> create pabx LTA158 LAT Port Name = .pabx_utrecht
MCC> create pabx .pabx_utrecht Pabx Name = LTA158

if we issue the following show directives :

MCC> show pabx .pabx_utrecht all ident
MCC> show pabx LTA158 all ident

what datatype for the instance does the PM pass ?, does it transform it to
the primary name (by default) ?, does it check for the '.' ? Or is this all
PM dependent and are we in a danger zone ?

Regards Paul and Henk
1513.3additional info to reply .2UTES09::GOESPaul Goes - T&amp;N Digital UtrechtThu Sep 19 1991 09:0041
After some reading and internal discussions we found the following:

SRM (V1.1) Page 127 :

>> The user-visible representations of the data types of any identifier must be
>> distinguishable from the types of all other identifiers for an entity class.

For identifiers Latin1String and FullName this is not the case.

In note 653 is stated (to my understanding) that if the entity-definition in 
the MS is constructed in this way:

     GLOBAL ENTITY ...
	  ....
	  IDENTIFIER = ( <FullName-identifier>, <Latin1String-identifier> )
	  ....
     END ENTITY ...

that the instance specified in the SHOW-directive will always be passed (to the
Access Module) as being a FullName (because the PM cannot distinguish the data
type, it passes the identifier as the FullName).

Is this true for every PM or is this (to our opinion) PM dependent ?

What happens if the entity-definition in the MS is constructed in this way:

     GLOBAL ENTITY ...
	  ....
	  IDENTIFIER = ( <FullName-identifier> )
	  ....
	  <identifier-description FullName-identifier>
	  <identifier-description Latin1String-identifier>
	  ....
     END ENTITY ...

- Does the MSL-translator crash on this ?
- On a Show Ident directive: must the AM supply both identifiers or
  only the FullName identifier (does the PM display both or only the 
  FullName identifier ?) ?

Regards Paul and Henk
1513.4order specified in MSLTOOK::HAOThu Sep 19 1991 13:137
    FCL parses the instance name in the order of the identifiers listed
    in the MSL.  Since you list fullname first, it will try to match the
    identifier as a fullname.  Unfortunately, in your case, the
    latin1string identifier will match as a fullname, as you've noticed.
    
    Christine