#!/usr/bin/perl -w
$ahd_bin = "d:/CA/Servic~1/bin";
$my_path = "d:/CA/Servic~1/site/mods/TEST_Imp";
$codepage = $my_path."/"."test_codepage.txt";
$import = $my_path."/"."test__load_cnt_5.txt"; # for test:only 1 record in pdm_load format with last_name="ÄÖÜäöüß"
# because: look for in notepad++
# in test__error*.txt: last_name: [Ä
$convert = $my_path."/"."test__convert";
$error_dat = $my_path."/"."test__error";
system("$ahd_bin\\pdm_uconv -L \> $codepage");
open(CODEP,"<$codepage") || die "File '$codepage' is not readable!";
foreach $rec(<CODEP>) {
chomp($rec);
@arr = split(/ /,$rec);
$count=$#arr +1;
for ($i=0;$i<=$count;$i++) {
$code_p = $arr[$i];
$convert_n = $convert . "__$code_p" . ".txt";
$error_msg = $error_dat . "__$code_p" . ".txt";
system("$ahd_bin\\pdm_uconv -f $code_p -t UTF-8 -o $convert_n $import");
system("$ahd_bin\\pdm_load -v -f $convert_n 2\> $error_msg");
}
}
Now you can use notepad++ to look for the umlauts in the results or for example in the 'test__error...' for update:1
Not all of the codepages convert the file correct for pdm_load.
Now my import scripts are running!!