ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 114

Question has been changed after some complains about it not being correct. Underscore represent blank space, I had to add them because blogger editor use to remove two or more spaces to one (Hint: missing informat for price).

The contents of the raw data file PRODUCT are listed below:
--------10-------20-------30
24613____$25.31
The following SAS program is submitted:
data inventory;
infile 'product';
input idnum 5. @10 price;
run;
Which one of the following is the value of the PRICE variable?
A. 25.31
B. $25.31
C. . (missing numeric value)
D. No value is stored as the program fails to execute due to errors.
Click Comment link to get answer

45 comments:

  1. Here Answer is .31 Since we will read from position 10.

    All four options given here are invalid.

    ReplyDelete
  2. Agreed. It should be 0.31

    ReplyDelete
  3. D. No value is stored. The input file is not found.

    unless... the file is stored in the directory that happens to be your current working directory, (has lowercase filename on case-dependent platforms) and has no file extension, then the value is 0.31 as the input buffer starts reading at the 10th column and continues until it reaches the space or eol/eof marker.

    I'd be pretty annoyed if this were in a test I was sitting - I think the quotes marks are accidental and we're supposed to assume product is a fileref. I like questions to be set unambiguously, otherwise it's the error of the examiner, not the examined!

    ReplyDelete
    Replies
    1. Anonymous4:47 PM

      Hey Chris, SAS is case sensitive only when it comes to values but not for any reference(even header). Further, it is given clearly that the second value starts from only the 10th column so, the question is not wrong I believe. and the answer is 'C' bcz, it wasn't read using appropriate format..good luck

      Delete
  4. Anonymous7:21 AM

    I ran it and received the same output as pradeep, this question is incorrect.

    If however, $25.31 did begin at column 10 then there would be a missing value in dataset inventory, this is due to invalid data for price ($ is a character and is not accepted into a numeric variable without some for of infomat e.g DOLLAR.)

    ReplyDelete
  5. Anonymous1:21 AM

    The right answer should be C. The input statement should be written as "input idnum 5. @10 price DOLLAR6.2;"

    ReplyDelete
  6. Anonymous6:40 AM

    If the price "$25.31" starts at 9th column then the price is read correctly as 25.31 without the dollar sign.I tried this.

    ReplyDelete
  7. Anonymous11:31 AM

    answer is C as you cannot use column input here as it does not accept non standard numeric data ($) hence a missing value

    ReplyDelete
  8. Anonymous3:27 PM

    what's up with this question? The answer is not in the 4 choices;

    ReplyDelete
  9. Correct answer is C (missing) because when input statment tries to read price as number but encounters character value, so assigns a missing value to price variable.

    ReplyDelete
  10. Anonymous1:18 PM

    ans =d

    SAS will detect the mismatched variables and will try an automatic character-to-numeric or
    numeric- to-character conversion. However, this process doesn't always work. Suppose each
    value of PayRate begins with a dollar sign ($). When SAS tries to automatically convert the
    values of PayRate to numeric values, the dollar sign blocks the process. The values cannot be
    converted to numeric values. Similar problems can occur with automatic numeric-to-character
    conversion.

    ReplyDelete
  11. Anonymous9:47 AM

    if you run the program in SAS:

    data inventory;
    input idnum 5. @10 price;
    datalines;
    24613 $25.31
    ;
    run;

    the answer is:

    price
    0.31

    On the exam, I'd agree with those who say 'C' missing value as the second value submitted is non-standard data and there is no informat specified for it.

    ReplyDelete
  12. Anonymous4:24 AM

    Answer is C.

    If we changed the code to
    [input idnum 5. @11 price;] answer would be A.

    ReplyDelete
  13. Anonymous8:06 AM

    Answer is C. It is because the informat is missing in the input statement

    ReplyDelete
  14. Instead of having 2 underscores (as blogger editor won't allow spaces), place 4 underscores to make the question more reasonable
    -Rk

    ReplyDelete
  15. Anonymous4:49 AM

    the right answer is C
    if you want to read correctly that value you have to use:
    input idnum 5. @10 price dollar6.2;
    or
    input idnum 5. @11 price;

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Through web designing we can build our website in an attractive manner to promote our buisness in online which can be of static and dynamic type.
    web designing course in chennai | web designing training in chennai

    ReplyDelete
  18. Very useful blog and very informative article thank you sharing keep posting sas training, sas admin training, sas clinical training,sas platformadmin training

    ReplyDelete
  19. I read your post when it was fresh. I stumbled on this link again while searching for something else. Since this appears to be favored by Google it is worth pointing out MS has changed its mind.

    Eccouncil is known for its ability to provide certification for ethical hacking and similar issues. In this area, Eccouncil certification is widely recognized. People who do this kind of work are called Ethical Hackers. This is very famous for IT professionals. But this work is very important. As an ethical hacker, you can test the software. Today, most companies need an ethical hacker, and of course someone with an Eccouncil certification.
    KillerDumps is a trusted and authentic website that offers the most reliable ECCouncil Exam Dumps. Our Eccouncil Dumps questions will help you pass the exam with ease as we are making a very bold move for your success.

    You can get ECCouncil Exam Dumps

    ReplyDelete
  20. Very Good Information...

    SAS Training in Pune

    Thank You Very Much For Sharing These Nice Tips..

    ReplyDelete
  21. Randomly found your blog. Your blog is away-some. Get Machine Learning course in Pune, Mumbai. data science courses in Mumbai, Pune. And you can get training from one of the best training for other courses also like Artificial Intelligence, rpa training in Mumbai, Blockchain training in Mumbai, Machine Learning, SAS Training in Pune, Python Programming etc.

    ReplyDelete
  22. Thanks for uploading this post its really kind of content that i looking for very helpful post by the away. If anyone looking for best Software training institute in Delhi Contact Here-+91-9311002620 Or Visit our website https://www.htsindia.com/software-testing-training-courses

    ReplyDelete
  23. Thanks for sharing this valuable post its very informative apart from that if anyone looking for e accounting institute in delhi so Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/Courses/Tally/e-accounting-training-course

    ReplyDelete
  24. Your post is really good thanks for sharing this kind of content i hope you will share these kinds of stuff in near future apart from that if anyone is looking for a training institute for C++ training.Contact Here-+91-9311002620 Or Visit post Website-
    https://www.htsindia.com/Courses/modular-courses/c-plus-plus-training-course

    ReplyDelete
  25. A big thank you for sharing this post but if anyone looking for best AutoCAD training institute in delhi look here Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/AutoCAD-training-courses

    ReplyDelete
  26. A big thank you for sharing this post but if anyone looking for best AutoCAD training institute in delhi look here Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/AutoCAD-training-courses

    ReplyDelete
  27. Very nice post thank you for sharing this post its very knowledgeable and very helpful i hope that you will continue to post these kinds of contents in future apart from that if anyone looking for C/C++ institute in delhi so Contact Here-+91-9311002620 Or Visit Website- https://htsindia.com/Courses/embedded-systems-and-robotics/cplusplustraininginstituteinsouthdelh

    ReplyDelete
  28. Thanks for sharing this amazing post this is the content i really looking for, its very helpful i hope you will continue your blogging anyway if anyone looking for C++ training institute in delhi contact us +91-9311002620 visit-https://www.htsindia.com/Courses/modular-courses/c-plus-plus-training-course

    ReplyDelete
  29. Thanks for sharing this amazing post this is the content i really looking for, it's very helpful i hope you will continue your blogging anyway if anyone looking for AutoCAD training institute in delhi contact us +91-9311002620 visit-https://www.htsindia.com/autocad-training-institute

    ReplyDelete
  30. I like your blog it is very knowledgable and I got very useful from your blog. Keep writing this type of blogs. If anyone want to get experience in Gurgaon can contact me at - 9599119376 or can visit our website at
    Experience Certificate In Gurgaon
    Experience Certificate In Chennai
    Experience Certificate In Pune
    Experience Certificate In Mumbai

    ReplyDelete
  31. This information is very good; I go through your every blog. They are very knowledgeable. Thanks for sharing this information. If anyone want to get experience in Gurgaon can contact me at - 9599119376 or can visit our website at
    Experience Certificate In Gurgaon
    Experience Certificate In Delhi
    Experience Certificate In Noida

    ReplyDelete
  32. Thanks for sharing this kind of post its very helpful for me, hey if anyone looking for best ms office or advance excel training institute in delhi so join with us for further more details Contact Here-+91-9311002620 Or Visit Website- https://htsindia.com/Courses/business-analytics/adv-excel-training-course

    ReplyDelete
  33. Your way of writing the blog is very nice your writing skill are very nice. I always read your every blog. Dreamsoft is 20years old consultancy providing experience certificate in Bangalore. Experience certificate plays an important role your interview. To get your experience certificate in bangalore 9599119376 or can visit the website athttps://experiencecertificates.com/experience-certificate-provider-in-bangalore.html

    ReplyDelete
  34. Your blog is very nice and interesting. Your way of writing this blog forced me to read the full blog. Being a new reader, your blog increased my interest in reading. If anyone is interested for Fake Experience Certificate in Delhi here we have the chance for you, Dreamsoft is providing is Fake experience certificate in Delhi. To get you experience certificate in Delhi you can contact at 9599119376. or can visit our website at https://experiencecertificates.com/experience-certificate-provider-in-delhi.html

    ReplyDelete

  35. Thank you for sharing this valuable information with us. Keep writing this type of the knowledgeable blogs. If anyone is interested for taking experience certificate in Delhi.
    Dreamsoft is the 20years old consultancy providing experience certificate in Delhi for your experience certificate in Delhi you can contact at – 9599119376 or visit our website at https://experiencecertificates.com/experience-certificate-provider-in-delhi.html

    ReplyDelete