The following SAS program is submitted:
libname sasdata 'SAS-data-library';
data test;
set sasdata.chemists;
if jobcode = 'Chem2'
then description = 'Senior Chemist';
else description = 'Unknown';
run;
A value for the variable JOBCODE is listed below:
JOBCODE
chem2
Which one of the following values does the variable DESCRIPTION contain?
A. Chem2
B. Unknown
C. Senior Chemist
D. ' ' (missing character value)
Click Comment link to get answer
Answer is B.
ReplyDeleteb
ReplyDeleteis it because of the case of the string chem2 instead of Chem2 that the answer is B?
ReplyDeleteyes it is cause of the case of the string. Answer is B
ReplyDeleteanswer B
ReplyDeleteAnswer is D. The letter 'C' of 'chem2' is different
ReplyDeleteAnswer is B.
DeleteAnswer is D. The letter 'C' of 'chem2' is different
ReplyDeleteans is B. thats aall because of c..
ReplyDeleteB is the answer because value of Jobcode="chem2" different of test value of Jobcode="Chem2" so THEN statement will be skiped and ELSE statment will be executed
ReplyDeleteBy USK16000
B is the answer because the case of the string chem2 differs to Chem2
ReplyDeleteAnswer B.
ReplyDeleteIf is case sensitive and considers if jobcode = 'Chem2' as false. 'unknown is the answer.
Ans is B. reason is , Chem2 is in inverted comma. if any word is in inverted comma than sas will be case sensitive for that word.
ReplyDeleteMy code
ReplyDeleteDATA CHEMISTS;
JOBCODE = 'chem2';
RUN;
DATA TEST ;
SET CHEMISTS;
IF JOBCODE = 'Chem2' then desc = 'Senior Chemist';
else desc = 'Unknown' ;
RUN;
PROC PRINT DATA=TEST; RUN;
Obs JOBCODE desc
1 chem2 Unknown
answer is d because values within the quotation mark is case sensitive i.e. chem2 not equal to Chem2 ..
ReplyDeleteThat's why answer is B
Delete
ReplyDeleteYour blog is very useful for me.I really like you post.Thanks for sharing.
gclub online
goldenslot
Answer is D as words enclosed in the quotation mark are case-sensitive. Here "C" is different in both Chem2.
ReplyDeleteB
ReplyDelete