Hello
When I coding, I have problem.
I load excel file in sas.
When I load excel file, the data set present period (.) in blank cell.
But I want to remove this period.
How can I remove period in numeric format??
Please, Help me. Everyone~~
The period is essential when working with SAS, as it is the displayed character for missing numerical values. All SAS programmers expect missing values to be displayed as a dot, if no special option is set.
That option is
options missing = ' ';
See this example code:
data have;
input x1;
cards;
1
2
.
;
run;
proc print data=have;
run;
options missing = ' ';
proc print data=have;
run;
Result:
Beob. x1 1 1 2 2 3 Beob. x1 1 1 2 2 3
The period is essential when working with SAS, as it is the displayed character for missing numerical values. All SAS programmers expect missing values to be displayed as a dot, if no special option is set.
That option is
options missing = ' ';
See this example code:
data have;
input x1;
cards;
1
2
.
;
run;
proc print data=have;
run;
options missing = ' ';
proc print data=have;
run;
Result:
Beob. x1 1 1 2 2 3 Beob. x1 1 1 2 2 3
Remember that the . is SASs representation of a missing numeric value. However, you can do something like this
options missing='';
data test;
var=1;output; /* Non missing value */
var=.;output; /* Missing value */
run;
proc print data=test;
run;
Or use a custom format to displayed desired text instead:
proc format library=work; value m . = 'Missing' ; run; data test; var=1;output; /* Non missing value */ var=.;output; /* Missing value */ run; proc print data=test; format var m.; run;
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.