Hi all, A few years ago I recall seeing a new option which inserts commas in SAS log observation counts. eg Instead of :
NOTE: The data set WORK.A has 345236011 observations and 3 variables.
We would see:
NOTE: The data set WORK.A has 345,236,011 observations and 3 variables.
I've tried searching for this in the SAS Docs but cant find the name of this sas option. Can anyone enlighten me?
thanks rob
The option is LOGNUMBERFORMAT.
86 options lognumberformat;
87 data test;
88 do i=1 to 1000;
89 output;
90 end;
91 run;
NOTE: The data set WORK.TEST has 1,000 observations and 1 variables.
The option is LOGNUMBERFORMAT.
86 options lognumberformat;
87 data test;
88 do i=1 to 1000;
89 output;
90 end;
91 run;
NOTE: The data set WORK.TEST has 1,000 observations and 1 variables.
Thanks. That option works with OPTIONS statement and GETOPTION() function. It does not work with the OPTIONS procedure however. Even though the OPTIONS procedure has its own LOGNUMBERFORMAT optional keyword that you can add to the PROC OPTIONS statement.
Also note that numeric option values printed by the PROC OPTIONS procedure will that are modified by this LOGNUMBERFORMAT option will not work with the OPTIONS statement.
For example try:
options obs=max lognumberformat;
proc options option=obs; run;
You will get something like:
OBS=9,223,372,036,854,775,807
printed to the SAS log.
If you then try to run
options OBS=9,223,372,036,854,775,807 ;
The commas will generate errors.
LOGNUMBERFORMAT is still considered internal and is not documented with PROC OPTIONS because it is limited in scope. It is only intended to affect the formatting of a limited number of numeric values in the log. It does not translate to other system or data set options, such as OBS= or FIRSTOBS=.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.