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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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