Hi, I have a dataset like this: id regimen 1 J0000, J0001, J2000 2 J0000, J0001, J2000, J1345 3 J2000, J1345, Q1111 4 J2000, Q1111, J1345, Q1112 How can I sort each line, base on alphabet and numeric order? The result be like: 1 J0000, J0001, J2000 2 J0000, J0001, J1345, J2000 3 J1345, J2000, Q1111 4 J1345, J2000, Q1111, Q1112 I have a code like this: DATA XX; SET XX; LENGTH newname $100; ARRAY t(100) $ _TEMPORARY_; CALL MISSING(OF t(*)); DO _N_=1 to LENGTH(STRIP(regimen)); t(_N_)=CHAR(regimen,_N_); END; CALL SORTC(of t(*)); newname=CATS(of t(*)); RUN; But above code will combine by line all character and numeric together, while I still need the code to be ordered by X1234. Thanks smart people!!!
... View more