全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3729 0
2010-11-20
http://crackman.net/?p=287
Given the SAS data set SASUSER.HIGHWAY:

  Steering  Seatbelt  Speed  Status   Count   
  ——–  ——–  —–  ——-  —–   
  absent    No        0-29   serious     31   
  absent    No        0-29   not       1419   
  absent    No        30-49  serious    191   
  absent    no        30-49  not       2004   
  absent    no        50+    serious    216   

  The following SAS program is submitted:

  %macro SPLIT;
     proc sort
           data=SASUSER.HIGHWAY
           out=WORK.UNIQUES(keep=Status)
           nodupkey;   
        by Status;     
     run;   

     data _null_;
        set uniques end=Lastobs;
        call symputx(‘Status’||left(_n_),Status);
        if Lastobs then call symputx(‘Count’,_n_);
     run;   

     %local i;
     data   
        %do i=1 %to &count;   
           [_insert_reference_]
        %end;
        ;   
        set SASUSER.HIGHWAY;   
        select(Status);
           %do i=1 %to &Count;
              when(“[_insert_reference_]“) output [_insert_reference_];   
           %end;
           otherwise;  
        end;
     run;   
   %mend;   

   %SPLIT   

  What macro variable reference completes
  the program to create the WORK.NOT and
  WORK.SERIOUS data sets?      
A.
&Status&i     

B.
&&Status&i   

C.
&Status&Count

D.
&&Status&Count

以上是真题,答案参见博客http://crackman.net/?p=287
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群