Search code examples
sas

SAS - Space as the separator of decimals


I have numbers with values from 10 to 100 million in SAS datastep

It is necessary that there be a space instead of a comma or dot as a separator

For example:

10234332 -> 10 234 332

Which format I can use?

I tried to user COMMAXw.d and other formats, but it doesn't working


Solution

  • Create a picture format.

    proc format;
        picture commas
            low-high = '00 000 000 000 000'
        ;
    run;
    
    data test;
        format value commas.;
        value = 100000000;
    run;
    
    value
    100 000 000