Generic Code Tables can be created and maintained using the Console Mode Generic Code Table Maintenance program or the VDF Gencode Manager view.
The Gencode Table for a specific database field may be also be maintained from within the field itself depending on your system security settings. If you have the appropriate security rights, you may access the gencode table for a particular database field by positioning your cursor in the field and pressing the EXPAND key to invoke the Gencode table popup. This feature is usefull when you wish to add data records to an existing gencode table or wish to create a new table on the fly.
Generic Code Table Maintenance program (Console Mode)
This program allows you to view, edit and delete existing Gencode records, and to create new tables or add additional records to existing gencode tables.. The Generic Code Table Maintenance program also allows you to copy an existing gencode table so that it may be edited and used to create a new table, and to export or import Gencode data.
Selecting a Gencode record - When you select the program from the menu, the Generic Code Table Maintenance Screen is displayed and the screen is filled with a list of all of the records which have been set up in the Generic Code File (both title and data records are displayed in the program). You may select a gencode record by using the entering the desired table name (or a portion of it) and pressing the ENTER key, (this will cause the program to search for and locate the record most closely matching what you entered) or by using the FIND keys (or a combination of both).
Editing an existing Gencode record – Once the desired record has been selected (hightighted), you may edit the record by pressing the ENTER key. After the ENTER key is pressed, a small window appears on the screen which displays the Table, Code, Description, Verify and other fields from the gencode record. These fields may be edited within the window and pressing the ENTER key will save the changes and return you to the Generic Code Table Maintenance screen.
Creating a new Gencode record or table - New tables and or codes within a table are created using the INSERT key or by copying an existing table or by importing data into the Gencode file.
Inserting a new record - When the INSERT key is pressed, a small window appears on the screen which contains the Table, Code, Description, and Verify fields. These fields may be edited within the window and pressing the ENTER key will save the changes and return the operator to the Generic Code Table Maintenance screen.
Copying an existing Gencode Table - You may copy an existing Gencode table by highlighting one of the records in the desired table and by pressing the USER key. When the USER key is pressed, the system displays a window in which you are prompted to enter the name of the table that the existing table is to be copied to. Once you specify the name of the new table, the system copies all of the records from the selected table and assigns them the new table name specified. You may then edit the records in the newly created table as required.
Importing and Exporting Gencode Tables - The Generic Code Table Maintenance program allows you to export and import gencode records using ASCII files. This feature is mainly used to load the Generic Code Table when a new system or program is installed. To export a Gencode table, you highlight a record in the appropriate table and press the USER2 key. When the USER2 key is pressed, the system displays a prompt asking you whether you wish to Dump or Load the table. If you wish to Dump a table you should enter a "D" when prompted. The system will then ask for the file name to APPEND to. This file is the ascii file that will be created by the system if it does not exist, or the file to which the records will be added to if it already exists. The ascii file will be created in your local directory with the name specified and no file extension (unless one is specified). Note that since file is appended to, you may export multiple tables into one ascii file.
To import an ascii file which has been dumped from the Gencode table, you press the USER2 key. When the USER2 key is pressed, the system displays a prompt asking you whether you wish to Dump or Load the table. If you wish to Load a table you should enter an "L" when prompted. The system will then ask for the file name to be loaded into the program. At this point you should enter the name of the file, including the path if the file is not in your local directory and press the ENTER key. The system will then load the information from the file into the Generic Code table and you may edit the new records as necessary.
Deleting a Gencode record - If you have been granted sufficient security rights in the Generic Code Table Maintenance program, you may delete existing Gencode records by highlighting the appropriate record and by pressing the DELETE key. Please note that when the DELETE key is pressed, the system immediately deletes the highlighted record, so caution should be used when using this key.
Creating a Title Record for a Table - Create a gencode record with the title_flag field set to "Y". This information in the Code field of this record will be used for validation, as explained in the Generic Code record format section of this document.
Gencode Manager
The Gencode Manager View is a VDF application that can be used to maintain, edit and create gencode records. This program is available from within many of the VDF modules in the system. When the Gencode Manager View is selected, the view is activated and a list of all gencode tables in the system are displayed. The Gencode Manager View displays only the title type gencode records, so that you can find and modify existing tables in a more efficient manner than in the console mode version of the program.
Selecting a Gencode record - When you select the Gencode Manager View, a list of the gencode title type records in your system is displayed. You may search for a specific table by entering the desired table name (or a portion of it) and pressing the ENTER key, (this will cause the program to search for and locate the record most closely matching what you entered) or by using the FIND keys (or a combination of both).
Editing an existing Gencode title record – Once the desired title record has been selected (highlighted), you may edit the title record by pressing the ENTER, or ZOOM keys or by double clicking the record with the mouse.. At this point, the Gencode Table Control Dialog is displayed and loaded with the information from the record. The fields displayed in the dialog can be edited within the dialog and saved by pressing the SAVE key or using the SAVE button). The formattting rules described earlier in this document should be used when editing existing title records to make sure you do not inadverdantly change system behavior.
Editing an existing Gencode data record. - To edit an existing data type gencode record, you should first locate the appropriate table (title record) as described in the previous section. You may then use the EXPAND key or mouse function to display the data entries for the table. When the EXPAND key or function is used,, the Gencode Lookup view is activated and it displays the existing data records for the table. Once the Gencode Lookup view is displayed you may search for and locate the correct data using the same navigation techniques as described above. Once the correct data record is highlighted you may access the record using the ZOOM key or mouse function, or by double clicking with the mouse. At this point the Gencode Detail dialog is displayed and it is loaded with the information from the exiting record. The fields displayed in the dialog can be edited within the dialog and saved by pressing the SAVE key or using the SAVE button).
Creating a new Gencode title or data record - New tables (title records) and or codes or table entries (data records) can be created by pressing the INSERT key from the appropriate location. Gencode title records should be inserted from the Gencode Manager View and gencode data records should be inserted from Gencode Lookup view. When the insert key is pressed from either view, the appropriate dialog (editor program) is displayed, and you can enter the required informaton and save it using the SAVE key or button.
Note: The indicators shown in the Visual Dataflex Gencode Table Control dialog (Require Operator Data Entry, Blanks Allowed) are used to automatically load the correct value into the code field of the gencode title records that you create using the program. For example: Setting the blanks allowed indicator will cause the system to move a blank value to the code field in the title record. Setting the Require Operator entry indicator will cause the system to load “REQUIRED” into the code field of the record. If neither indicator is set, the system will load the default value of 8 dashes into the record to indicate that standard validation is the method used for the table.
Gencode Tables – Specific Examples
ActnQues Table - The list of all queues that an action can be assigned to. These queues can be salesmen, buyers, operators, or virtual queues. | ||
Field |
Type |
Usage |
Table_Name |
A8 |
ACTNQUES – The name of the table |
Code |
A8 |
The name of the Queue – Salesman Code, Buyer Code, Operator Code or a virtual queue. |
Verify |
A15 |
Not used |
Description |
A50 |
Extended description of the Queue |
DATA_1 |
A30 |
|
DATA_2 |
A30 |
|
DATA_3 |
A30 |
|
DATA_4 |
A3 |
The source of the queue: SLS, BUY, OPR, OTHer |
DATA_5 |
A8 |
|
DATA_6 |
A1 |
|
DATA_7 |
A1 |
|
DATA_8 |
A1 |
|
Country Table - The country table is used to select and validate the country field in Master Data Maintenance and other programs. The country table is also used to define the phone number mask or formatting to be used for phone numbers for companies located in the country. | ||
Field |
Type |
Usage |
Table_Name |
A8 |
COUNTRY - the name of the table. |
Code |
A8 |
The ISO code for the country (United States = US, Germany = DE, etc…) |
Verify |
A15 |
|
Description |
A50 |
The name of the country |
DATA_1 |
A30 |
The telephone, and fax, input formatting mask specific to phone numbers for the country. The Mask is entered in the following format. (###) ###-#### ******* where # indicates a numeric field, * indicates that any printable character can be entered and – and ( ) are used for formatting. If a mask is not entered in this field, the system will default the mask for the country to ****************** meaning that the number can be formatted manually. If a phone number mask is implemented for a country, the telephone numbers for the country are automatically formatted during VDF data entry. If a mask is present, the data itself does not contain any formatting characters and should be entered without formatting characters in the Console Mode programs. |
DATA_2 |
A30 |
|
DATA_3 |
A30 |
|
DATA_4 |
A3 |
The primary currency in use in the country. |
DATA_5 |
A8 |
|
DATA_6 |
A1 |
Sell flag - Do we sell in this country (Blank = Y) |
DATA_7 |
A1 |
|
DATA_8 |
A1 |
|
More: