楼主: ethel197
2878 1

紧急求救,这题怎么解释 [推广有奖]

  • 0关注
  • 2粉丝

初中生

71%

还不是VIP/贵宾

-

威望
0
论坛币
491 个
通用积分
0
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
169 点
帖子
15
精华
0
在线时间
0 小时
注册时间
2008-5-20
最后登录
2010-8-15

楼主
ethel197 发表于 2008-7-3 11:50:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

周五要考ADVANCE了

题目如下

WHICH ONE OF FOLLOWING SAS PROGRAMS USES THE MOST AMOUNT OF MEMORY RESOURCES FOR OUTPUT BUFFERS?

A )  data new(bufsize=1000 bufno=5);

set temp;

run;

b) data new(bufsize=1000 bufno=2);

set temp;run;

c) data new(bufsize=2000 bufno=3);

set temp; run;

d)data new(bufsize=4000 bufno=1);

set temp;run;

我觉得答案是C,因为2000*3=6000,是最大的.

可老师说,如果问的是MEMORY,就只要看BUFNO,那个BUFNO大,就那个USE MOST AMOUNT OF MEMORY,如果问的是I/O,那么就算乘积.所以老师觉得应该是A.

我想问问,到底是那个呢

第二题

data a b(view=b);

input age @@;

if age<24 then output a;

else output b;

cards;

21 23 26 21 27 23 24 25 26

;

proc print data=a;

run;

a) data a is not existed.

b)there are three observations in the data a;

c) there are five observation in the data b;

d) none of above

答案是A

是不是因为第一句应该写成 DATA  A B\VIEW=B

不该用括号,谁能告诉我,为什么A不存在.

先谢谢各位帮我解答.

二维码

扫码加我 拉你入群

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

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

关键词:following Resources resource programs Program 解释 求救

沙发
SignPingGu 发表于 2008-7-3 20:16:00
I am beginner too. But I found the answer to your second question. It is about 'SAS Views'.

SAS Views provide all the functionality and flexibility of SAS data sets,    but occupy only a minuscule fraction of the space of a full SAS data set. The View acts as sort of a "map" to the source data, instead of making a complete copy of it in SAS data format.
SAS Views are documented in the SAS OnlineDoc(tm).

To create a SAS View, add the VIEW= option to the DATA statement. The SAS data view name provided after VIEW= must be the same as at least one of the SAS data set names mentioned in the DATA step statements, but may not be the same as a SAS View or SAS data set already in the same library. Virtually all the language of the DATA step is the same as it would be if a true SAS data set were being created, except that the VIEW= option is added. For example, the following statements read raw data and create a SAS View called view1.ssv01:

            libname viewout '~/sasviews';
            filename raw1 '~/rawdata/file1.raw';

            data viewout.test1 / view=viewout.test1;
              infile raw1;
              input var1 var2 var3;
            run;
      Later, all that is needed to access the data with a PROC are the global statements (LIBNAME, FILENAME) and the PROC itself. For example,

            libname viewout '~/sasviews';
            filename raw1 '~/rawdata/file1.raw';
            proc print data=viewout.test1;

Views can be used to access other SAS data sets, allowing the use of subsets without wasteful usage of space. Imagine you have a master SAS data set, and routinely you need to process subsets of the data. Instead of storing potentially redundant subsets in the form of SAS data sets, Views could be used to save space. Consider the following:

            libname allsas '~/sasdata';
            libname viewstor '~/sasviews';
            data viewstor.females / view=viewstor.females;
                set allsas.master;
                if sex='f';
               
            data viewstor.males / view=viewstor.males;
                set allsas.master; if sex='m';

This would allow you the functionality of two subsets in addition to the master data set, while using only a tiny bit more disk space than the master data set itself. If real SAS data sets were used for the subsets, together they would have doubled the amount of disk space used.

To the first one, please refer to SAS support file:
http://www.sas.com/offices/NA/canada/downloads/presentations/Vancouver_Fall_2005/SAS_Efficiency_considerations.pdf

The BUFSIZE = system option or data set option to control the page size of an output SAS data set. The BUFNO= system option or data set option to control the number of SAS buffers open simultaneously in memory. You can get more details from the above link and SAS website.




Hope it helps

SAS support file

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

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