[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

3441.0. "Enumeration in MS file doesn't work" by STAR::PITCHER (Steve Pitcher/VMS Engineering) Mon Jul 27 1992 15:54

I have an enumerated type in my MSL file.  The file is included at the end of 
this note.  The enumeration in question is MAN_STATUS.

I can't type the names of the enumerated values to an MCC SET or CREATE command.
If I set them manually (through the debugger), MCC will display them properly.
But I can't SET them.

I type an MCC command like:

	MCC> SET NODE 0 ERROR FOOBAR REPLY STATUS = MAN_C_SUCCESS

and it complains that MAN_C_SUCCESS is not a valid value for the enumerated type.

	MCC-I-NOPARCMD,  MAN_C_SUCCESS
         	        ^
	%MCC-I-SYNTAXERR, Syntax error -- unable to interpret remainder of line
	%MCC-E-ENUMERATION_ERR, no such Enumeration value

WHen I display it, 

	MCC> SHOW NODE 0 ERROR FOOBAR REPLY STATUS


It properly shows MAN_C_SUCCESS.  Thus it DOES know the enumeration.  Also, I 
can display the enumerated type from DAP.

Here's the MSL file:

MANAGEMENT SPECIFICATION ERROR_test_mom;
	VERSION = V0.0.1;
	SYMBOL-PREFIX = ERR_;

INCLUDE dna_cmip_types.ms;

TYPE STATE_TYPE = 1
	(ENABLED = 0,
	 DISABLED = 1);

TYPE MAN_STATUS = 2
	(MAN_C_SUCCESS = 93225041,
	 MAN_C_NO_SUCH_CLASS = 93225762,
	 MAN_C_NO_SUCH_OBJECT_INSTANCE = 93225770,
	 MAN_C_ACCESS_DENIED = 93225778,
	 MAN_C_SYNC_NOT_SUPPORTED = 93225786,
	 MAN_C_INVALID_FILTER = 93225794,
	 MAN_C_NO_SUCH_ATTRIBUTE_ID = 93225802,
	 MAN_C_INVALID_ATTRIBUTE_VALUE = 93225810,
	 MAN_C_GET_LIST_ERROR = 93225818,
	 MAN_C_SET_LIST_ERROR = 93225826,
	 MAN_C_NO_SUCH_ACTION = 93225834,
	 MAN_C_PROCESSING_FAILURE = 93225842,
	 MAN_C_DUPLICATE_M_O_INSTANCE = 93225850,
	 MAN_C_NO_SUCH_REFERENCE_OBJECT = 93225858,
	 MAN_C_NO_SUCH_EVENT_TYPE = 93225866,
	 MAN_C_NO_SUCH_ARGUMENT = 93225874,
	 MAN_C_INVALID_ARGUMENT_VALUE = 93225882,
	 MAN_C_INVALID_SCOPE = 93225890,
	 MAN_C_INVALID_OBJECT_INSTANCE = 93225898,
	 MAN_C_MISSING_ATTRIBUTE_VALUE = 93225906,
	 MAN_C_CLASS_INSTANCE_CONFLICT = 93225914,
	 MAN_C_COMPLEXITY_LIMITATION = 93225922,
	 MAN_C_MISTYPED_OPERATION = 93225930,
	 MAN_C_NO_SUCH_INVOKE_ID = 93225938,
	 MAN_C_OPERATION_CANCELLED = 93225946,
	 MAN_C_INVALID_OPERATOR = 93225954,
	 MAN_C_INVALID_OPERATION = 93225962,
	 MAN_C_DIRECTIVE_NOT_SUPPORTED = 93225970,
	 MAN_C_ENTITY_CLASS_NOT_SUPPORTD = 93225978,
	 MAN_C_INVALID_USE_OF_WILDCARD = 93225986,
	 MAN_C_CONSTRAINT_VIOLATION = 93225994,
	 MAN_C_WRITE_ONLY_ATTRIBUTE = 93226002,
	 MAN_C_READ_ONLY_ATTRIBUTE = 93226010,
	 MAN_C_DUPLICATE_ATTRIBUTE = 93226018,
	 MAN_C_DUPLICATE_ARGUMENT = 93226026,
	 MAN_C_REQUIRED_ARGUMENT_OMITTED = 93226034,
	 MAN_C_FILTER_INVALID_FOR_ACTION = 93226042,
	 MAN_C_INSUFFICIENT_RESOURCES = 93226050,
	 MAN_C_NO_SUCH_ATTRIBUTE_GROUP = 93226058,
	 MAN_C_FILTER_USED_WITH_CREATE = 93226066);

CHILD ENTITY ERROR = 9346:
    OID = {1 3 12 2 1011 2 1 1 9346},
    DNA_CMIP_INT = 9346,
    PARENT = (NODE),
    IDENTIFIER = (NAME),

    IDENTIFIER ATTRIBUTES
	ATTRIBUTE name = 1 : SIMPLENAME
    	OID = {1 3 12 2 1011 2 2 1 9346 126 1},
	DNA_CMIP_INT = 1,
	ACCESS = NONSETTABLE
	END ATTRIBUTE name;
    END ATTRIBUTES;

    STATUS ATTRIBUTES
	ATTRIBUTE state = 2 : STATE_TYPE
    	OID = {1 3 12 2 1011 2 2 1 9346 126 2},
	DNA_CMIP_INT = 2,
	ACCESS = NONSETTABLE,
	DEFAULT = DISABLED
	END ATTRIBUTE state;
    END ATTRIBUTES;

    CHARACTERISTIC ATTRIBUTES
	ATTRIBUTE return status = 3 : MAN_STATUS
	OID = {1 3 12 2 1011 2 2 1 9346 126 3},
	DNA_CMIP_INT = 3,
	ACCESS = SETTABLE,
	DEFAULT = NO DEFAULT
	END ATTRIBUTE return status;

	ATTRIBUTE reply status = 4 : MAN_STATUS
	OID = {1 3 12 2 1011 2 2 1 9346 126 4},
	DNA_CMIP_INT = 4,
	ACCESS = SETTABLE,
	DEFAULT = NO DEFAULT
	END ATTRIBUTE reply status;

	ATTRIBUTE dummy = 5 : INTEGER32
	OID = {1 3 12 2 1011 2 2 1 9346 126 5},
	DNA_CMIP_INT = 5,
	ACCESS = SETTABLE,
	DEFAULT = NO DEFAULT
	END ATTRIBUTE dummy;

    END ATTRIBUTES;

    DIRECTIVE Show = 1 :
	DIRECTIVE-TYPE = EXAMINE,
	DISPLAY = TRUE,
	SYMBOL = DIR_SHOW,
	CATEGORIES = (CONFIGURATION),

	REQUEST	
	ARGUMENT Attr_list = 1 : Attrib_List
	   ECHO = TRUE,
	   DISPLAY = TRUE,
	   DEFAULT = "All Identifiers",
	   SYMBOL = ATTR_LIST
	END ARGUMENT Attr_list;
	END REQUEST;

	RESPONSE Examine Complete =  1 :
	    SYMBOL = EXAMINECOMPLETE,
	    TEXT = "Examination of attributes shows: ",
	    ARGUMENT Exception List = 1 : Attrib_List
		DISPLAY = TRUE,
		SYMBOL= EXCEPTIONLIST
	    END ARGUMENT Exception List;
	END RESPONSE Examine Complete;

	INCLUDE dna_cmip_get.ms;

    END DIRECTIVE Show;

    DIRECTIVE Set = 2 :
	DIRECTIVE-TYPE = MODIFY,
	DISPLAY = TRUE,
	SYMBOL = DIR_SET,
	CATEGORIES = (CONFIGURATION),

	REQUEST	
	    ARGUMENT Modify List = 1 : Attrib_List
		ECHO = TRUE,
		DISPLAY = TRUE,
		DEFAULT = NO DEFAULT,
		SYMBOL = MODIFYLIST
	    END ARGUMENT Modify List;
	END REQUEST;

	RESPONSE Modify Complete =  1 :
	    SYMBOL = MODCOMPLETE,
	    TEXT = "Modifications completed successfully",
	    ARGUMENT List = 1 : Attrib_List
		DISPLAY = TRUE,
		SYMBOL = LIST
	    END ARGUMENT List;
	END RESPONSE Modify Complete;

	INCLUDE dna_cmip_set.ms;

    END DIRECTIVE Set;

    DIRECTIVE Create = 12 :
	DIRECTIVE-TYPE = ACTION,
	DNA_CMIP_INT = 12,
	DISPLAY = TRUE,
	SYMBOL = DIR_CREATE,
	CATEGORIES = (CONFIGURATION),

	REQUEST	 
	    ARGUMENT reply status = 1 : MAN_STATUS
	    DNA_CMIP_INT = 1
	    END ARGUMENT reply status;

	    ARGUMENT dummy = 2 : INTEGER32
	    DNA_CMIP_INT = 2
	    END ARGUMENT dummy;
	END REQUEST;

	RESPONSE Success =  1 :
	    SYMBOL = CREATE_SUCCESS,
	    TEXT = "Createful Succession",
	END RESPONSE Success;

	INCLUDE dna_cmip_action.ms;
	INCLUDE dms_create_exceptions.ms;

    END DIRECTIVE Create;

    DIRECTIVE Delete = 13 :
	DIRECTIVE-TYPE = ACTION,
	DNA_CMIP_INT = 13,
	DISPLAY = TRUE,
	SYMBOL = DIR_DELETE,
	CATEGORIES = (CONFIGURATION),

	REQUEST END REQUEST;

	RESPONSE Success =  1 :
	    SYMBOL = DELETE_SUCCESS,
	    TEXT = "Successful deletion",
	END RESPONSE Success;

	INCLUDE dna_cmip_action.ms;
(*	INCLUDE dms_common_action_exceptions.ms; *)

    END DIRECTIVE Delete;

    DIRECTIVE Enable = 14 :
        DIRECTIVE-TYPE = ACTION,
	DNA_CMIP_INT = 14,
        DISPLAY = TRUE,
        SYMBOL = ENABLE,
        CATEGORIES = (CONFIGURATION),

        REQUEST
	    ARGUMENT arg1 = 1 : INTEGER32
	    DNA_CMIP_INT = 1
	    END ARGUMENT arg1;
        END REQUEST;

        RESPONSE Success =  1 :
            SYMBOL = ENABLE_SUCCESS,
            TEXT = "THING successfully enabled",
        END RESPONSE Success;

	INCLUDE dna_cmip_action.ms;
(*	INCLUDE dms_common_action_exceptions.ms; *)

    END DIRECTIVE Enable;

    DIRECTIVE Disable = 15 :
        DIRECTIVE-TYPE = ACTION,
	DNA_CMIP_INT = 15,
        DISPLAY = TRUE,
        SYMBOL = DISABLE,
        CATEGORIES = (CONFIGURATION),

        REQUEST
            (* No input arguments *)
        END REQUEST;

        RESPONSE Success =  1 :
            SYMBOL = DISABLE_SUCCESS,
            TEXT = "Disable successfully completed"
        END RESPONSE Success;

	INCLUDE dna_cmip_action.ms;
(*	INCLUDE dms_common_action_exceptions.ms; *)

    END DIRECTIVE Disable;

END ENTITY;	(* End of Logical Name Table *)

END SPECIFICATION.


Interestingly, this can be fixed, by inserting the following into the begining 
of the enumeration:

	 test1 = 1,
	 test2 = 93225039,
	 TEST_TEST_3 = 2,
	 TEST_TEST_4 = 93225038,

	 
in case its significant, there's a blank line after TEST_TEST_4.  

Putting these five lines of garbage at the beginning of the enumation list fixes 
it!!!!
T.RTitleUserPersonal
Name
DateLines
3441.1DAP does not like huge valuesTAEC::LAVILLATMon Aug 03 1992 09:0617
Re .0:

>
>TYPE MAN_STATUS = 2
>        (MAN_C_SUCCESS = 93225041,
>         MAN_C_NO_SUCH_CLASS = 93225762,
>         MAN_C_NO_SUCH_OBJECT_INSTANCE = 93225770,

I think the DAP has some problem with huge number and enumerations.

Try to use smallest value like 5041, 5762 , 5770,... to see if it does not
solve your problem also.

Regards.

Pierre.

3441.2Old problem -- fixed in v1.2...DFLAT::PLOUFFEJerryMon Aug 03 1992 10:4415
  DAP did have a problem with large enumerated values, but this problem was
  corrected in v1.2.

  .0 states:

    "Also, I can display the enumerated type from DAP"

  Could you post the output of a DAP SHOW command, to make sure that DAP
  is processing these values properly?  Thanks in advance...

  $ MAN/TOOL/DICT
  DAP> SHOW CLASS NODE SUBCLASS ERROR ATTRIBUTE REPLY STATUS -
  _DAP> DEFINITION CONSTRUCTOR_DATA_TYPE

                                                                    - Jerry
3441.3STAR::PITCHERSteve Pitcher/VMS EngineeringMon Nov 02 1992 15:5414
Sorry I didn't respond earlier.  I lost interest for a while.  But I'm back 
to this, and it still doesn't work.

I am having this problem with MCC V1.2.  Its not fixed!!!

I don't currently have DAP loaded with the bad copy of the thing.  I've applied 
the work around I mentioned in .0.

There really is a problem with big enumeration values.  Try compiling the MSL 
file in .0, and try typing the MCC command shown.  It doesn't work.

I should probably QAR this.  Its clearly a bug.

-	stp
3441.4I need the DAP command file...DFLAT::PLOUFFEJerryWed Nov 04 1992 10:5211
Steve:

  I can't (successfully) compile the MSL file included in .0 because I don't
  have copies of the include files that it uses.

  Please use the MSL compiler to compile this MSL file (without your workaround)
  and mail the resulting DAP command file (.com) to MOLAR::PLOUFFE.

  I'll load it into a test dictionary and try your command.

                                                                       - Jerry