Most data is stored in coded form to reduce storage requirements and to standardize definitions for easier assembly into reports. A few codes, like Employee Number, involve extensive definition to serve the application. These have subsystems within the application just to service them. Many codes, like Job Class, can function without extended definition or validation. Other codes need either extended definitions, usually to make reports readable, or validation to restrict the values to serve some function in the system. These classifications of codes are applicable to all applications, so a common Code Table support was created. A common Code Table support provides the added service that code tables can be shared between applications. At this time (August 1992), the Payroll does not share any tables with other applications.
Code Table support consists of three functions and a series of code modules for inclusion in interactive programs, and a coding method to access specific table entries. These are described in the following paragraphs.
Table Update
(TBLUPD)
The Table Update is on the Tables and Parameters menu. It is used to add and change specific codes on selected tables in the Payroll. On the first screen you select the table and the code. If you want to know the valid values for a code enter the table code and ask for a list. The entries that identify a specific code are:
Once the code is selected the details of the code definition are displayed for possible change. Make changes to the entries as required, then apply the changes(F10). It is also possible to delete a code(F18). Be careful when deleting codes because no checks are done to insure that the code is inactive before deleting it. The entries that make up the code definition include:
As of August 1992, the Table Ids in use are:
Table Print
(TBLLST)
Prints the selected table, or all tables in the application if the Table Id is blank. It is called from the Select an Entry screen of the Table Update.
Table List
(TBL021)
Displays the entries in a designate table to let you select one. It uses a full screen to present the list.
Displays a short list of codes and descriptions that appear in a window on the screen. Program PR1800, Deductions Update, shows how the modules TBLLSTCE and TBLLSTCC, the file definition for UTTABL, and the constants table, MSG, are added to a program. The workstation definition PR1800FM contains the associated screen module TBLLSTA.
Code editing is done in the same program that use the Table Window. As such, we can do the edit by chaining directly to the Table file entry. See program PR1800 for examples.