What is the best way to get rid of a missing value in SAS?

morinia
morinia used Ask the Experts™
on
When SAS creates a  missing value ina column what is the best way to get rid of the
'.' ?

If the field is empty I would like it to be empty and not ".".
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
the '.' is just a representation of NULL, so there's no way of removing it...
Hi

I know this is closed - but this may help....

The period '.' is just SAS's representation for missing.  If you want to change that representation, you can change it in the OPTIONS statement:

OPTIONS MISSING = " ";

or:

OPTIONS MISSING = 'X';

The MISSING character length can only be a length of 1 character.


options missing = '.';

DATA test;
 x = 10/0;
 put x=;
 RUN;

 options missing = ' ';

DATA test;
 x = 10/0;
 put x=;
 RUN;

Open in new window

i guess it's a subjective interpretation ;)

i was reading it as removing it so there's no way of removing it... but in terms of presentation, you are right to use options missing...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial