楼主: 蜻蜓点水
3789 5

SAS BASE 归来, 话复习中没有遇到过的考题 [推广有奖]

  • 1关注
  • 20粉丝

VIP+

教授

86%

还不是VIP/贵宾

-

威望
2
论坛币
32521 个
通用积分
46.6273
学术水平
34 点
热心指数
44 点
信用等级
19 点
经验
15561 点
帖子
373
精华
0
在线时间
1855 小时
注册时间
2005-5-8
最后登录
2024-4-22

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

感觉70道题中有至少有40道是123题库中的。题库中出现的这里就不重复了,现就把我复习中没有遇到过的我能记得的考题列出来, 希望对大家有帮助。(真实中的data 和变量名等忘了,我只把框架摆出来)

1.      proc print;

by type breed;

sum number;

run; 

Q: what’s the SUM is used for?  

  1. To print a summary of all the files stored in the library named SASUSER, using

PROC CONTENTS DATA=SASUSER._ALL_ or PROC CONTENTS LIB=SASUSER._ALL_?

 

  1. dataset A has variable locationfee with format dollar9. and dataset B has variable countryfee with format dollar6. 

Data realeastate;

format locationfee countryfee dollar6.;

set A B;

locationfee=locationfee/100;

countryfee=countryfee/100;

run; 

Q: What is the format look like for locationfee and countryfee? 

       4.

DATA TWO

X  Y     Z

1  A     27

1  A     53

2  A     number1 /忘了/

2  B    number2

3  A  number3

4  A  number4

4  B  number5

            data one;   Set two;     By x y;    If first.y; run; 

Q; What’s the output look like? 

  1. A dataset has two variables, A and B where B is character variable

A B

X 1

Y 2

Z 3 

   Q:  What’s the result after submitting  “proc print…;where B<2”? /**notice B is not numeric**/ 

     6.    data look like this (虚构的数据)

Name SSN

A 111111111

B 222222222

C 333333333  

data xxx;

set yyy;

file 'file-sepcification';

put A B;

<insert put statement here>

Run;

             Q: How can you make the double-spaced outuput like

 

 

Name SSN

A 111111111

 

B 222222222

 

C 333333333

 

 

a)      put double;

b)      put;

c)      put /;

 7.      User defined format should be stored in

 7.      User defined format should be stored in

a)      catalog

b)      work library

c)      permanent library 

8        data one has two variables var 1 and var2, the questions is asking you what’s wrong with the following codes

data two;

set one (keep=v1 v2 v3);

v3=v1+ v2;

run;

  1. 最后就是一些论坛中已经提到过的find, transwrd, catx, 的用法, 比如

AA=”DRIVE”;

B=TRANWRD(“8901 LONDON DRIVE”, AA, “WAY”)

Q: What’s the output for B? 

            和

Liu

Isbella

Ireland

Lanei 

Proc print;

where name like (_i%);

run; 

Q: What's the output for name?

 

 

 

[此贴子已经被作者于2008-3-22 13:43:13编辑过]

二维码

扫码加我 拉你入群

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

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

关键词:SAS base Base Variables Character Location 复习 SAS 考题 Base

沙发
bioman82 发表于 2008-3-22 14:43:00 |只看作者 |坛友微信交流群

这样的好贴怎能不顶?!

使用道具

藤椅
eijuhz 发表于 2008-3-22 15:09:00 |只看作者 |坛友微信交流群
给予奖励!

使用道具

板凳
hesummar 发表于 2008-3-25 11:21:00 |只看作者 |坛友微信交流群
谢谢分享。。。谢谢!

使用道具

报纸
bjszt107 发表于 2008-4-6 02:35:00 |只看作者 |坛友微信交流群
1,Answer : sum is the total value of number variable and note that it has been grouped by type and breed .

使用道具

地板
fabuover 发表于 2008-4-6 19:09:00 |只看作者 |坛友微信交流群
或许有用

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-30 18:51