This works: data have; infile cards dlm=','; format No 3. CustomerID $6. Product $25. Category $3. Age $6. Income commax10. DSA $6. City $3. SECODE $2. SEAGE 3. Qualification 2. Pricing $10. ; informat income commax10.; * because of dot; input No CustomeriD Product Category Age Income DSA City SECODE SEAGE Qualification Pricing ; cards; 1,MUM001,Savings Account,NMC,21-30,388.662,ZARETH,MUM,Z9,59,4,Discount 2,MUM002,LIC,NMC,51-60,98.530,CRACKF,MUM,C2,37,2,Discount ; run; proc sql; create view want as select product, category,income, age, case when age eq 'gt 60' then 'Top' when age eq '51-60' then 'Medium' when age eq '41-50' then 'Below Medium' else 'Low' end as Aged from have; quit; proc print data=want noobs; run; and renders the following result: Product Category Income Age Aged Savings Account NMC 388.662 21-30 Low LIC NMC 98.530 51-60 Medium
... View more