|
DATA output-SAS-data-set; SET input-SAS-data-set; BY BY-variable …; <additional SAS statements> RUN; |
◀예제▶ 부서별 급여합계 구하기.
PROC SORT data=orion.specialsals out=salsort;
By Dept;
RUN;
DATA deptsals(keep=dept deptsal);
Set Salsort; /* div 오름차순으로 정렬된 데이터셋 */
By Dept ;
If First.Dept then Deptsal = 0; /* 그룹의 첫번째이면 급여합계 변수를 0 으로 초기화 */
DeptSal + salary ;
If Last.dept ; /* 그룹의 마지막이면 output 시킴 */
RUN;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!