Data File Types

Navigation:  How to Work with Data Files >

Data File Types

Previous pageReturn to chapter overviewNext page

 

Overview

 

MCL-Designer V4 supports 3 types of files:

 

• Capture files

 

• Lookup files  

 

• Print files  

 

 

"Capture" and "Lookup" Files

 

Capture files and Lookup files use a structured record format. Every field in the record can have a fixed or variable length and the number of fields in the record is fixed. This results in a fixed record length structure.

Capture and Lookup files can be sorted on 1, 2, 3 or 4 key fields. These key fields must be at the beginning of the records. When a file search is requested on a sorted file and the search criteria uses the record keys, the device will automatically execute a binary search on the file. If the search criteria does not use the key field(s), a sequential search is performed instead.

Capture files can also be used as Lookup files. A typical example for this is when, before creating a new record in the file, the program must check if a record with the same key already exists.

Lookup files can also be used as Capture files. For example, when performing an inventory, a new item is found in stock and added to the item data file.

The sorted files are maintained in ascending order. The key field(s) are considered as containing string data for the sorting. This means that the following key “222” is less than key “3”.

MCL-Runtime does not use indexes to search for records. The sorted files are maintained in the correct physical order of their keys. When a record is deleted, the complete file is reorganized.

When a new record is added to the file, it is inserted in the right place inside the file.

This provides the possibility to use a real binary search on sorted files.

 

"Print" files

 

Print files use a variable length record format. MCL-Runtime handles each record of a Print file as a "single field" record.

Usually, these files are used to store labels to be printed.

The application may create a Print file to store data that needs to be sent to the host and where a special format is expected. As an example, the application may create a file that needs to be sent to the host where it will be imported into an Excel sheet.

 

 

Differences between Capture & Lookup files

 

Starting the Simulator

When the simulator is started, the user may decide to delete all Capture files to start each session with a clean environment.

The user may also decide to keep the Capture files from the previous simulation to continue the tests.

The Lookup files are never deleted when the Simulator is started.

 

Loading the Project into the Device

When the “Load” option (located in the Icon Shortcut Bar) is selected, all Lookup files are sent to the terminal. (It is also possible to load a project by going to the Menu Bar, opening the "Project" menu and selecting the "Load to Device" option.)

Regarding Capture files, only the file structure is sent to the device, when loading the project.