Removing unwanted characters from imported data

Reply
Contributor
Posts: 54

Removing unwanted characters from imported data

Hello,

I want to import the following data into SAS:

 

DescriptionQ12013Q22013
Industrial aggregate including unclassified businesses [00-91N]  (5,6)1507437415463301
Industrial aggregate excluding unclassified businesses [11-91N]  (5,6)1483563215219329
Goods producing industries [11-33N]  (7)27006022829935

 

 

My question: I want to import the Description column but I do not want to include the numbers/letters/commas in brackets (whether squared or round). I also don't want the brackets. How do I code an infile statement to exclude all these components so I only have written descriptions in my SAS dataset? Thanks Jack

Super User
Posts: 19,855

Re: Removing unwanted characters from imported data

Look at the SCAN function with the [ as the delimiter. 

Ask a Question
Discussion stats
  • 1 reply
  • 182 views
  • 0 likes
  • 2 in conversation