BookmarkSubscribeRSS Feed

[SAS 프로그래밍 고수 백승민] [변수명] 변수명 사전순으로 정렬하기

Started ‎06-11-2020 by
Modified ‎06-11-2020 by
Views 162

* 출처 : http://cafe.daum.net/statsas/3F8j/150

* dictionary 테이블에서 "Class" 테이블의 변수명을 정렬;

 

proc sql noprint;
  select strip(name) into :vars separated by ' '
  from dictionary.columns
  where libname=upcase("sashelp")
    and memname=upcase("class")
order by 1;
quit;

%put &vars;

 

* Retain 문장을 사용하여 변수 재배열;

data back;
     retain &vars.;
 set sashelp.class;
run;

Contributors
Version history
Last update:
‎06-11-2020 03:56 AM
Updated by:

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Article Labels
Article Tags