SAS中文论坛

标题: 跟crakman做sas base认证试题(10) [打印本页]

作者: shiyiming    时间: 2010-11-11 01:05
标题: 跟crakman做sas base认证试题(10)
From crackman's blog on Baidu


               
                <p><font size="4">10.The following SAS program is submitted:<br>
<br>
data WORK.RETAIL;<br>
&nbsp;&nbsp;  Cost='$20.000';<br>
&nbsp;&nbsp;  Discount=.10*Cost; <br>
run; <br>
<br>
What is the result?</font></p>
<p><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;  A. The value of the variable Discount in the output data set is 2000.No messages are written to the SAS log.<br>
&nbsp;&nbsp;&nbsp;&nbsp;  B. The value of the variable Discount in the output data set is 2000.A note that conversion has taken place is written to the SAS log.<br>
&nbsp;&nbsp;&nbsp;&nbsp;  C. The value of the variable Discount in the output data set is missing.A note in the SAS log refers to invalid numeric data.<br>
&nbsp;&nbsp;&nbsp;&nbsp;  D. The variable Discount in the output data set is set to zero.No messages are written to the SAS log.</font></p>
<p><font size="4">Answer: C<br>
本文属于博客:</font><a href="http://hi.baidu.com/crack_man/home"><font size="4"><!-- m --><a class="postlink" href="http://hi.baidu.com/crack_man/home">http://hi.baidu.com/crack_man/home</a><!-- m --></font></a><font size="4"> 版权归作者所有,如有转载,请注明出处!未经本作者同意不得用于商业应用。<br>
其他本博客文章均作此声明!</font></p>
<p><font size="4">本题考察是数据格式以及在表达式中的转换机制<br>
DISCOUNT最终为缺失值.,也就是PDV初始值缺失值。<br>
如果程序改成:<br>
data WORK.RETAIL;<br>
&nbsp;&nbsp;  Cost='20.000';<br>
&nbsp;&nbsp;  Discount=.10*Cost;<br>
&nbsp;&nbsp;  Put Discount; <br>
run; <br>
结果由是如何呢?<br>
读者自己运行一下!<br>
结合前几个例子里面的MDY函数。<br>
</font></p> <a href="http://hi.baidu.com/crack%5Fman/blog/item/42c1ecd96792d3ff77c638e8.html">阅读全文</a>
               
                <br/><b>类别:</b><a href="http://hi.baidu.com/crack%5Fman/blog/category/%B8%FAcrackman%D7%F6sas%20base%C8%CF%D6%A4%CA%D4%CC%E2">跟crackman做sas base认证试题</a>&nbsp;<a href="http://hi.baidu.com/crack%5Fman/blog/item/42c1ecd96792d3ff77c638e8.html#comment">查看评论</a>




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2