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
Answer is C, missing value, since a numeric value is expected for the variable been read, and a character value was found.
ReplyDeleteAnswer C
ReplyDeleteAnswer is C.
ReplyDeleteYou 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
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.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAnswer is C
ReplyDeleteAnswer is C
ReplyDeleteanser is c
ReplyDeleteD
ReplyDeleteanswer is c because variable is character not the numeric and hence $ was not given it ll be missing
ReplyDeleteAnswer is A
ReplyDeleteSAS 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
ReplyDeleteC
ReplyDeleteC
ReplyDeletehow 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
ReplyDeleteI 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.
DeleteAns is D
ReplyDeleteSakar;
ReplyDeletePlease 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.
ans is C
ReplyDeleteanswer is missing value
ReplyDeleteC
ReplyDeletethe ans is D,error =1,
ReplyDeleteAaj ka answer bole to C:
ReplyDeleteAnswer: C
ReplyDeleteTry the below problem for extra Base SAS practice:
http://sascert3.blogspot.com/2013/03/base-sas-example-question-21.html
Good luck!
Answer is C
ReplyDeleteFor latest and updated SAS certification dumps in PDF format. contact us at completeexamcollection@gmail.com.
ReplyDeleteRefer our blog for more details: http://completeexamcollection.blogspot.in/2015/12/sas-certification-dumps.html
Very useful and informative blog and article , thank you for sharing with us keep posting selenium training,selenium online training,selenium training in bangalore, selenium job oriented training in bangalore
ReplyDeleteI will do the exam and with this dicussion i can't understand the correct answer.
ReplyDeletegclub
gclub casino online
I really like you post good blog,Thanks for your sharing.
ReplyDeleteทองดีฟันขาว
C
ReplyDeletec
ReplyDeletehttp://chennaitraining.in/teradata-training-in-chennai/
ReplyDeletehttp://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/
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.
ReplyDeleteiot 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.
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.
ReplyDeleteblue 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.
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
ReplyDeleteTeradata Training in Bangalore
Nice to read your article. This has really made good thing.
ReplyDeletesnowflake training in bangalore
beautiful blog thank you Philosophy Book
ReplyDeleteChildren Story Books
Vibhuti Online
Kumkum Online
ReplyDeleteSAT Chemistry
MCAT Organic Chemistry Tutor
gcse organic chemistry
iit organic chemistry
beautiful blog thanks for sharing
ReplyDelete1 face rudraksha
3 face rudraksha
Deepam oil