ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 38

A raw data record is listed below: (Question updated: underscores means blank spaces)
--------10-------20-------30
Printing___750
The following SAS program is submitted:
data bonus;
infile 'file-specification';
input dept $ 1 - 11 number 13 - 15;

run;
Which one of the following SAS statements completes the program and results in a value of 'Printing750' for the DEPARTMENT
variable?
A. department = trim(dept) number;
B. department = dept input(number,3.);
C. department = trim(dept) || put(number,3.);
D. department = input(dept,11.) || input(number,3.);
Click Comment link to get answer

39 comments:

  1. Anonymous5:12 AM

    comment on this plz.

    ReplyDelete
  2. keyreal9:37 PM

    The input statement reads the variable dept using 11 bytes. The value of dept (Department) consists of 8 bytes therefore 3 trailing blanks are present in the value of dept which need to be trimmed out using the trim function. This is concatenated to the put function which converts numeric variables to character variables using the supplied format (3.) Hope this helps!
    P.S. I am taking the exam tomorrow! Wish me luck ;)

    ReplyDelete
    Replies
    1. Really good explanation

      Delete
    2. Hi keyreal.. congrats on passing SAS Base.. Could you please send the explanations for the dumps if you have, to samantha6may@gmail.com
      Thanks!

      Delete
    3. Hi, i am also preparing for the exam, can you please send me materials of question answers on raor323@gmail.com

      Delete
  3. keyreal3:51 PM

    I got certified!!! :)

    ReplyDelete
    Replies
    1. Hi, i am also preparing for the exam, can you please help me out by sending materials of question answers on riyashah91289@gmail.com

      Delete
    2. Anonymous12:39 PM

      Hi When did you appear for the exam ??

      Delete
    3. Anonymous8:46 PM

      Can you also send me the q and A on namanpatel5887@gmail.com. my exam is on 15. thanx.

      Delete
    4. Hello keyreal,
      i am also preparing for the BASE SAS exam, can you please help me out by sending materials of question answers on chetanahire01.429@gmail.com

      Delete
    5. send me questions and answers for Base sas exam preparation
      Goutam.hanje@gmail.com

      Delete
  4. SAS Guru10:16 AM

    I will get certified soon.

    ReplyDelete
  5. SAS Guru10:25 AM

    Hello keyreal,

    Where are you living? Did you get a job after your certification? Please, let me know.
    Thanks,

    Regards,

    ReplyDelete
  6. Anonymous1:47 PM

    congratulations to those who are certified and those who are actively trying...this site and your comments are so helpful :)

    ReplyDelete
  7. Anonymous1:25 PM

    I am planning to give certification next week.....but few answers are conflicting...are these question enough or are there any other resources...

    ReplyDelete
  8. Anonymous3:22 PM

    this should be enough

    ReplyDelete
  9. Hi Keyreal,

    Congratulations for your certificationtest. I am also taking the test on next week. Would you plz suggest me what I have to read. These question are enough to take test or do I need to study another topics. Plz send me reply soon and some dumps you write in exam. My e-mail id is jayananditha@gmail.com.
    Thank you very much for your help.

    ReplyDelete
  10. Anonymous3:30 PM

    Yes, I rescheduled for July 5th other wise I would be in exam hall at this time tomorrow. Can not afford to pay extra 180.

    ReplyDelete
  11. Anonymous3:10 AM

    if c is true there must be 4 blanks! otherwise no answer will fit

    ReplyDelete
  12. Anonymous11:26 PM

    Who can explain the reason why choose C?

    ReplyDelete
    Replies
    1. Printing750' to come from Printing____750. Out of choices given below why C is the answer is becoz all that ______needs to be removed so can use TRim function but taht aone will not help as number 750 is num and num values are Right aligned so if taht is converted to char it will get L aligned and come close to word Printing..
      A. department = trim(dept) number;
      B. department = dept input(number,3.);
      C. department = trim(dept) || put(number,3.

      Delete
    2. Anonymous11:17 PM

      Best explaination.
      Thanks

      Delete
  13. is these questions enough to give the exam?? plz let me know,i am also planning to give exam
    my id is sutripti.datta@gmail.com

    ReplyDelete
  14. Anonymous11:20 PM

    Recall, we use the put function when we need to convert numeric values to character values.

    ReplyDelete
  15. Anonymous11:17 PM

    In this case it's C.

    However, there is an ALTERNATE question going around where it is asking for "Printing 750" with a space in between. They also have similar, but different, possible answers.

    A. department = trim(dept)||number;
    B. department = dept||input(number,3.);
    C. department = trim(dept) || put(number,3.);
    D. department = input(dept,11.) || input(number,3.);

    In this case, A would be the correct answer. Because of the ||, SAS will automatically try to convert numbers into characters. In this process, an extra space is added to the front. I don't know why, but it does (I tested it).

    Hopefully this will help people who have the altered question.

    ReplyDelete
    Replies
    1. You just make me figuring out my question. I was wondering why I have to do the formatted for that number variable. There is no space between "Printing" "750". They must be the same type of value.

      Delete
  16. does it cost extra for rescheduling the SAS BASE EXAM??

    ReplyDelete
  17. Anonymous2:50 AM

    Hello people, I think C is the answer, but there is a problem here: the original data needs one more space (red underscores part) to input value (750) correctly for variable NUMBER. Present data will only input 50 instead of 750, so the final concatenation result will be 'Printing_50' (underscore is a space), not 'Printing750'. Am I right?

    ReplyDelete
  18. can any one explain why this question answer is C. why we change numeric value in to character value and also explain trim function.

    ReplyDelete
  19. Hi Can anyone help me with Sas base certifiaction exam. I am having my exam after two days. Are the material here enough to clear the test. Please send me actual questions if any one have it on asadaleem203@gmail.com

    ReplyDelete
  20. hi guys am writing the SAS base next week. I will be glad if you can shared some materials u used in preparing for your exams with me.
    thank you

    ReplyDelete
  21. Anonymous9:56 AM

    can someone explain, there is only one space after printing, so the numeric value starts from 11.. but infile reads only from 13.. and also dept will read till 11 inc;iding numeric

    ReplyDelete
  22. I want to give base sas exam and currently going through the dumps.. can anybody send the explanations on antara27@gmail.com. why there are no explanations given? the answers are confusing

    ReplyDelete
  23. Anonymous9:52 PM

    kindly send me the explainations for dump if anyone has, planning to give the exam, coolstuff2730@gmail.com

    ReplyDelete