Specify comma as decimal separator in all outputs (SAS 9.4)

Solution 1:

Relevant options:

NLDECSEPARATOR option - tells SAS to respect the locale when deciding what separator to use

LOCALE option - tells SAS what country/etc. you're "in"

NLNUM format - one format that tells SAS to respect the locale

Different combinations of these will work... for example, this works:

options locale="FR_FR";
options NLDECSEPARATOR ;
data test;
  x = 3.5;
  output;
run;

proc print data=test;
run;

As does this:

options locale="FR_FR";

data test;
  x = 3.5;
  format x nlnum6.2;
  output;
run;

proc print data=test;
run;

The key is the locale (which may well be already set at startup), and then one of the other options to tell SAS you care about the decimal.