Whenever you choose the
Save KB option, or whenever you save your KB programmatically, G2 refers to the Saving Parameters system table to obtain information about the saving operation. Defining the Priority for KB Saving
The Default-priority-for-runtime-saving attribute defines the priority at which G2 schedules the task of saving a KB while it is running.
Note: This is not the default priority for the g2-save-kb or g2-snapshot system procedures, nor is it the priority at which a KB save operation occurs while the KB is reset or paused.
You can set the default priority at any value from 1 - 10. For a description of scheduling tasks and priorities in G2, see Scheduling and Prioritizing Tasks.
Identifying the Current KB
The Identifier-of-basis-kb attribute displays this information:
Filename-of-basis-kb attribute displays the full pathname of the KB that is currently loaded. You cannot edit the value of this attribute. The next diagram shows how G2 presents the information for this system table.
![]() |
Adding Comments to a KB
You can add comments to your KB in the KB-file-comments attribute. This attribute accepts text, but does not require quotation marks (").
To add comments to a KB:
Main Menu \> System Tables \> Saving Parameters
KB-file-comments attribute.
KB-file-comments attribute value.
The next example shows two comments in the Saving Parameters
KB-file-comments attribute. The author has preceded each comment with the date:
![]() |
Viewing KB Version Information
The KB-version-information-for-change-logging attribute provides version information for each module (or KB) when change logging is enabled. Using KB Change Logging
You can keep a record of certain changes made to a KB during processing. This facility is called KB change logging. Enable-KB-change-logging? attribute is a truth value, whose default is no. Changing the value to yes enables change logging.KB Workspace New Definition menu.
To enable change logging:
Main Menu > System Tables > Saving Parameters
Enable-KB-change-logging attribute to yes.
Change-log attribute. You can review and revert changes at any time.
Enable-KB-change-logging? attribute to yes (true). Use such a procedure to enable change logging in all modules.
![]() |
In addition to keeping previous attribute values, the change log also saves the author, the date, and the version of the KB or module at the time of the edit.
Tracking KB Versions
When KB change logging is enabled, G2 keeps track of relevant changes by assigning a KB version number. Whenever a KB or module is saved, G2 increments the current version number. Changes to the attributes of definitional items in the module or KB then correspond to their appropriate version. KB-version-information-for-change-logging attribute. The next example shows the portion of the Savings Parameter system table where KB version information appears:
![]() |
Viewing an Item Change Log
The number of changes made to each system table and definitional item in a module appear in the item's Change-log attribute as a number of entries. For example, if you edit a rule twice, the value of the rule's Change-log attribute will be 2 entries. You cannot edit the value of the Change-log attribute; it is for purely informational purposes. Change-log attribute is greater than one, you can view the item change log.
To see an item's change log:
Change-log attribute to display its submenu.
view change log.
initially rule.
![]() |
Each change log entry consists of:
text, since it was the text of a rule.)
To revert a change to an item:
End.
Class-Specific Attributes of Saving Parameters
The class-specific attributes of the Saving Parameters system table are: