Hema
You only learn it by solving it yourself - or at least invest some time trying to find out.
You'll find everything in the Online Doc and there are normally also examples.
But let's assume you waited too long before starting with work....
data have;
var="something|to|be|written|here.";
run;
data want;
set have;
length newvar $ 10;
keep newvar;
do i=1 to length(var) while(scan(var,i,'|') ne '' );
newvar=scan(var,i,'|');
output;
end;
run;
proc print data=want;
run;