602SQL Documentation Index  

Application Definition File (APL file)

You need not know the internal format of application definition file, provided that you want to execute only a simple export and import. However, there are cases, when it might be useful to intervene in the definition file that was created during export, and thus to influence what will be imported and how: When you want to perform application update (import with replacement), you need to have in the APL file only those objects that were changed (and without tables to prevent overwriting of data).

The application definition file has a form of text file in the UTF-8 format (characters with diacritical marks are stored in two bytes). This is necessary to bear in mind during eventual editing of this file: if the APL file contains diacritical marks, it must be saved in the UTF-8 format.

Each row of the definition file contains text in some of the following forms:

Application application_name X application_id
Domain [flags] domain_name  [file_with_object] [permissions]
Table [flags] table_name  [file_with_object] [permissions]
Data table_name  [file_with_object] [permissions]
Dataprv table_name   [file_with_object] [permissions]
Cursor [flags] query_name  [file_with_object] [permissions]
Program [flags] transfer_name   [file_with_object] [permissions]
Drawing [flags] diagram_name   [file_with_object] [permissions]
Graph [flags] auxiliary_object_name   [file_with_object] [permissions]
Proc [flags] procedure_name [file_with_object] [permissions]
Trigger [flags] trigger_name [file_with_object] [permissions]
Sequen [flags] sequence_name [file_with_object] [permissions]
Info [flags] fulltext_name [file_with_object] [permissions]
Form [flags] XML_form_name [file_with_object] [permissions]
StyleSh [flags] stylesheet_name [file_with_object] [permissions]
Folder [flags] folder_name
Role role_name  [appointment_to_role]
Icon shortcut_name:folder_name  parameters_for_602SQL 

Recording Rules

The row starting with Application must be entered as the first and it must not be repeated. It specifies the name and identification of the imported application. Provided that an application of this name or of the same identification already exists at the target computer, user will be prompted during import to specify a new name, and a new identification will be created.

The row starting with Role will create in the application the role of the specified name. Provided that user and group permissions - as well as their appointment to roles - are exported, this row lists users and groups appointed to this role. If the application is exported including permissions and - at the same time - without table data, the APL file will contain a row starting with Dataprv; this row describes permissions to data within given table.

The row starting with Folder will create in the application the folder of the specified name. Actual information of pertaining to folder is contained within the comment in the definition of individual objects.

Rows starting with Domain, Table, Cursor, Program, Drawing, Proc, Trigger, Sequen and Info import an object stated within the second column. Rows starting with Data import data in the internal format into already existing table specified in the second column (a table can be imported in one of the preceding rows).

Items marked with dot character (.) will be imported in the encrypted format.

Eventual "flags" preceding object name contain certain internal data about the object.

File Containing an Object

When exporting an application, one file will be created for each application object. This file will be located in the same directory where the application definition file is. The file name consists generally of the object name and a suffix that identifies the object category; e.g. tdf (table definition), crs (a query), pgm (a transport), tdt (data in the internal format) etc. Coding of files containing object definitions is UTF-8.

Provided that the object name contains diacritical marks or "strange" characters (such as space, slash etc.), it is not simply possible to use an object name as a file name, since the export would not be portable between Windows and Linux. The file name is in such case created like follows: characters with diacritical marks contained in the object name are replaced with characters without diacritical marks and the "strange" characters are replaced with the underscore character. The rows describing an object then contain - apart from the object name - also the file name, so that it is clear where the object definition is stored.

The procedure during import is the other way round - if the object row does not contain a file name, the system searches a file with the object name and given suffix.


The permissions to an object are specified within a row only if it is user-requested; they include either only the role permissions or the user- and group permission as well. Permission are in the following format:

({U|G|R} identification binary_permissions)

for user (U) within a group (G) and a role of (R). Do not interfere with these symbols. User- and group identification is a binary one, role identification is a text one (using their names).