BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
maroulator
Obsidian | Level 7

I have the following data.

Name     Age      Title

Tom         .       Analyst

Mike         .       VicePresident

John        .        AccountManager

....and I need it to look like this.

Name     Age      Title

Tom                   Analyst

Mike                   VicePresident

John                   AccountManager

By design, the variable Age is numeric and only holds blanks. I need to eliminate the dots associated with numeric blanks, such that the Age variable is completely clear (ie. the Age variable blanks need to look like numeric blanks). The only way I know to do this, however, is to introduce a new variable that contains Age's values and recast the new variable as a character and set it to blank with an if statement. It is imperative, however, that I keep Age variable in the same location within the dataset (ie between the Name and Title variables), so I am not able to get there with what I know.

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
Haikuo
Onyx | Level 15

options missing='';

ballardw
Super User

The . for missing is a system option. Inside a dataset I wouldn't worry about it. For any report procedure or data export before the procedure use:

options missing=' '; to have a single space instead of the period appear. Reset to default afterwards using option missing='.';

If you are really worried about the appearance within a data set then use the same option missing=' ';

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 355 views
  • 3 likes
  • 3 in conversation