Hello, we have recently ported our application from Oracle to DB2 and we have some problems with the locale settings. My environment is Win32 with perl 5.8.0, DBI 1.37 and DBD::DB2 0.78. The DB2 version is "DB2 v8.1.6.664", "s040914", "WR21346" and FixPak "6". My problem is that the numbers formatting (in select statements) does not follow the locale of my perl program. The numbers are allways formatted with the locale for the territory with which the database was created (if created with TERRITORY=DE, the decimal point is allways a comma, if the TERRITORY=US, the decimal point is the known one). As a result, the retrierved numeric data cannot be used for inserts in the database table from which it was selected.
>From Oracle I know, that I can change the locale of the current session. I
>searched the web but did not find any usefull information with respect to DB2
>or DBD::DB2 and locale settings.
So can someone please tell me what I am doing wrong, or at least point me to
some source of information where I could continue my search?
Here are my locale settings (please note that LC_NUMERIC=C and decimal_point =>
'.'):
locale(LC_ALL) =
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
localeconv() = {
n_sep_by_space => '1'
currency_symbol => 'DM'
p_sign_posn => '1'
negative_sign => '-'
int_curr_symbol => 'DEM'
frac_digits => '2'
p_sep_by_space => '1'
n_cs_precedes => '0'
p_cs_precedes => '0'
decimal_point => '.'
mon_grouping => ''
int_frac_digits => '2'
n_sign_posn => '1'
mon_thousands_sep => '.'
mon_decimal_point => ','
}
My little application is attached to this mail. It is used to export data from
a database in a xml format. A corresponding program is used to import the data.
Thank you for any answer.
Servus -- Alfred
--
Alfred Mickautsch
Schuler Business Solutions AG
Karl-Berner-Str. 4
D-72285 Pfalzgrafenweiler
tel: +49 (0)74 45 830-184
fax: +49 (0)74 45 830-349
e-mail: [EMAIL PROTECTED]
dbtabsave.pl
Description: dbtabsave.pl
