Customizing the metamodel : Customizing the repository metamodel: SAPROPS.CFG and USRPROPS.TXT : Example of making changes to USRPROPS.TXT
  
Example of making changes to USRPROPS.TXT
In this section, we will make changes to a definition that already exists in SAPROPS.CFG. The following code can be found in SAPROPS.CFG:
DEFINITION "Change Request"
{
ADDRESSABLE
LAYOUT { COLS 2 TAB ALIGN LABEL }
PROPERTY "Impact Statement" { EDIT Text LENGTH 1000 }
PROPERTY "Original Source" { EDIT Text LIST "Business Unit"
LENGTH 80 LABEL "Source Dept." }
PROPERTY "Author Name" { EDIT Text LENGTH 25 }
PROPERTY "Date Entered" { EDIT date INITIAL date READONLY
LENGTH 10 }
PROPERTY "Start Date" { EDIT date LENGTH 10 }
PROPERTY "Required Completion Date"
{ EDIT date LENGTH 10 LABEL "Required Completion" }
The picture below shows the Dictionary Object dialog for the above definition block (we informally call this the definition dialog throughout most of this manual).
Change request definition dialog as defined in the master configuration property set file
There is an Introduction tab even though the SAPROPS.CFG has not called this out specifically with a CHAPTER command. If no CHAPTER command is specified, System Architect automatically provides a default Introduction tab. The Access Data tab is hard‑coded in the software and not specified in SAPROPS.CFG.
Making a change with USRPROPS.TXT
Make changes to the Change Request definition by adding the following code to USRPROPS.TXT and reopening the encyclopedia:
DEFINITION "Change Request"
{
  LAYOUT { COLS 2 TAB ALIGN LABEL }
  PROPERTY "Author Name" { LABEL "Client Division" }
  PROPERTY "Supervising Manager" { EDIT text LENGTH 45 }
  PROPERTY "On time" { Edit Boolean Length 1 DEFAULT "T" }
}
Effect of USRPROPS.TXT Entries
DEFINITION "Change Request" {
Specifies a change to the Definition “Change Request”
LAYOUT { COLS 2 TAB ALIGN LABEL }
Sets up a two-column layout for the properties below the LAYOUT command (until the end of the definition is reached or another LAYOUT command is encountered).
PROPERTY "Author Name" { LABEL "Client Division" }
This modifies an existing property - it changes the label on the field from Author Name to Client Division
PROPERTY "Supervising Manager" { EDIT TEXT LENGTH 45 }
This adds a new property, which is a text field, Supervising Manager, to the dialog box.
PROPERTY "On time" { EDIT BOOLEAN LENGTH 1 DEFAULT "T" }
}
This adds a new property, which is a checkbox, to the dialog box to indicate whether the change request is meeting the deadline.
We import our changed USRPROPS.TXT file into our System Architect encyclopedia, and reopen the definition of a change request, to see the changes to its dialog; note that the information on the Introduction tab has now spilled onto two pages.
Change Request Definition dialog as modified by entries in USRPROPS.TXT
The information is on two pages of the Introduction tab because of the two new properties that were added. They are added to the end of the definition (they are not added to the end of the Access Data tab because this tab does not count: it is hard coded and not part of SAPROPS.CFG).
Only change what needs to be changed
Notice that we did not re-enter the entire PROPERTY statement that exists in SAPROPS.CFG into our USRPROPS.TXT file. We simply need to enter specific statements that need to be changed, besides any new statements that we are adding. And even for the statements that we are changing that we are re-entering, we only need to add the part of the statement that is changing. In our example, the one statement from SAPROPS.CFG that we re-entered and changed was:
PROPERTY "Author Name" { EDIT TEXT LENGTH 25 }
In our USRPROPS.TXT file, we only wanted to change the label on this property, so we simply entered:
PROPERTY "Author Name" { LABEL "Client Division" }
The length of the property and the fact that it is text (rather than numeric or Boolean) remain unchanged; only the label to the left of the control in the dialog has been changed.
One more change and a warning
Try another change: add the text in bold below to the USRPROPS.TXT code:
DEFINITION "Change Request"
{
LAYOUT { COLS 2 TAB ALIGN LABEL }PROPERTY "Impact Statement" { EDIT text LENGTH 100 }PROPERTY "Author Name" { LABEL "Client Division" }
PROPERTY "Supervising Manager" { EDIT text LENGTH 45 }
PROPERTY "On time" { Edit Boolean Length 1 DEFAULT "T" }
}
The explanation of this change is explained below:
USRPROPS.TXT entry
Effect
PROPERTY "Impact Statement" { EDIT TEXT LENGTH 100
Attempts to modify an existing property, reducing the space for the Impact Statement from 1000 characters to 100.
Import this USRPROPS.TXT back into your encyclopedia, and then reopen the encyclopedia. This message appears:
Warning: In user’s property file addenda between line number 70 and line number 72. Illegal attempt to shorten the length of a property. Original length retained.
You can not decrease the length of a field; you can only increase it. This is because users might have already entered information into a text field that will be lost if you decrease the length of a field, and thereby decrease the amount of information that the encyclopedia can hold for this property, at a later time.
System Architect issues the warning, ignores the faulty code, and opens the encyclopedia. If this had been an error message, the encyclopedia would not open until you fixed the USRPROPS.TXT.
If you tried to increase the length of the Impact Statement field, System Architect accepts the change.
PROPERTY "Impact Statement" { EDIT text LENGTH 1200 }