This function defines the file formats used by the import and export functions for an object to integrate or extract data from the software database.
A file that can be used by the import module and generated by the export module is based on a file with one of the following structures:
The import/export module uses the notion of objects to update the database. An object is defined by a group of tables and screens, as well as the standard actions associated with the fields and the update. In addition, there is the guarantee that all the controls and actions necessary during the database update are carried out because a single description for the object is used to both generate the code relative to an online update and an update by import.
When an object only updates a single table, the import template describes the list of fields from the table to be integrated, remembering that a block of data from the file to be imported or exported contains the data for a record; When several tables are updated by an object (for example the header and the lines), several blocks of data will be found for an instance of the object to be integrated (for example a block defining the header and N blocks, one for each line).
It is also possible to import a table without associating the notion of an object with it. The empty object field is left for this purpose and the table and the fields concerned are entered in the grid in the second section. The import is then made without any control apart from those deduced from the formats associated with the data types of the fields in the table.
Refer to documentation Implementation
An import/export template is identified by an alphanumeric code. Other than a title, two sections are used to define the technical characteristics of the template.
| Template (field EXT) |
|
This code identifies the import/export template. |
| Description (field INTIT) |
|
[object Object] |
| Active (field ENAFLG) |
|
Select this check box to activate the current record. Disabled records keep their content and setup but cannot be used by recalling their code:
The authorizations for a given function can prohibit the creation of an active record. In this case, the check box is disabled by default. It can only be modified by an authorized user or through a signature workflow. |
| Factory owner (field AFACTORYOW) |
This section defines the following general characteristics of the template:
General
| Object (field OBJ) |
|
This field indicates the object code to be imported or exported. This field is optional for exports. The identifying block displays the name of the main table to export. |
| Function (field FONCTION) |
|
This field initializes the context and checks the access rights. It is useful if the same object is used by several functions. Indeed, users must have the appropriate rights to access the function to be able to use the template. This field is mandatory. |
| Module (field MODULE) |
|
[object Object] |
| Activity code (field CODACT) |
|
An activity code is used to:
If the activity code is disabled:
|
| Access code (field ACS) |
|
This access code makes it possible to prohibit access to the current record for some users. As a matter of fact, if the field is completed, only the users having this access code with read rights (respectively write rights) can view (respectively modify) the concerned record. This access code makes it possible to prohibit access to the current record for some users. If the field is populated only users that have this access code with read access rights (and write access rights respectively) can view (or with write access rights, modify) the record. The execution right associated with a user code is processed in a particular way in the case of the import/export templates: If a user has not been granted the execution right, he cannot use the template to import or export data. |
| Standard script (field TRTIMP) |
|
This field defines the standard process that includes the labels of the actions called in import/export processes. These processes are used to carry out initializations, additional controls, and if required, updates. The structure of such a program is in the technical appendix. The standard processes usually named IMPXXX, XXX being the import code, are supplied for a certain number of imports. For additional information on these actions, refer to the corresponding appended documentation. |
| Specific script (field SPEIMP) |
|
This field defines the specific/custom process that is called before the standard process, and which is used to carry out the same actions by de-activating if necessary what is carried out by the standard process. The possible actions are initializations, additional controls, and updates if required. For additional information on these actions, refer to the corresponding appended documentation. |
Structure
| File type (field TYPFIL) |
|
This field defines the structure used to manage the data in the file to be imported or exported. For further information, refer to the corresponding paragraph. |
| Field separator (field SEPFLD) |
|
Specify the character used as the separator between two fields. To enter a non-printable character, enter a backslash followed by three numbers representing the ASCII code of the character with decimal bases. |
| Record separator (field SEPREC) |
|
Specify the separator used between two records (data groups). To enter a non-printable character, enter a backslash followed by three numbers representing the ASCII code of the character with decimal bases. The commonly used separators are:
|
| Field delimiter (field FLDLIM) |
|
The field delimiter is added in the first and last position for alphanumeric fields. For numeric and date fields, no delimiter is required. It is usually one of the following characters:
|
| File format (field CODDBA) |
|
Enter the format of the characters used in the file:
|
Export
Transcoding
| Character set (field OPTCHA) |
|
When the ASCII character set is used, you can apply various standardized formats:
|
| Decimal separator (field SEPDEC) |
|
This field defines the decimal separator used for numbers. If this field is empty, the system considers that the decimal separator is a full stop. |
| Date format (field OPTDAT) |
|
This field defines how the date type fields are coded. You can only specify the order and the number of characters in the year. For the import, any separation characters between fields are filtered. Dates in the DD-MM-YY or DD/MM/YYYY formats are correctly decoded. The decoding sub-program takes the engine's adxdcs variable into account. This variable is set via the DCS parameter that is found in the general parameters to define how a year is decoded over two characters. DCS represents the pivot year that defines the century change. For example, if DCS is equal to 1940, any year made up of two numbers:
It is then possible to express the years between 1940 and 2039 with two numbers. |
| field LIBDAT |
|
Title associated with the previous code. |
| Local menu format (field OPTMNL) |
|
The fields of local menu type are stored as a number representing their rank in the table. According to the value of this field, the template will export or expect to find an import.
The local menu titles are only the labels used in display, and the value stored in the database being the rank in the table. It is possible to change the title of the local menus at the time of an import for the search algorithm to operate correctly. Changing local menu titles can only be done in single-user mode. This is not designed for regular or automatic transfers. |
| field LIBMNL |
|
Title associated with the previous code. |
Import
| Import (field IMPORT) |
|
If this field is checked, it is possible to use this template to import data. |
| Update allowed (field OPTUPD) |
|
Use this field to modify an already existing record during import. |
| Temp storage space (field AOWSTA) |
|
When this box is checked, the data import feeds the import/export storage space with the wrong data. The fact that the storage space is fed does not prevent the creation of an error file. |
| Special import (field OPTSPE) |
|
This field indicates that the data integration into the database is made using specific/custom actions defined in the process whose name is given in the Import process field. This specific/custom process includes a restricted number of entry points and therefore requires the writing of a process including all the controls that should be carried out. Its use resides in the fact that it is possible to group controls to optimize the import program. The structure of the specific/custom imports is described in the appendix. You can find the following actions:
|
| Authorized creation (field OPTCRE) |
|
When this check box is selected, the import/export template can be used to create new records in the database. |
| Workflow (field ENAWRK) |
|
If this box is unchecked, the workflow events related to basic operations such as creation or modification in object management mode are no longer called. If imports are started and generate mass updates, this avoids the release of several events of this type. This can impair the performance of the import and cause the mass sending of messages. However, this does not mean that the workflow events related to the import's release are disabled. |
Grid Identifiers
| No. (field NUMFLG) |
|
Current line of the grid. |
| Level (field FLGLEV) |
|
This field defines the group's overlapping level. Level 1 is the main level. An N+1 level defines a sub-level of the preceding N level. |
| Indicator (field FLGREC) |
|
This field identifies the group by a code containing a maximum of five characters. This code will be mentioned in the field grid of the following tab, and in the file itself, as a group header. |
| Table (field FLGFIL) |
|
This indicator grid defines the structure of the record groups. Refer to the corresponding paragraph. |
| Key (field FLGKEY) |
|
This field defines the key of the linked table used to access the detail of the group records from values of the upper-level tables used in the link expression. |
| Link (field FLGLNK) |
|
This field defines the link expression. It is a series of values separated by a semicolon that gives the key values linking the detail table to the header record. |
| Length (field RECLEN) |
|
For a file with a fixed length, you need to indicate the number of characters for each record. |
The different fields to be imported are defined in this grid. They are organized in groups identified by the Code column in which one of the codes defined in the indicator grid of the first section is found. The field can remain blank if no table has been defined.
This section contains the grid defining the detailed structure of the groups existing in the first section. Note that:
Grid Fields
| No. (field NUMLIG) | ||||||||||||||||||||||||||||||
|
Current line of the grid. |
||||||||||||||||||||||||||||||
| Indicator (field TYP) | ||||||||||||||||||||||||||||||
|
This field is only entered if the group indicator grid in the previous tab is not empty. It is used to attach the information to be exported or imported to a group of data. |
||||||||||||||||||||||||||||||
| Table (field FIL) | ||||||||||||||||||||||||||||||
|
This field defines the database table where the data to be imported or exported is defined. Note that:
|
||||||||||||||||||||||||||||||
| Field (field FLD) | ||||||||||||||||||||||||||||||
|
This field indicates the name of the field of the table to be imported or exported. Different syntaxes are possible to define the information to be extracted or integrated:
|
||||||||||||||||||||||||||||||
| Description (field COM) | ||||||||||||||||||||||||||||||
|
Add a comment to make the configuration easier to understand. |
||||||||||||||||||||||||||||||
| Range (field SEL) | ||||||||||||||||||||||||||||||
|
Three choices are possible in this field:
|
||||||||||||||||||||||||||||||
| Position (field LOC) | ||||||||||||||||||||||||||||||
|
This column is only useful in the case of a fixed-length format. In this case, the position gives the gap concerning the start of the block or the record. The position is in numbers of bytes, 1 being the start of the section or record. The positions must be compatible with the size of the record. |
||||||||||||||||||||||||||||||
| Length (field LNG) | ||||||||||||||||||||||||||||||
|
This field determines the length of the field for a sequential file. |
||||||||||||||||||||||||||||||
| Format (field FMT) | ||||||||||||||||||||||||||||||
|
This column is only entered if the format is fixed length. For numeric amounts, the format entered is defined in the nnn or nnn.mmm format, remembering that these numbers can be:
For an alphanumeric format, the only formatting directives that are possible are < or > (left or right alignment, remembering that the character strings are completed with spaces). |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
This field is used when imports/exports are carried out under the XML format. When an XML file is created, more information is required. For example, to create an XSD file describing the structure of the XML file and then control its validity with syntax check tools integrated into the different ETL software. This field defines whether a template has to be associated with the description entered in the XSD description. If this field is entered, the XSD field will contain a specification of the following type: You can find in online tutorials (like this one) syntaxes to use for patterns. |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
This field is used when imports/exports are carried out under the XML format. When an XML file is created, more information is required. For example, to create an XSD file describing the structure of the XML file and then control its validity with syntax check tools integrated into the different ETL software. This field defines the code of the tag describing the field exported in the template as it appears in the XML file. |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
This field is used when imports/exports are carried out under the XML format. When an XML file is created, more information is required. For example, to create an XSD file describing the structure of the XML file and then control its validity with syntax check tools integrated into the different ETL software. This field defines whether the field is mandatory or not. If the value of this field is set to Yes, the XSL file will contain a specification of minOccurs="1" type. |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
This number, if it exists, refers to a transcoding table used to transcode the field that is read and make it comply with the expected format. |
File generation
| field TYPEXP |
|
Select the type of export that you want to do. It can be:
|
| Data file (field FILEXT) |
|
This field defines the path of the default data file proposed during the launch of the import or export. This data file is used in automatic mode when launching an import or export chain. This file path can be relative. In this case, the database directory is supposed to be the database directory for the software's installation. The path can include the # character. In this case, there will be a sequential number management:
For example, if the export sequence number is equal to 156, /u/tmp/fil# makes it possible to generate the /u/tmp/fil156 file. |
| Final directory (field REPFIN) |
|
This field forces the final directory to which the file will be transferred after having been imported. If no value is defined, the directory mentioned in the import/export general parameters is used. |
| Select a Field | ||
|
Block number 1
|
Use this field to insert, from the current line in the grid, a group of fields coming from a template's table.
This function is only present for templates with fixed-length file types. It recalculates the position of each of the fields in the current data group (sharing the same line indicator). The recalculation is carried out from position 1 in the first field of the group and adds the length of each field to obtain the following field's position.
By default, the following reports are associated with this function :
PRTSCR : Screen print
This can be changed using a different setup.
|
Validation |
Click this button to validate your import/export template. |
|
This button is used to copy the record definition from or to another folder. Block number 1
Block number 2
|
This button gives access to a screen in which it is possible to define the default values for the criteria to filter the exported data.
Grid Range
Grid Criteria
| Tables (field FICHIER) |
|
The tables used in the import/export template are listed here to enable the filtering of the exported data. |
| Criterion (field FLGEXP) |
|
This field defines a logical condition using the table fields. Only the lines meeting this condition will be exported. |