> what about the decimal_separator defined as comma
> options( delimiter=";" decimal_separator=',');
this option helps the tagsets code recognise a decimal separator in the data it reads (from procedure output). It is not about passing the value to the "output" of the tagset.
Achieve control of tagset output with the preferred SAS format for adapting the thousand or decimal separators, i.e. numXw.d or commaXw.d or even nlNumw.d
Although there are (in SAS913) formats bestXw. and nlNumW. neither provide the objective of an equivalent of the way format bestW. provides only the relevant decimal fraction.
Adapting Andre's example to demonstrate these formats:
data a ;
a=213.978; b="Nullité"; c= 567.891 ; d= c; e=c ;
label a='a numX20.4' b='string B' c='c nlNum20.4' d='d best.' e='e bestX.' ;
run;
filename andr 'csvtest1.csv.txt' lrecl=10000 ;
option ls=95;* dfLang= French ;
ods csv file= andr
options( delimiter=";" decimal_separator=',');
proc print data=a width= full label split='=' ;
format a numX20.4 c nlNum20.4 d best. e bestX.;
run;
ods csv close;
proc fslist file= andr ;
run;
[/pre] the results on my english platform with DFlang=French is[pre]+FSLIST: C:\Applications\UK.Liquidity2\code\csvtest1.csv.txt-------+
|"Obs","a numX20.4","string B","c nlNum20.4","d best.","e bestX." |
|"1","213,9780","Nullité","567.8910","567.891","568" |
| |
| *** END OF FILE *** |
+------------------------------------------------------------------+[/pre]
However, when I run this code after running the CSV tagsets update at
http://support.sas.com/rnd/base/ods/odsmarkup/csvtags.tpl I get the semicolon delimiters, but
lose the first comma in the data !!!
[PRE]+FSLIST: C:\Applications\UK.Liquidity2\code\csvtest1.csv.txt-------+
|"Obs";"a numX20.4";"string B";"c nlNum20.4";"d best.";"e bestX." |
|"1";2139780;"Nullité";"567.8910";"567.891";568 |
| |
| *** END OF FILE *** |
+------------------------------------------------------------------+[/PRE]