Documentation >
MAC-PAC Reference and Help >
Technical Support >
Key Concepts and Procedures >
Basic Concepts >
System Control File and Reference File
System Control File and Reference File
Some general information is required to run MAC-PAC. This information includes site characteristics, system processing options, codes such as part types, and system defaults. These parameters vary from site to site. To facilitate customization, MAC-PAC stores such parameters on two files:
· System Control File
· Reference File
System Control File
The System Control File contains one record--the company name used for the highest level of financial reporting. This information is printed on report headings
Reference File
The Reference File stores a wide variety of information. Each unique type of information is stored on a "category." Different record layouts and validation rules are defined for each category. Some categories have a single record, others can have multiple records. Each category has a unique, three-character name. For a complete list of categories, refer to the Common Features: Reference File Categories Manual or use the Reference File Inquiry conversation.
Reference File Format
The Reference File (REFERP) itself is a logical file stored in the MAC-PAC data library. Physical data entered in the Reference File (REFERP) is stored in one of two physical files, REFERPS and REFERPM. REFERPS, or the Standard Reference File, is a physical file containing data that is not translatable into other languages. REFERPM, or the Multi-Language Reference File, is a physical file containing data that requires translation.
Each record on the Reference File is 120 characters long. For each category, two types of information are stored: key information and data. The following figure shows how this information is stored on each Reference File record:
|
|
1 - 3
|
Category number
|
4 - 30
|
Key
|
31 - 120
|
Data
|
The particular way in which the key and data characters are divided into fields differs for each category. This information is defined on category 999.
The Reference File Maintenance conversation has two screens. The first screen prompts you for the key information relevant for the category. The second screen contains the data related to that key. If only one record is allowed for a category, the key is blank.
Reference File Validation
Validation for Reference File categories is provided through user exit programs. A separate user exit program is defined for the key information and data stored on a category. These programs are stored in the Common Features source file (CFRPGSRC). The following naming convention is used for user exit programs:
· The first two characters are US (for User Exit)
· The next three characters are the Reference File category number
· The final character indicates if the program validates the key date (K) or the detail data (D).
For example, the user exit programs for Reference File category 409 are US409K and US409D.
Note that customers creating their own user exists typically use P as the final character. For example, a user-defined exit for category 409 could be called US409P.
A user exit program is required whenever the information entered for a record must be validated against a master file or the Reference File. The validation rules for each category, together with a sample of the maintenance screen for the category, are provided in the Common Features: Reference File Categories Manual. A generic description of the user exit programs is given in the Common Features Program Documentation Manual.
Simple validation (such as whether a number was entered in a numeric field) is provided through edit masks. The following types are included:
X
|
Alphanumeric
|
N
|
Numeric
|
D
|
Decimals
|
DMY
|
Day/Month/Year
|
Y
|
Yes/No flag
|
Category 999
Reference File category 999 defines how data records are structured for all other categories. Each Reference File category must have five active records in category 999 before that category can be used for system maintenance:
· Screen title (ST). Contains the name of the screen as it will be displayed on Reference File maintenance screens.
· Coded title (CT). Contains the name describing the key for this category. This name will be displayed next to the key field on the first maintenance screen for the category.
· Coded edit (CE). Contains the edit mask for the category's key. The mask determine how many positions are in the key and whether they must be alphanumeric, numeric, or Y/N.
· Decoded title (DT). Contains literals describing the non-keyed data for the category. These literals are displayed on the second (detail) screen of the maintenance conversation.
· Decoded edit (DE). Contains the edit mask for the category's detail data
Data for Reference File category 999 is divided between the Standard Reference File (REFERPS) and the Multi-Language Reference File (REFERPM). REFERPS contains the Coded Edit (CE) and Decoded Edit (DE) records. REFERPM contains the Screen Title (ST), Coded Title (CT), and Decoded Title (DT) records.