QUESTION NO: 16
The following SAS program is submitted: data work.accounting;
set work.department;
length jobcode $ 12;
jobcode='FAl';
run;
(C) Copyright 1998 Easy CramBible Lab, All Rights Reserved.
The WORK.DEPARTMENT data set contains a character variable named JOBCODE with a length of 5. What is the result?
A. The length of the variable JOBCODE is 3.
B. The length of the variable JOBCODE is 5.
C. The length of the variable JOSBODE is 12.
D. The program fails to execute due to errors.
Answer: B
Solution : 답은 2번 / 초기 JOBCODE 의 길이는 5로 설정되어 있다. 헷갈리는 부분이 set 다음에 jobcode의 길이를 바꿔주는 부분이 오는데 , 이미 set을 했기 때문에 jobcode의 길이는 5로 된다 . 만약 jobcode의 길이가 12로 바꿔주기 위해서는 data 를 가져오는 부분과 set해주는 부분사이에 jobcode의 길이를 설정해 주는 부분을 넣어주면 된다 .
#IT #먹방 #전자기기 #일상
#개발 #일상