Help using Base SAS procedures

question about recoding a variable

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

question about recoding a variable

Hi,

I’d appreciate any suggestions on recoding a variable in the following manner:

Have

Var_A

00 Education ABC

00 Education XYZ

00 Education ABC

00 Education MNO

00 Education IJK

Want

Var_A

ABC

XYZ

ABC

MNO

IJK

Thank you,


Accepted Solutions
Solution
‎01-28-2015 11:18 PM
Super User
Posts: 19,772

Re: question about recoding a variable


All Replies
Solution
‎01-28-2015 11:18 PM
Super User
Posts: 19,772

Re: question about recoding a variable

Look at the scan function

SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition

var_a=scan(var_a, 3); 

New Contributor
Posts: 2

Re: question about recoding a variable

Thank you Smiley Happy

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 189 views
  • 0 likes
  • 2 in conversation