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
C
ReplyDeleteHere Answer is .31 Since we will read from position 10.
ReplyDeleteAll four options given here are invalid.
Agreed. It should be 0.31
ReplyDeleteC
ReplyDeleteD. No value is stored. The input file is not found.
ReplyDeleteunless... 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!
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
DeleteI ran it and received the same output as pradeep, this question is incorrect.
ReplyDeleteIf 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.)
The right answer should be C. The input statement should be written as "input idnum 5. @10 price DOLLAR6.2;"
ReplyDeletedollar6.2 is necessary ?
DeleteIf the price "$25.31" starts at 9th column then the price is read correctly as 25.31 without the dollar sign.I tried this.
ReplyDeleteanswer is C as you cannot use column input here as it does not accept non standard numeric data ($) hence a missing value
ReplyDeletewhat's up with this question? The answer is not in the 4 choices;
ReplyDeleteCorrect 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.
ReplyDeleteans =d
ReplyDeleteSAS 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.
if you run the program in SAS:
ReplyDeletedata 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.
Answer is C.
ReplyDeleteIf we changed the code to
[input idnum 5. @11 price;] answer would be A.
c
ReplyDeleteAnswer is C. It is because the informat is missing in the input statement
ReplyDeleteInstead of having 2 underscores (as blogger editor won't allow spaces), place 4 underscores to make the question more reasonable
ReplyDelete-Rk
the right answer is C
ReplyDeleteif you want to read correctly that value you have to use:
input idnum 5. @10 price dollar6.2;
or
input idnum 5. @11 price;
This comment has been removed by the author.
ReplyDeletethe ans is c
ReplyDeleteThrough 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.
ReplyDeleteweb designing course in chennai | web designing training in chennai
Very useful blog and very informative article thank you sharing keep posting sas training, sas admin training, sas clinical training,sas platformadmin training
ReplyDeleteI 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.
ReplyDeleteEccouncil 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
great post
ReplyDeletesas training in delhi
sas training in noida
Thankyou for posting this
ReplyDeletesas training in delhi
sas training in noida
Very Good Information...
ReplyDeleteSAS Training in Pune
Thank You Very Much For Sharing These Nice Tips..
Thanks a very sharing informative information
ReplyDeleteadvanced sas training in delhi
advanced sas training in noida
Thanks for Sharing a very Nice Details
ReplyDeleteSAS Training Institute in Delhi
SAS Training Institute in Noida
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.
ReplyDeleteThanks 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
ReplyDeleteThanks 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
ReplyDeleteYour 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-
ReplyDeletehttps://www.htsindia.com/Courses/modular-courses/c-plus-plus-training-course
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
ReplyDeleteA 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
ReplyDeleteVery 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
ReplyDeleteThanks 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
ReplyDeleteThanks 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
ReplyDeleteI 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
ReplyDeleteExperience Certificate In Gurgaon
Experience Certificate In Chennai
Experience Certificate In Pune
Experience Certificate In Mumbai
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
ReplyDeleteExperience Certificate In Gurgaon
Experience Certificate In Delhi
Experience Certificate In Noida
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
ReplyDeleteYour 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
ReplyDeleteYour 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
ReplyDeleteThank 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