Review the code below
infile cards;
Which option is incompatible with this statement?
a) eof=gohere
b) firstobs=20
c) end=lastline
d) delimiter='ddd'
Showing posts with label INFILE statement. Show all posts
Showing posts with label INFILE statement. Show all posts
Wednesday, January 20, 2010
Infile options
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'
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'
Labels:
INFILE statement
Infile options
The following SAS program is submitted and reads 100 records from a raw data file:
data work.total;
infile 'file-specification' end = eof;
input name $ salary;
totsal + salary;
run;
Which one of the following IF statements writes the last observation to the output data set?
A. if end = 0;
B. if eof = 0;
C. if end = 1;
D. if eof = 1;
Check the comments for answers...
data work.total;
infile 'file-specification' end = eof;
input name $ salary;
totsal + salary;
run;
Which one of the following IF statements writes the last observation to the output data set?
A. if end = 0;
B. if eof = 0;
C. if end = 1;
D. if eof = 1;
Check the comments for answers...
Labels:
INFILE statement
Tuesday, January 19, 2010
INFILE statement
A raw data file is listed below.
Jose,47,210
Sue,,108
The following SAS program is submitted using the raw data file above as input:
data employeestats;
input name $ age weight;
run;
Which of the following INFILE statements completes the program and accesses the data
correctly?
a. infile 'file-specification' pad;
b. infile 'file-specification' dsd;
c. infile 'file-specification' dlm=',';
d. infile 'file-specification' missover;
The following output is desired:
name age weight
Jose 47 210
Sue . 108
Check the comments below for answers....
Jose,47,210
Sue,,108
The following SAS program is submitted using the raw data file above as input:
data employeestats;
input name $ age weight;
run;
Which of the following INFILE statements completes the program and accesses the data
correctly?
a. infile 'file-specification' pad;
b. infile 'file-specification' dsd;
c. infile 'file-specification' dlm=',';
d. infile 'file-specification' missover;
The following output is desired:
name age weight
Jose 47 210
Sue . 108
Check the comments below for answers....
Labels:
INFILE statement
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
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