| The Reference attributes are defined separately for each entity class.
Just go out and define new attributes and add them to the Reference
partition for the entity. (As if it were that simple... ;-) They will be
handled automagically by the Registration FM.
I think the cleanest way would be to write an MSL to be merged with the
dictionary contents. But this way you cannot just extend the Reference
partition. You have to define a completely new one or include the part
of the original MSL (not publicly available, though). Be careful not to
overlap with existing attribute codes!
Maybe an MSL expert could give an example here ?
I tried it - successfully :-) - by directly issuing DAP commands (don't
know much about MSL), but it was very tedius.
*Robert
|
| >I think the cleanest way would be to write an MSL to be merged with the
>dictionary contents. But this way you cannot just extend the Reference
>partition. You have to define a completely new one or include the part
>of the original MSL (not publicly available, though). Be careful not to
>overlap with existing attribute codes!
You can use the MSL with the "augment" qualifier to create the DAP
commands for adding to the reference attribute partition. (Look at
the file MCC_REFERENCE_ATTRIBUTES.MS that's included with the
toolkit.)
The problem is that there's a bug in DAP with the "augment" command...
It doesn't add the new list of attributes correctly, so it requires
that you go in and 'touch up' the dictionary definitions.... I forget
which field it is that has to be changed, though.... Maybe Jerry will
stick his head in here and remind me....
>
>Maybe an MSL expert could give an example here ?
>
I'm not not an expert, but I am a certifiable dictionary ravager...
;^) Here's a snippet that adds the reference attributes "Owner",
"Contract ID" and "In-Service Date" to the reference attributes for
the class "Collector" :
MANAGEMENT SPECIFICATION foo_ref;
VERSION = V1.3.0;
SYMBOL-PREFIX = MCC_;
GLOBAL ENTITY Collector = 25 :
REFERENCE ATTRIBUTES
ATTRIBUTE Owner = 107 : Latin1String
ACCESS = SETTABLE,
DISPLAY = TRUE,
CATEGORIES = (CONFIGURATION),
SYMBOL = REF_ATTR_OWNER
END ATTRIBUTE Owner;
ATTRIBUTE Contract ID = 108 : Latin1String
ACCESS = SETTABLE,
DISPLAY = TRUE,
CATEGORIES = (CONFIGURATION),
SYMBOL = REF_ATTR_OWNER
END ATTRIBUTE Contract ID;
ATTRIBUTE In-Service Date = 109 : Latin1String
ACCESS = SETTABLE,
DISPLAY = TRUE,
CATEGORIES = (CONFIGURATION),
SYMBOL = REF_ATTR_OWNER
END ATTRIBUTE In-Service Date;
END ATTRIBUTES;
END ENTITY Collector;
END SPECIFICATION foo_ref;
|
|
Here's the how to doctor up the dap command procedure produced by MSL
translator augmentation:
Find the section of the .com file that looks like this:
VALUE "References"
! attribute_list
SET DEFINITION CODE 16 TYPE LU COUNT 4 LENGTH 4 -
VALUE -
1001 1002 1003 1004
The bug with the DAP is that it forgets about the *existing* attribute
codes in the partition when you do the AUGMENT, so you have to
re-include the originals in your augmentation, or they're lost in the
dictionary...
You need to change the line after "VALUE - " to include ALL of the
codes for the attributes in the reference partitions (the existing ones
AND your new attributes). You also need to remind it that the *total*
number of attributes in this list has changed. There are seven
reference attributes to start with (codes 100 through 106), so add to
that the number of reference attributes that you are adding (say four
more). So the new value for COUNT will be 11.
For example: If you had added three new reference attributes using
codes 1001, 1002, 1003 and 1004 then you would edit the section thusly:
VALUE "References"
! attribute_list
SET DEFINITION CODE 16 TYPE LU COUNT 11 LENGTH 4 -
VALUE -
100 101 102 103 104 105 106 1001 1002 1003 1004
Now save the .COM filem run dap telling it:
DAP> augment class FOO from FOO_REF.COM
You should be all set.
/doug
|