BookmarkSubscribeRSS Feed
Astounding
PROC Star

For quite a few questions on this forum, the answer lies in fixing character data ... removing tabs or occasionally removing nulls.  The programming to do this isn't overwhelming, but it might be to a relatively new SAS programmer.  It shouldn't be too hard to construct a fix, along the lines of proc remove_tabs data=.  Executing the proc would involve looking at all character variables, and removing any tab characters.  There could be options to specify:

 

  • which characters get removed (tabs, nulls, other?)
  • remove tabs for the current operating system vs. for all operating systems?
  • remove all instances, vs. remove occurrences only at the end or only at the beginning of a variable
  • name of output data set after "fixing"
  • should the cleaning level become a permanent part of the metadata (probably impractical, as data sets get modified frequently)

This is really a suggestion for discussion purposes.  Under the current forum structure, I didn't see a way to make a Ballot suggestions.

2 REPLIES 2
Reeza
Super User
Community>SASWare Ballot for adding new ballot suggestions.

Interesting concept - would this be for text files before import or for SAS data sets?
Astounding
PROC Star

Thanks!

 

This would be for SAS data sets.  SAS needs to get it right (easily) when determining which fields to process.  So I would think that rules out text files.

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
  • 2 replies
  • 648 views
  • 2 likes
  • 2 in conversation