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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.