| 所在主题: | |
| 文件名: 198271.pdf | |
| 资料下载链接地址: https://bbs.pinggu.org/a-198271.html | |
| 附件大小: | |
|
<p></p><p> </p><p></p><p></p><p> </p><p></p><p></p><p></p><p></p><p> </p><p></p><p>SAS认证220道<br/> 练习题及详细答案, 题目覆盖了所有SAS BASE 考试所涉及到的范围。 </p><p></p><p></p><p>例子1 </p><p></p><p></p><p>Suppose the YEARCUTOFF= system option is set to 1920. An input file contains the date expression 12/08/1925, which is being read with the MMDDYY8. informat. Which date will appear in your data? </p><p></p><p></p><p>a. 08DEC1920 </p><p></p><p></p><p>b. 08DEC1925 </p><p></p><p></p><p>c. 08DEC2019 </p><p></p><p></p><p>d. 08DEC2025<br/> </p><p></p><p></p><p></p><p> </p><p></p><p>Correct answer: c<br/> </p><p></p><p></p><p>The w value of the informat MMDDYY8. is too small to read the entire value, so the last two digits of the year are truncated. The last two digits thus become 19 instead of 25. Because the YEARCUTOFF= system option is set to 1920, SAS interprets this year as 2019. To avoid such errors, be sure to specify an informat that is wide enough for your date expressions. </p><p></p><p></p><p></p><p> </p><p></p><p>例子2 </p><p></p><p></p><p>What is the length of the variable Type, as created in the DATA step below? </p><p></p><p></p>data finance.newloan;<p></p> set finance.records;<p></p> TotLoan+payment;<p></p> if code='1' then Type='Fixed';<p></p> else Type='Variable';<p></p> length type $ 10;<p></p>run;<p></p><p>a. 5 </p><p></p><p></p><p>b. 8 </p><p></p><p></p><p>c. 10 </p><p></p><p></p><p>d. It depends on the first value of Type </p><p></p><p></p><p></p><p> </p><p></p><p>Correct answer: a<br/> </p><p></p><p></p><p>The length of a new variable is determined by the first reference in the DATA step, not by data values. In this case, the length of Type is determined by the value Fixed. The LENGTH statement is in the wrong place; it must be read before any other reference to the variable in the DATA step. The LENGTH statement cannot change the length of an existing variable </p><p></p><p></p><p></p>
[此贴子已经被angelboy于2008-4-25 14:58:16编辑过] |
|
熟悉论坛请点击新手指南
|
|
| 下载说明 | |
|
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。 2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。 3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。 (如有侵权,欢迎举报) |
|
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明