Prev: Data structure
Next: Russell Investments has a Sr. SAS Developer/Business Analyst opening for Seattle
From: rangoon rangoon on 16 Jun 2010 13:37 hi all, i want to create three different variable from one variable. data have; xx = "DI, OT, TH"; run; data want; xx1 = "DI"; XX2 = "OT"; XX3 = "TH"; RUN; Thanks, Rang
From: billyk43 on 16 Jun 2010 14:19
Use the SCAN function: data want; xx = "DI, OT, TH"; xx1 = scan(xx,1); XX2 = scan(xx,2); XX3 = scan(xx,3); drop xx; run; HTH, Keith On Jun 16, 1:37 pm, rangoon rangoon <rangoonraja...(a)gmail.com> wrote: > hi all, > > i want to create three different variable from one variable. > > data have; > xx = "DI, OT, TH"; > run; > > data want; > xx1 = "DI"; > XX2 = "OT"; > XX3 = "TH"; > RUN; > > Thanks, > Rang |