RE: Locale variables
Posted in 1999
Thanks Octav. Good idea! I don't have 4GL. But I tried out a similar piece of code in a stored procedure and it does work. It, however, involves creating this stored procedure in ALL the databases. Unless I get a better solution from the Informix gurus out there, I shall be falling back upon this one. Alanoly J. Andrews > -----Original Message----- > From: Octav Chiriac [SMTP:com@netinfo-moldova.com] > Sent: Friday, September 24, 1999 10:52 AM > To: Alanoly Andrews > Cc: informix-list@iiug.org > Subject: Re: Locale variables > > If it is in 4GL: > > DEFINE d DECIMAL(1,1) > DEFINE c CHAR(4) > > LET d = 0.1 > LET c = d > LET c = c[2] -- Getting decimal point > DISPLAY "DECIMAL POINT IS ", c > > If it is not you can try taking under control the decimal point > with DBMONEY env. variable (of course I understand it couldn't > be suitable for you, but as a variant ..) > > Best Regards, > Octav > > > On Fri, Sep 24, 1999 at 10:11:33AM -0400, Alanoly Andrews wrote: > > > > Hi, > > > > A question about "locale" settings: > > > > One of our programs needs to know at runtime > > what the "decimal separator" is (whether it is a > > period or a comma or something else) in a decimal > > datatype. We do not know in advance what > > "CLIENT_LOCALE" or 'SERVER_LOCALE" a user > > may set for a session. We know that using the > > "CLIENT_LOCALE" value, it is possible to traverse > > the informix directories and read a file called "lg_tr.lc" > > to get the decimal separator. Is there an easier way, > > such as an environment variable or a function call > > which will return the "decimal separator" character for a > > particular "locale" setting? > > > > Thanks. > > > > IDS 7.31 UC2 > > AIX 4.3.2 > > > > > > Alanoly J. Andrews > > -- > Octav Chiriac Phone: (373) 2 22 99 67 > NetInfo S.R.L. Fax: (373) 2 21 36 59 > Chisinau (373) 2 22 84 88 > Moldova, Republic of mailto:com@netinfo-moldova.com