The following SAS program is submitted:
data work.test;
array agents{4} $ 12 sales1 - sales4;
run;
Which one of the following represents the variables that are contained in the output data set?
A. SALES1, SALES2, SALES3, SALES4
B. AGENTS1, AGENTS2, AGENTS3, AGENTS4
C. None, the DATA step fails because the ARRAY statement can reference only numeric data.
D. None, the DATA step fails because the ARRAY statement can reference only pre-existing variables.
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
12 comments:
Answer: A
In this datastep the array is creating 4 character variable sales1-sales
A. SALES1, SALES2, SALES3, SALES4
Answer A
plz SASGure can u explain how.....
Is12 the length of the var sales1-sales4
Answer is A.
"array agents{4} $ 12 sales1 - sales4;" statement
is creating 4 character variable sales1-sales with missing value. Output data set has one observation.
"array agents{4} $ 12;" statement
is creating 4 character variable agents1 - agents4 with missing value. Output data set has one observation.
A
SALES1,SALES2,SALES3,SALES4
A
The only thing that is throwing me is the number 12.
A
By default all elements in a character array is having a length of 8 bytes. To give a different length we can mention the value after the dollar sign. So in this case 12 is the length of each array element
By default all elements in a character array is having a length of 8 bytes. To give a different length we can mention the value after the dollar sign. So in this case 12 is the length of each array element
Post a Comment