Loader

How to Convert loader files with the external XML loader

 

What to do:

In order to work through this example you must have prepared the configuration file as described in the Manager Information.
The configuration file has to be placed in the directory <ep_root>/axalant/ini/LoaOldEncoding.cfg!
Please note that prior to any user data conversion, the repository data (entity, table, field ...) must exist. Also it must be checked if the tables and fields have been created on the database. This is an essential prerequesite for any data conversion as otherwise the loader won't be able to identify the type of data to be imported/converted!
Please note that the script to start the loader (loader.bat/loader.sh) is located in the following directories:
 

Windows: <ep_root>/axalant/cmd/loader.bat

Unix: <ep_root>/axalant/scripts/loader.sh

  In the following example an "old" binary loader file is converted to the new binary loader file format.
Open the command line/shell and enter the parameters according to the following syntax:
loader <app_name> --convert <filename.bld> <filename.bin>
 

In our example the values for the parameters are:

loader app_name --convert myloaderfile.bld myloaderfile.bin

In case an error comes up, a possible reason might be that the file was not found. Read the error message carefully as it contains the search path!

If you have successfully converted the old loader file the result will be displayed on the command line of the loader.

  It is an old loader file! Encoding configuration file <ep_root>/axalant/ini/LoaOldEncoding.cfg could not be found.
Default encoding for all language specific fields is: windows code page 1252, Latin1

Reading Binary loader file

T_TABLE_1.......... (10 )
T_TABLE_2..... (5 )

Writing the data into binary loader file: "<ep_root>/<app_name>/dmp/myloaderfile.bin"

T_TABLE_1.......... (10 )
T_TABLE_2..... (5 )

Done.
   

In case some old ASCII loader files could not be converted due to blob field tables (displayed in the error message), do the following:

  1. Load the file into an Agile e6.0.4 or older version with the old loa_ora executable
  2. Set up the new loader for the old Agile e6.x or older version:

    In the environment <ep_root>\init you will find a script with the name of the new e6.1 environment <app_name>.xml. In this script the connection parameter for the data base are placed for the XML loader (search for database section). You must change the values for the old environment (we recommend to copy the original entries for later reset). If everything is changed and the same export script is used with the XML loader, an already converted loader file will be directly created by the XML loader from the data of the old database.

  3. Export the data from the old Agile e6.x, e5.x or even much older version with the XML loader:
    loader <e6.1-application> --export <old-export-script>.exp

  4. Don't forget to reset all values after you are finished!
Please note that the application name for the XML loader is always the application name of the new Agile e6.1 application!
Check if the conversion was successful by comparing the entries of the old and the converted loader file.
 

Dependent on your editor, German umlauts or other special signs will be readable or not. In case the signs are readable, the line length must differ (every umlaut reduces the line length by 1). In case they are not readable, it should be always 2 signs for ä,ü,ö,ß (even 3 for €). The first symbol for ä,ü,ö,ß is always a à (capital A with a ~ on top).

In case of binary loader files you can compare the old and the new file directly whereas in case of ASCII loader files a different procedure applies.

  • ASCII loader files without blob fields:
    Convert the old ASCII loader file and also the new binary loader file into XML format. The converter does not add anything nor changes the order! Now every record uses only one line. Sort them alphanumerically, because ASCII loader and binary loader have a different order. A direct comparison is now possible.

  • ASCII loader files with blob fields:
    A problem is that during loading the old ASCII loader file into the old Agile e6.x version the C_ID's are changed. Therefore, a simple comparison is not possible anymore. To solve this problem, you have to remove the tables with blob fields from the export table list in the export file and do the export again with the old ASCII loader (loa_ora) in your old environment (e6.0.x or older version). Then you can convert the newly created old ASCII loader file and the previously created new binary loader file into the XML format. The converter does not add anything nor changes the order! Now the record have the same C_ID's and every record uses only one line. Sort them alphanumerically, because ASCII loader and binary loader have a different order. A direct comparison is now possible. The old ASCII and new binary loader file have a different format, they can only be compared manually.
 

Further known differences between binary and ASCII loader files:

  • Logic field type = L(ogic) not S(tring)
  • Longtext fields which have been limited in ASCII loader files to 765 digits are now limited to 2000 digits
  • C_LEN_VIS is of type F not I
Please note the follwing redirection into a binary file when trying to convert an old ASCII loader file to the XML file format!
 

It is an old loader file! Encoding is:
single language strings _DEFAULT: cp1252
single language strings _GER : cp1252
single language strings _ENG : cp1252
single language strings _FRA : cp1252
single language strings _ESP : ISO8859-15
single language strings _JAP : ISO8859-15
single language strings _LN1 : ISO8859-15
single language strings _LN2 : ISO8859-15
single language strings _LN3 : ISO8859-15
single language strings _LN4 : ISO8859-15
single language strings _LN5 : UTF8

Importing ASCII loader file (Ctrl-V)

T_TABLE_1............................................................................ (76 )
T_TABLE_2...................................... (38 )

ATTENTION: Conversion from ASCII to XML is not supported!

Export will be redirected automatically into a binary loader file!

File name suffix corrected! New file name is: "<ep_root>/<aplication_name>/dmp/myloaderfile.bin"
Writing the data into binary loader file: "<ep_root>/<aplication_name>/dmp/myloaderfile.bin"

T_TABLE_1............................................................................ (76 )
T_TABLE_2...................................... (38 )

Done.