Click on the Comments to view the Answers

Monday, January 25, 2010

Base 48

The contents of the raw data file FURNITURE are listed below:

--------10-------20-------30
chair,,table
chair,couch,table

The following SAS program is submitted:


data stock;
infile 'furniture' dsd;
input item1 $ item2 $ item3 $;
run;


Which one of the following is the value of the variable named ITEM2 in the first observation of the output data set?
A. table
B. ,table
C. . (missing numeric value)
D. ' ' (missing character value)

6 comments:

SASGuru said...

Answer D
Item2 is defined as character and the dsd option will assign missing value to it as there are two commas.

V.V. said...

In the following program, the answer is D. This is
because, you are using a 'dsd' condition
at the end of infile. The 'dsd' allows the SAS
to read consecutive commas which have no space
between them.

data stock;
infile cards dsd;
input item1 $ item2 $ item3 $;
cards;
chair,,table
chair,couch,table
;
run;

However if a dlm=',' is used then the result is
Chair Table Chair. The comma is not accepted. Only
observations is obtained.

If there is a gap between the commas in the first
observation, then you can use dsd or dlm to give
you answer- D.

shalini said...

yes the answer is D as dsd option is used. Also, Item2 is a character variable.

neuro_sas said...

D
A BLANK SPACE FOR MISSING CHARACTER VALUE
A(.) PERIOD FOR MISSING NUMERIC

Karthik Jessie said...

ApplY Online for DSE Nagaland Recruitment

HPPSC Recruitment Notification 2017 Download Here

Click Here PGCIL Executive Trainee Recruitment Notification

Plasma centre near me said...

This unique representation extends computational possibilities and data encoding, Having Games Bad contributing to niche applications that demand intricate and efficient numerical encoding.

Post a Comment



Technology Top Blogs On our way to 1,000,000 rss feeds - millionrss.com Hihera.com Blog Directory - OnToplist.com blogarama - the blog directory Blog Directory
Disclaimer

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Other brand and product names are trademarks of their respective companies.

This blog is not responsible for any kind of copyright violation. This blog just collects the links hosted or posted by other servers/people/search engines.The creator of this page or the ISP(s) hosting any content on this site take no responsibility for the way you use the information provided on this site.If anybody has any copyright claim on it and doesn’t wish the information provided to be shown on our site, please do respond to this email. We shall remove them off immediately. Any inconvenience is regretted. Please do mention your exact grievance/problems with respect to certain third party links. We assure you that appropriate action will be taken off. Thank you