Click on the Comments to view the Answers

Monday, January 25, 2010

Base 46

The following SAS program is submitted:

libname rawdata1 'location of SAS data library';
filename rawdata2 'location of raw data file';


data work.testdata;
infile 
input sales1 sales2;
run;


Which one of the following is needed to complete the program correctly?


A. rawdata1
B. rawdata2
C. 'rawdata1'
D. 'rawdata2'

6 comments:

SASGuru said...

Answer: B
The infile takes a fileref rawdata2

Harini said...

The file name should be within quotes rite? Shouldn't it be 'rawdata2'

conashshah said...

Yes Harini you are right ..it must be in quotes

Geoff said...

B, concur with guru. The key here is the filename statement. This creates what's called a fileref, which is essentially a nickname given to something, in this case a raw data file. Because the filename had quotes, the fileref does too. Don't belive me, check out this example from SAS help.
--------------------------------------
filename green 'your-input-file';
libname save 'SAS-library';
data save.vegetable;
infile green;
input lettuce cabbage broccoli;
run;

neurosas said...

IS THERE ANY CHARACTER LIMIT FOR THE FILENAME (LE 8 CHARACTERS?). ANYTHING BEYOND 8 CHARCTERS GIVING THIS ERROR
ERROR: Invalid logical name.
ERROR: Error in the FILENAME statement.

RS said...

libname libreifname 'path';

same as

filename filerefname 'path';

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