[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

5960.0. "MCC_S_INV_ENTITY when discover dictionary" by ZPOVC::SINSPS () Mon Apr 25 1994 05:12

    Hi, my customer wish to discover the dictionary code for an object by
    passing its class name as a string. 
    
    He tried to use the mcc_dict_translate_name_code, but with no success. 
    
    As this routine requires an argument of type DICTIONARY AES which is not 
    clearly defined, he tried to create such an argument using the 
    MCC_AES_CREATE routine, with a type of MCC_K_DICT_CLASS a wild card value 
    of MCC_ASE_NOT_WILD and an instance descriptor of type LATIN1STRING
    containing the class name eg. "NODE4".  
    
    However the translation routine returns an error code MCC_S_INV_ENTITY 
    (52876218).
    
    Please advise what he should do in order to discover the dictionary
    class code when he has the class name.
    
    Thanks.
    
    - LEH 
T.RTitleUserPersonal
Name
DateLines
5960.1Any advice, anyone ?ZPOVC::SINSPSWed Apr 27 1994 02:171
    
5960.2DAPSCCA::daveAhh, but fortunately, I have the key to escape reality.Wed Apr 27 1994 13:593
Just use DAP, as the codes are not allowed to be changed
after they are registered.

5960.3more details, please ?ZPOVC::SINSPSThu Apr 28 1994 06:188
    re .2
    
    Hi, could you please explain more details as I'm not too familiar with 
    this product.
    
    Thanks.
    
    - LEH
5960.4manage/tools/dictionaryAZUR::ANTEUNISThere's no software like dead softwareThu May 05 1994 09:5235
$ manage/tools/dictionary
%DAP-S-USE_DICT_RDONLY, Using dictionary file: sys$common:[mcc]mcc_fdictionary.d
at;1, with read-only access


        POLYCENTER Dictionary Administrator Program   Version V1.3.0

DAP>show class node4

-> Class (1) : NODE4
     Definition (3) : PRESENTATION_NAME
     Definition (3) : INSTANCE_REQUIRED
     Definition (3) : DYNAMIC
     Definition (3) : INSTANCE_DATATYPE
     Subclass (2) : LINE 3
     Subclass (2) : REMOTENODE 10
     Subclass (2) : CIRCUIT 11
     Subclass (2) : LINK 17
     Subclass (2) : OBJECT 18
     Subclass (2) : AREA 26
	:
	:
	:     
Your information is here....V
                            V
     Subclass (2) : CIRCUIT 11

Don't forget that 11 is only unique ins the subclass level of NODE4
Don't forget that Your customer should use symbolic constants, which can be
found in .H files of the developer's toolkit. Not doing so will cause serious
risks when the dictionary will get updated.

The main use is and should stay the interpretation or ILV or AES dumps.

Dirk
5960.5code availableZPOVC::SINSPSTue May 10 1994 08:2878
Hi, the following code attempts to make use of the mcc_dict_translate_name_code
routine to read from the dictionary an object's class code by giving the name
as a LATIN1STRING.

/*
 * Now lets find out which class we are dealing with
 */

object_len = strlen (input->object);

  if (status == MCC_S_NORMAL)
    status = mcc_desframe_create_descriptor(
	&memory,			/*  Memory Allocation List  */
	&object_code,			/*  Descriptor Pointer	    */
	&object_len,			/*  Length		    */
	&MCC_K_DT_LATIN1STRING,		/*  Datatype		    */
	&input->object,			/*  object class name string*/
	&MCC_K_DICT_CLASS,		/*  Id			    */
	&DSC_K_DTYPE_T);		/*  VMS datatype	    */

if (status == MCC_S_NORMAL)
     status = mcc_desframe_create_descriptor(
	&memory,			/*  Memory Allocation List  */
	&class_code,			/*  Descriptor Pointer	    */
	&32,				/*  Length		    */
	0,
	0,
	0,
	0);

/*
 * create an AES structure containing the object name
 * use this structure to read the object code from the dictionary
 */

if (status == MCC_S_NORMAL)
	status = mcc_aes_create(&aes_struct,
			&MCC_K_DICT_CLASS,
			object_code,
			&MCC_K_AES_NOT_WILD);

/* Start of debugging code */

if (status == MCC_S_NORMAL)
	status = mcc_aes_depth(&aes_struct,&depth);

if (status == MCC_S_NORMAL)
	status = mcc_aes_get(&aes_struct,
			     &0,
			     &code,
			     class_code,
			     &wild);

/* End of debugging code */


/* Can I use an AES structure directly or must it be converted ? Try both ...*/

 if (status == MCC_S_NORMAL)
	status = mcc_dict_build_spec(&aes_struct,
	&aes_dict_struct);

/* results in error message ... MCC_S_INV_ENTITY */


  if (status == MCC_S_NORMAL)
    status = mcc_dict_translate_name_code(&aes_struct,&class_code);

/*
 *  if we omit the mcc_dict_build_spec call this results in the same error
 *  message ... MCC_S_INV_ENTITY
 */

/* Can not use this one as the mcc_dict_build code fails ... */
  if (status == MCC_S_NORMAL)
    status = mcc_dict_translate_name_code(&aes_dict_struct,&class_code);

    
5960.6case sensitive based on presentation nameMSBCS::CALLANDERWed Jun 01 1994 12:2724
    you have the right idea, bu tplease note that the tranlation of name 
    to code is based on the presentation name:
    
    
    DAP> sho class node4 definition presentation_name
    
       Definition Name = PRESENTATION_NAME
       Type = T   Length = 5   Count = 1   Defined = TRUE   Class = S
       value[1] = "Node4"
    
    DAP> exit
    
    So if you are setting the instance to "NODE4" it will not find a match.
    I haven't coded this stuff in a while but try using "Node4" and see
    if that corrects your problem.
    
    But as Dave mentioned, you really should just be using the codes
    directly (Ex: 12 for Node4).  The easiest way to create a dictionary
    specification is to create a regular AES specification with class code
    12 (node4) and instance wild.  Then use the create dict spec procedure
    to translate a regular (class instance) aes into a dictionary spec
    (mcc_k_dict instance).