BookmarkSubscribeRSS Feed

[SAS 프로그래밍 고수 백승민] [ RENAME ] 변수명 일괄 변경하기

Started ‎06-11-2020 by
Modified ‎06-12-2020 by
Views 146

/* 접두어 사용 */
data back;
a1='1';
a2='2';
a3='3';
run;

 

data back1;
 set back;
     rename a1-a3=b1-b3;
run;

 

* 숫자 변수에 대한 배열처리(변경되는 변수의 형태가 모두 같아야함 - 문자와 숫자 변수는 따로 처리해야함);

 

DATA BACK;
 SET SASHELP.CLASS;
     ARRAY REG[*] _NUMERIC_;
     ARRAY VAR[3] VAR1-VAR3;
     DO I=1 TO 3;
        VAR[I]=REG[I];
     END;
RUN;

 

[ 일괄 Rename 정리 ]

 

http://support.sas.com/kb/37/433.html

 

http://support.sas.com/kb/26/009.html

 

 http://cafe.daum.net/statsas/B3m/11643

 

 http://cafe391.daum.net/_c21_/cafe_nsread?grpid=5G5&mgrpid=&fldid=B3m&contentval=0031n0031szzzzzzzzz...

 

 * 배열

 

http://cafe391.daum.net/_c21_/cafe_nsread?grpid=5G5&mgrpid=&fldid=B3m&contentval=002PU002PV002PWzzzz... rg[*]&item=subject&jobcode=1&dataidlist=9270,5107,&fldidlist=B3m,B3m,&cpage=0&totcnt=2&sorttype=&from=total

 

 

Version history
Last update:
‎06-12-2020 03:04 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Article Labels
Article Tags