楼主: crackman
2038 3

[原创博文] 跟crakman做sas base认证试题(43) [推广有奖]

已卖:401份资源

院士

83%

还不是VIP/贵宾

-

威望
6
论坛币
91928 个
通用积分
23.5045
学术水平
424 点
热心指数
505 点
信用等级
256 点
经验
112978 点
帖子
2940
精华
0
在线时间
2532 小时
注册时间
2007-4-26
最后登录
2025-6-25

初级热心勋章 中级热心勋章 初级学术勋章 初级信用勋章

楼主
crackman 发表于 2010-11-12 23:02:48 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
43.Given the SAS data set WORK.ORDERS:

WORK.ORDERS

order_id customer       shipped
-------- ------------   ---------
9341      Josh Martin    02FEB2009
9874      Rachel Lords   14MAR2009
10233     Takashi Sato   07JUL2009

The variable order_id is numeric; customer is character; and shipped is numeric, contains a SAS date value,and is shown with the DATE9. format.

A programmer would like to create a new variable, ship_note,that shows a character value with the order_id,shipped date, and customer name.

For example, given the first observation ship_note would have the value "Order 9341 shipped on 02FEB2009 to Josh Martin".

Which of the following statement will correctly create the value and assign it to ship_note?

     A. ship_note=catx(' ','Order',order_id,'shipped on',input(shipped,date9.),'to',customer);
     B. ship_note=catx(' ','Order',order_id,'shipped on',char(shipped,date9.),'to',customer);
     C. ship_note=catx(' ','Order',order_id,'shipped on',transwrd(shipped,date9.),'to',customer);
     D. ship_note=catx(' ','Order',order_id,'shipped on',put(shipped,date9.),'to',customer);

Answer: D.
本文属于博客:http://www.crackman.net/ 版权归作者所有,欢迎转载!如有转载,请务必注明出处!未经本文作者同意不得用于商业应用。
这里主要考察四个函数的问题,最容易混淆的是INPUT和PUT两个函数。
看看下面的英文解释。
INPUT:To perform character-to-numeric conversion. Also useful in converting
character values such as dates into true SAS numeric date values.

Syntax: INPUT(value, informat)
value is a character variable or character expression.
informat is a SAS or user-defined informat.

PUT:To perform numeric-to-character conversion or to create a character variable
from a user-defined format. The result of a PUT function is always a
character value.

Syntax: PUT(value, format)
value is a character or numeric SAS variable or expression.
format is a SAS or user-defined format.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:SAS base Base CRA Man observation 题库 SAS 认证 Base crackman

沙发
zgryyl 发表于 2010-11-13 10:10:04
sas还有认证啊,值得好好学学
[img][/img]

藤椅
zhentao 发表于 2010-11-13 11:47:05
版主,去你的博客看了,很好啊。就是你的那个排版也太那个了吧。

能不能再把排版好好搞一些,看着有些累。也许是我的浏览器的问题。换了两个还是那样。

免费看,还要求这么多,别生气啊。

板凳
crackman 发表于 2010-11-13 12:10:06
建议你的电脑吧,宽屏的,LED的

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 08:37