ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 4

The contents of the raw data file NAMENUM are listed below:
--------10-------20-------30
Joe xx
The following SAS program is submitted:
data test;
infile 'namenum';
input name $ number;
run;
Which one of the following is the value of the NUMBER variable?
A. xx
B. Joe
C. . (missing numeric value)
D. The value can not be determined as the program fails to execute due to errors.
Click Comment link to get answer

40 comments:

  1. Anonymous1:18 AM

    Answer is C, missing value, since a numeric value is expected for the variable been read, and a character value was found.

    ReplyDelete
  2. Anonymous11:15 AM

    Answer is C.

    You have given name as character and there was no delimiter. so it will read 1st characters including the space i.e Joe xx and number seems to be missing. So output will be missing..

    Correct it if am wrong

    ReplyDelete
  3. Anonymous11:27 AM

    Kiruba, there was no delimiter means default space will be used as delimiter here. So name will read Joe and number is expecting numeric value but it reads xx, so number is set to missing.

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

    ReplyDelete
  5. Anonymous5:19 AM

    Answer is C

    ReplyDelete
  6. Anonymous2:07 PM

    anser is c

    ReplyDelete
  7. Anonymous5:46 AM

    answer is c because variable is character not the numeric and hence $ was not given it ll be missing

    ReplyDelete
  8. Anonymous3:57 PM

    Answer is A

    ReplyDelete
  9. Anonymous2:41 PM

    SAS encounters character data for numeric data and sets _error_=1. However, SAS still runs the code and generates an list file with name=Jeo and number is set to a missing value

    ReplyDelete
  10. Anonymous12:03 AM

    how can the answer be c? the program will not execute if you give infile 'namenum';we cannot use a name in quotes in infile statement.it didn't execute when i tried.i think the answer is D

    ReplyDelete
    Replies
    1. Anonymous2:24 PM

      I agree with you, but I wonder if they meant to be that tricky or if they were really aiming for 'c' to be the answer.

      Delete
  11. Anonymous10:17 AM

    Ans is D

    ReplyDelete
  12. Anonymous10:09 AM

    Sakar;

    Please focus on logic, in input we have name $ ( which is defined a character variable) number ( a numeric variable),
    When we execute the sas program it reads in data vector name as character variable looks for numeric variable as assigned in input statement. But is does not find numeric but xx is character so in data vector it writes 1 and which is missing numeric value.
    Who ever said a or be needed to grasp the logical side of SAS program. Do not get confused as well do not confuse others too.
    Thank you.

    ReplyDelete
  13. Rrachana1:58 AM

    ans is C

    ReplyDelete
  14. answer is missing value

    ReplyDelete
  15. Anonymous6:29 AM

    the ans is D,error =1,

    ReplyDelete
  16. Aaj ka answer bole to C:

    ReplyDelete
  17. Answer: C

    Try the below problem for extra Base SAS practice:
    http://sascert3.blogspot.com/2013/03/base-sas-example-question-21.html

    Good luck!

    ReplyDelete
  18. Anonymous3:13 AM

    Answer is C

    ReplyDelete
  19. For latest and updated SAS certification dumps in PDF format. contact us at completeexamcollection@gmail.com.
    Refer our blog for more details: http://completeexamcollection.blogspot.in/2015/12/sas-certification-dumps.html

    ReplyDelete
  20. I will do the exam and with this dicussion i can't understand the correct answer.
    gclub
    gclub casino online

    ReplyDelete
  21. I really like you post good blog,Thanks for your sharing.

    ทองดีฟันขาว

    ReplyDelete
  22. http://chennaitraining.in/teradata-training-in-chennai/
    http://chennaitraining.in/sap-hr-training-in-chennai/
    http://chennaitraining.in/sap-fico-training-in-chennai/
    http://chennaitraining.in/sap-abap-training-in-chennai/
    http://chennaitraining.in/bi-bw-training-in-chennai/
    http://chennaitraining.in/solidworks-training-in-chennai/

    ReplyDelete

  23. Option A & B are not possible as character variable name will take Joe as value & numeric variable number will try to take xx as value. But since xx is character value and implicit type conversion is not possible hence it will give missing value. Option D is not possible as it's a data error & not compile time error. Program will not execute in compile time error & will throw an error while in case of data error code will be executed with message in log.

    ReplyDelete

  24. iot training in chennai - Iot Training in Chennai - Internet of things is an technology which is basically to connect every product with the Internet.
    Definitely Best IOT Training Institute in Chennai will train you in this technology with an assured placements.

    ReplyDelete
  25. DevOps training in chennai - It's right time to learn the trending technolgy such as DevOps.Try to find a Best DeVops training Institute in Chennai.

    blue prism training in Chennai - Blue prism is an developing and future technology of IT and start to start for Best Blue prism technology in Chennai.

    uipath training in Chennai - Best uipath course and training in Chennai will also create a better path for your future.

    microsoft azure training in chennai - Best azure training in Chennai offering the courses with guidance for Microsoft azure training.

    ReplyDelete
  26. Thanks for this. I really like what you've posted here and wish you the best of luck with this blog and thanks for sharing

    Teradata Training in Bangalore

    ReplyDelete
  27. Nice to read your article. This has really made good thing.
    snowflake training in bangalore











    ReplyDelete