hi i have a simple data set then how can i separate the data set values to each variable like dep_id ,dept_name,dep_qty.Please help ? data a; input info $1 - 50; cards; 101 pencil 57 102 parker pen 24 103 hp studion shuffle n 10 104 samsung galexy ace 29 run; i already solved the problem.But i need to know any easy way of doing the task simply. i put my code on below..Please do check it and make some replies data b; set a; pdt_id=input(scan(info,1,' '),3.); xyz=substr(info,5); pdt_nam=length(substr(info,5)); name=input(substr(xyz,1,pdt_nam-2),$20.); pdt_qty=input(substr(xyz,anydigit(xyz)),2.); label pdt_id=Product Id name=Product Name pdt_qty=Product Quantity; drop pdt_nam; drop info; drop xyz; runn; Krishnachandran
... View more