BookmarkSubscribeRSS Feed
suncawy
Obsidian | Level 7

Per request by the customer, the data set contains numeric nulls with a "." , but the customer wants it to be blank or null without the default numeric null of "."  I've tried options missing = ' ', but that still has the numeric null with the period.

Is there another method ?

Thanks.

7 REPLIES 7
Reeza
Super User

Options missing should work, can you show what you've tried that didn't work. There's something else that's going on then. Can you also confirm the data type of the variables you're trying to modify?

Are they all character/numeric or a mix?

 


@suncawy wrote:

Per request by the customer, the data set contains numeric nulls with a "." , but the customer wants it to be blank or null without the default numeric null of "."  I've tried options missing = ' ', but that still has the numeric null with the period.

Is there another method ?

Thanks.


 

 

ChrisNZ
Tourmaline | Level 20

SAS represents missing numeric data as dots (or as uppercase letters for special missing values). 

If you use options missing=' ';  then SAS represents missing values as a space. Using the # character:

options missing='#';
data T; X=.; run;

ChrisNZ_0-1608702213069.png

 

 

suncawy
Obsidian | Level 7

Using this:  OPTIONS MISSING='';

 

Its showing this:

suncawy_0-1608739729022.png

 

Tom
Super User Tom
Super User

You cannot change how missing values are stored in the dataset.  But you can use the MISSING option to change what character is used to print missing values.

PhilC
Rhodochrosite | Level 12

@suncawy , is it that you are delivering a SAS "dataset" with the extension "sas7bdat" to your customer?    

suncawy
Obsidian | Level 7

The dataset isn't being sent to the customer.   

From the dataset, its creating a flat file, basically a text file.

PhilC
Rhodochrosite | Level 12

What process are you using to create the flat-file?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2581 views
  • 1 like
  • 5 in conversation