Top  Previous  Next

Transaction Processing for Clarion Files

When you issue a LOGOUT statement the Clarion file driver creates a transaction file called programname.TR$. By default this file is created in the same directory as the program. To create the transaction file elsewhere, add a CWC21 section to the WIN.INI file as follows:



where path is a directory visible to all users. This statement


creates the correct .INI file section.

During a transaction datafile.LOG files are created for each data file edited during the transaction. These LOG files always reside in the same directory as the data file.

If a system crashes while a transaction is active, no user will be able to access the files until a recovery is run on the files. See the RECOVER send command on how to do this.

LOGOUT has the effect of LOCKing the file.

Field Labels

The Clarion driver only supports fully qualified field names (prefix + label) of 16 characters or less. That is, within the Clarion file (*.DAT) header, the driver truncates prefix + label to the first 16 characters. If the first 16 characters are not unique, the truncation results in duplicate field names.

Duplicate field names within the file header can cause problems with Clarion for DOS 2.1 and earlier. In addition, it can cause problems if you import the file definition from the Clarion file (*.DAT), then compile a Clarion application based on the imported file definition containing the duplicate field names.

You can avoid duplicate field name problems by using the NAME attribute (the External Name field in the Data Dictionary's Field Properties dialog) to provide unique names for fields whose first 16 characters are duplicated. By providing unique names in the NAME attribute, your application can refer to the field by its (long) label, and the Clarion driver uses the unique NAME attribute to resolve conflicts.