나루다루

SAS BASE Q73. truncover 본문

Study/SAS BASE

SAS BASE Q73. truncover

나루다루 2018. 11. 2. 02:04
728x90
반응형

QUESTION NO: 73

Given the contents of the raw data file TYPECOLOR.DAT:

daisyyellow


The following SAS program is submitted: 

data FLOWERS;

infile 'TYPECOLOR.DAT' truncover;

length Type $ 5 Color $ 11;

input Type $ Color $;

run;

 

What are the values of the variables Type and Color?

 

A. Type=daisy, Color=yellow

B. Type=daisy, Color=w

C. Type=daisy, Color=daisyyellow

D. Type=daisy, Color=

 

 

Answer: D





# 문제 풀이

 - type의 길이가 5이므로 daisyyellow 중 daisy까지 할당되고, color 변수에는 할당할 변수가 없으므로 error가 뜬다.


 - truncover 옵션을 쓰면 color변수에 결측이 표시되고 정상적으로 실행된다.

  - truncover : 읽을 데이터가 없어서 error 나는 것을 방지한다.





728x90
반응형

'Study > SAS BASE' 카테고리의 다른 글

SAS BASE Q75. cat & catx  (0) 2018.11.02
SAS BASE Q74. array  (0) 2018.11.02
SAS BASE Q72. first/last  (0) 2018.11.02
SAS BASE Q71. firstobs & obs  (0) 2018.11.02
SAS BASE Q70. find  (0) 2018.11.02
Comments