BookmarkSubscribeRSS Feed

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

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

* 출처 : 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;

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

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Article Labels
Article Tags