-    HOW TO: LOADING CSV FILES    

Storing Application Data (Menus) in UD6 Version Control

Many Uniface applications are data driven - and some of this data such as menus and reference tables may need to be version controlled.

Provided that the table definitions follow the same general format as the Unifacce repository tables then it is possible to alter the UD6 configuration files to support application data.

A simple example

In our sample application a user menu is defined using two tables MENU_SET and MENU_CHOICE. The primary key of MENU_SET is APPLICATION_NAME,MENU_NAME and the primary key of MENU_ITEM is APPLICATION_NAME,MENU_NAME,SHORT_NAME.

The joins configuration file needs to be modified like this:

;
MENU_SET:APPLICATION_NAME,MENU_NAME:APPLICATION_NAME,MENU_NAME::.\sources\user_menu\*
MENU_CHOICE:APPLICATION_NAME,MENU_NAME:APPLICATION_NAME,MENU_NAME,SHORT_NAME::MENU_SET
;

These line tells the UD6/CMtool Driver that the entities MENU_SET and MENU_CHOICE should be stored in files in the sub directory user_menu. There will be one file for each menu, and each of those files will contain the menu items within that menu.

It is NOT recommended that user tables:

If your user tables meet this criteria, you will need the assistance of our support team to configure UD6:

Tables which store more than 7kb per row must also be listed in the overflows configuration file and will require changes to the ofields configuration file. If the user table has a fixed record length of more than 2000 characters (or 500 characters when using $DEF_CHARSET UTF8 then you will also need to set USYS$UD6_PARAMS=varportion 4000 or a similar value.

The only remaining step is to tell Uniface to store the table. This is done using the Assignment file, eg:

[ENTITIES]
.MENU $UD6:*.*

When the application is distributed to a client it is anticipated that this data would be stored in DB3 or another database - UD6 is used only as the repository for this information during development.

If the primary keys of MENU_SET or MENU_CHOICE contain spaces, then the tables must be listed in the USYS$UD6_PARAMS assignment file setting tableswithspaces.

Eg: USYS$UD6_PARAMS=tableswithspaces ;menu_choice;menu_set;, listoptions, etc etc

Further Information

How the driver works with Source Code Control
Format of the files
Modifying the XML files directly
Differences between UD6/CMtool and UD7/XML-DATA and W3C XML-DATA format
Division of the entities

UD6 Overview
How to use the driver with a configuration management solution

$Revision: 1.6 $ $Date: 2015/10/16 07:35:10 $[go to top]