BookmarkSubscribeRSS Feed

[SAS 활용 FAQ] PROCEDURE - FORMAT

Started ‎11-01-2021 by
Modified ‎11-01-2021 by
Views 281
  • 사용자 정의 출력형식 생성.
  • 출력형식 이름은

32 자리까지 가능.

문자형 출력형식은 $, 숫자형 출력형식은 _나 영문자로 시작.

마침표나 숫자로 끝나면 문법 오류.

PROC FORMAT ;

VALUE 출력형식명  (또는 범위) = ‘라벨

(또는 범위) = ‘라벨

… … ;

RUN;

 

◀예제문자형 출력형식

PROC FORMAT;

VALUE $gender ‘F’,‘f’ = ‘여자’

‘M’,‘m’ = ‘남자’

other = ‘코드오류’ ;

RUN;

 

◀예제숫자형 출력형식

PROC FORMAT;

VALUE agefmt   low -< 20    = ‘10 대’

20 -< 30    = ‘20 대’

30 -< 40    = ‘30 대’

40 -   high = ‘40 대 이상’;

RUN;

Version history
Last update:
‎11-01-2021 11:13 PM
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