DATA Step, Macro, Functions and more

text functions

Reply
Contributor
Posts: 50

text functions

 

 hi,

this is the data set 

name:

Nicholas,KregFL

Reddy,RamanBT

Strehle,FlorainGE

Debergh,ChristopherFL

 

MY CODE IS :

Data First_name3;
set Starting_position;
First_name=SUBSTR(Name,Starting_postion,",");
Run;

i am not getting the first name from this code.

please help ?

 how to create a new variable first name from  name variable using SUBSTR function ?

 

 

 

Super User
Posts: 17,840

Re: text functions

Use the Scan function

Contributor
Posts: 50

Re: text functions

hi,

what should be the code ?

 

Ask a Question
Discussion stats
  • 3 replies
  • 197 views
  • 2 likes
  • 2 in conversation