PUTCONFIGURE
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Revelation Technologies | 16 DEC 1991 | 2.1X | INTERMEDIATE | PUTCONFIGURE, WHO |
PUTCONFIGURE is a function supplied with Advanced Revelation to update and maintain information about what optional modules have been installed on a system. For example, bonds, updates, and upgrades use PUTCONFIGURE to update the WHO window. In addition, PUTCONFIGURE is used to remove modules from the system.
You can use PUTCONFIGURE as part of your applications install process to update files, existing menus and popups and to indicate in the WHO window that your application is installed.
PUTCONFIGURE is an external function. As with any function, it must be declared before it is used. The function takes three parameters and returns a status:
stat = putconfigure(delete_flag, module_name, module_level)
delete_flag
If delete_flag is true (1), the module in module_name is removed from the system. Otherwise module_name is added.
module_name
Module_name is the literal text that appears in the WHO window. Do not use spaces to separate multiple words. Mixed case is allowed.
module_level
Module_level is the level that appears in the WHO window in the UPGRADE INFORMATION section under "To Level".
The CONFIGURE File
To run PUTCONFIGURE you must have the CONFIGURE file attached. In addition, there must be a record with the key CONFIG.module_name in the CONFIGURE file, where module_name is the name of the module you wish to install.
Structure of CONFIG.module_name
The PUTCONFIGURE process allows you to modify existing menus and popups, and to indicate which parts of your module should automatically be included in new accounts. The CONFIG.module record is used to identify these parts of your system. This information is also used when your module is removed from the system to ensure that all parts are removed.
There are eleven fields in the CONFIG.module record. Even if your application does not use any of the fields, the record must exist. The layout of the fields is:
Field 1 (Menus)
Field 1 lists the menus to modify. Each value in the field represents a different menu. Each menu must supply six items of information, separated by subvalue marks (ASCII 252):
File
The name of the file that stores the menu template.
Name
The name of the menu.
Entry
The literal text to be displayed on the menu. New menu entries are added to the end of the existing menu.
Code
The code to execute when the user selects the menu item.
Command
The command associated with the code.
Description
The description that appears when the entry is highlighted.
Field 2 (Popups)
Field 2 is a list of the popups to modify. Each value in the field is a separate popup. Each value is composed of four subvalues:
File
The name of the file that stores the popup.
Name
The name of the popup.
Type
The popup type. Currently, only R type popups are supported.
Info
The data to add to the end of the Explicit popup information field (field four of the popup definition). Separate multiple column entries with | (vertical bar).
Field 3 (New Account Information)
Advanced Revelation maintains, in the SYSTEM file, lists of files, VOC entries and DICT.VOC entries that must be created in every new account. These are, respectively, the records NEW.ACCOUNT.FILE.LIST, NEW.ACCOUNT.VOC.LIST, and NEW.ACCOUNT.DICT.VOC.LIST. The data in field 3 of the CONFIG.module_name record is used to update these records. Each value in field 3 represents a different record to update. Multiple entries in a list are separated by subvalue marks.
Note: These lists apply to new accounts only. If existing accounts must use your application, you will have to update those accounts separately.
Value 1 - VOC items
List of items to be added to the VOC file in a new account.
Value 2 - DICT.VOC items
List of items to be added to the DICT.VOC file in a new account.
Value 3 - Empty files
List of empty files to be created in a new account.
Field 4 (Pre-delete Process)
A value mark-delimited list of code and command pairs to be executed before the module is deleted. Separate the code from the command with a subvalue mark.
Field 5 (Post-delete Process)
As above, except these codes and commands are executed after the module has been deleted.
Fields 6-9
Reserved.
Field 10 (Files)
A value mark-delimited list of files that belong exclusively to the module. These files are deleted when the module is removed from the system.
11-n (Records)
The remaining fields in the record represent files containing records that belong to the module. The first value of each field is the name of the file. The second and subsequent values are the names of records that belong to the module. When the module is deleted, these records are removed from the file.
Values Returned
PUTCONFIGURE returns false (zero) if the requested operation succeeds, true otherwise.