In general, whenever new attributes are created in any <<Ispec>> class or the Event, it causes a database reorganization. However, if you know in advance that you have to add attributes later, you can create a database filler: a reserved number of bytes to be used to store these added items. As long as the added items fit within the reserved database filler, adding them does not cause a database reorganization.
Specifying a Database Filler
To specify a database filler for an <<Ispec>> class, enter the size in bytes in the range 0 through 2047 in the Filler Size property under the DASDL category for the <<Ispec>> class. Refer to the Agile Business Suite Developer User Guide.
You can specify a database filler for any Standard <<Ispec>> class with one or multiple keys, and has persistence members. You cannot reserve database filler separately for future StoreIfPresent attributes, only for the <<Ispec>> class that contains the StoreIfPresent attributes.
Note: When you define a database filler, DMS II adds this space to the end of the database record, increasing the physical database record length. This increase might have an impact on performance, disk space, and memory usage, and it is recommended that you only use a database filler when you know that attributes is added in future.
Refer to the DMS II Data and Structure Definition Language (DASDL) Programming Reference Manual for more information.
What happens when you add persistent attributes
When you add new attributes for an <<Ispec>> class with a database filler defined:
The attribute is added within the database filler area and the size of the filler in the DMS II source is reduced by the number of bytes used by the added attribute.
Provided all added attributes fit into the database filler, the overall record length is not changed.
If an attribute is changed from non-persistent to persistent, space in the database is allocated from the filler area.
When you add attributes, the value of the Filler space Remaining property is reduced by the size of the added attributes to show the size of the remaining database filler. When the application is built, the Filler Size and Filler Size at Last Generate properties are updated. If you change the value of the Filler Size property, the next build creates a database filler of the size you specified, regardless of any added attributes.
If you add an attribute that will not fit into the database filler, the Filler Space Remaining property changes to show Filler Space Exceeded By. At the next generate, the attribute is added and the database filler remains at the last specified value. The record length is increased and the database reorganized.
Attributes in the database filler are given an internal sequence number and are defined in the database layout following the attributes not in the database filler. As long as the Revert to Standard Layout at Next Generate property is remains as False, reorganizations of the data structure will not change the positions or internal sequence numbers of filler attributes.
If you delete attributes from within the database filler, or change them from persistent to non-persistent, the space occupied by those attributes is returned to the filler. The database is reorganized.
If you extract an <<Ispec>> class in a Report (using the Extract ispec logic command), attributes in the database filler are defined in the file layout following those not in the database filler.
If the Revert to Standard Layout at Next Generate property is set to True, all attributes in the database filler are included in the extracted record in normal sequence. So long as this property remains set to N, reorganizations of the data structure will not change the positions or internal sequence numbers of filler attributes.
Database Filler for Configurations
The database filler has the same value for all MCP based configurations. For a Module, the value for the Module Master is used.
Value of Attributes in the Database Filler
Values of attributes added to the database filler are set to the default initial values.
These values can cause problems in your logic. |
It is recommended that you write a Report to set these values to the appropriate initial values, such as spaces or zeros. You can test for the inserted values by using Glb.High for alphanumeric attributes or NOT NUMERIC for numeric attributes.
Note: You can reserve database filler for an <<Ispec>> class that contains StoreIfPresent attribute, but not for the StoreIfPresent attributes themselves.
Reorganization
The following conditions causes a database reorganization:
Adding an attribute that will not fit into the database filler.
Deleting an attribute from any part of the record (including the database filler), or changing an attribute from persistent to non-persistent.
Adding or removing a database filler, or changing the size of the filler.
Setting the Revert to Standard Layout at Next Generate property.