ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 18

The following SAS program is submitted:
libname sasdata 'SAS-data-library';
data test;
set sasdata.chemists;
if jobcode = 'chem3'
then description = 'Senior Chemist';
else description = 'Unknown';
run;
A value for the variable JOBCODE is listed below:
JOBCODE
CHEM3
Which one of the following values does the variable DESCRIPTION contain?
A. chem3
B. Unknown
C. Senior Chemist
D. ' ' (missing character value)Click Comment link to get answer

17 comments:

  1. could anybody explain the answer?

    ReplyDelete
  2. Anonymous12:40 PM

    if "CHEM3" = "chem3" is false because string comparision is case sensitive, hence answer is B.

    ReplyDelete
  3. Anonymous8:59 AM

    Answer is B.
    This site is very useful. ThanX..!!

    ReplyDelete
  4. Anonymous6:16 AM

    Answer is B.

    ReplyDelete
  5. Please keep posting more questions. It is very helpful

    ReplyDelete
  6. Hi All, Please keep more questions. It is very helpfull to us. I have a question regarding the answers. This all questions are based on base sas certification exam righr( previous papers). If we revised these questions we can pass or we can study some more materials?

    ReplyDelete
  7. Anonymous1:26 PM

    Sakar Sham;

    Folks did you realize how the question is asked between 17 and 18.
    I think this one asked CHEM3 in capital letter as JOBCODE. Where as in 17 chem3.

    If you consider that capital letter has nothing to do then the answer is straight forward C. and my answers sheet says C.

    ReplyDelete
  8. Try this code: the description "Senior Chemist" will only occur with chem3

    data chemists;
    infile datalines;
    input jobcode $;
    datalines;
    chem3
    Chem3
    CHEM3
    cHEm3
    ;
    run;

    data test;
    set chemists;
    if jobcode = 'chem3'
    then description = 'Senior Chemist';
    else description = 'Unknown';
    run;

    ReplyDelete
  9. Anonymous10:55 AM

    Why is D not the answer?

    ReplyDelete
  10. Anonymous4:53 AM

    Answer is B. Try this
    data chemists;
    infile datalines;
    input jobcode $;
    datalines;
    JOBCODE
    CHEM3
    ;
    run;

    data test;
    set chemists;
    if jobcode = 'chem3'
    then description = 'Senior Chemist';
    else description = 'Unknown';
    run;

    ReplyDelete
  11. Anonymous6:43 PM

    gm;;;

    b

    ReplyDelete
  12. Anonymous10:53 PM

    Very helpful suggestions that help in the optimizing website.
    thank for sharing the link.

    gclub online
    goldenslot

    ReplyDelete