Thursday, June 25, 2009

SUBSTR function can be used on both side of assignment statment

data name;
name = "vikus";
substr(name,4,1) = "a";
run;

proc print ;
run;

This will change u to a in name variable.

data name;
name = "Vikas Gaddu";
firstname = substr(name,1,5);
run;

proc print;
run;

Firstname variable will contain Vikas.

No comments:

Post a Comment