收藏 分销(赏)

SAS Base Programming SAS认证考试样题 .pdf

上传人:曲**** 文档编号:373539 上传时间:2023-09-11 格式:PDF 页数:84 大小:2.97MB
下载 相关 举报
SAS Base Programming SAS认证考试样题 .pdf_第1页
第1页 / 共84页
SAS Base Programming SAS认证考试样题 .pdf_第2页
第2页 / 共84页
点击查看更多>>
资源描述
A00-201QUESTION 1In the following SAS program,the input data files are sorted by the NAMES variable:libnametemp SAS-data-library,;data temp.sales;merge temp.saleswork.receipt;by names;run;Which one of the following results occurs when this program is submitted?A.The program executes successfully and a temporary SAS data set is created.B.The program executes successfully and a permanent SAS data set is created.C.The program fails execution because the same SAS data set is referenced for both read and write operations.D.The program fails execution because the SAS data sets on the MERGE statement are in two different libraries.Answer:BQUESTION 2When the following SAS program is submitted,the data set SASDATA.PRDSALES contains 5000 observations:libnamesastemp SAS-data-library;options obs=500;proc print data=sasdata.prdsales(firsttobs=100);run;options obs=max;proc means data=sasdata.prdsales(firsttobs=500);run;How many observations are processed by each procedure?A.400 for PROC PRINT4500 for PROC MEANSB.401 for PROC PRINT4501 for PROC MEANSC.401 for PROC PRINT4500 for PROC MEANSD.500 for PROC PRINT5000 for PROC MEANSAnswer:BQUESTION 3The following SAS program is submitted:A-The Power of KnowingA00-201data work.new;length word$7;amount=7;if amount=5 then word=CAT;else if amount=7 then word=DOG;else work=NONE!;amount=5;run;Which one of the following represents the values of the AMOUNT and WORD variables?A.amount word5 DOGB.amount word5 CATC.amount word7 DOGD.amount word7 (missing character value)Answer:AQUESTION 4Which one of the following is true of the SUM statement in a SAS DATA step program?A.It is only valid in conjunction with a SUM function.B.It is not valid with the SET,MERGE and UPDATE statements.C.It adds the value of an expression to an accumulator variable and ignores missing values.D.It does not retain the accumulator variable value from one iteration of the SAS DATA step to the next.Answer:CQUESTION 5The following SAS program is submitted:data work.sets;do until(prod gt 6);prod+1;end;run;Which one of the following is the value of the variable PROD in the output data set?A.5B.6A-The Power of KnowingA00-201C.7D.8Answer:CQUESTION 6The following SAS program is submitted:proc print data=sasuser.houses;run;insert OPTIONS statement heroproc means data=sasuser.shoes;run;Which one of the following OPTIONS statements resets the page number to 1 for the second report?A.option pageno=1;B.option pagenum=1;C.options reset pageno=1;D.options reset pagenum=1;Answer:AQUESTION 7The contents of the raw data file PRODUCT are listed below:-I-10I-20I-3024613$25.31The following SAS program is submitted:data inventory;infile product;input idnum 5.10 price;run;Which one of the following is the value of the PRICE variable?A.25.31B.$25,31C.(missing numeric value)D.No value is stored as the program fails to execute due to errors.Answer:CQUESTION 8The contents of the raw data file TYPECOLOR are listed below:-I-10I-20I-30daisyyellowThe following SAS program is submitted:data flowers;A-The Power of KnowingA00-201infiletypecolor,;input type$1-5+1 color$;run;Which one of the following represents the values of the variables TYPE and COLOR?A.type color daisy yellow B.type color daisy ellow C.type color daisyyellow(missing character value)D.No values are stored as the program fails to execute due to syntax errors.Answer1:BQUESTION 9A raw data record is listed below:-I-10-1-20I-30son,Travis,The following output is desired:relation firstnameson TravisWhich one of the following SAS programs reads the data correctly?A.data family/dim=infile file-specification;input relation$firstname$;run;B.option dim=data family;infile file-specification;input relation$firstname$;run;C.data family;infile file-specification option dim=input relation$firstname$;run;D.data family;infile file-specification;input relation$firstname$/dim=run;Answer:CA-The Power of KnowingA00-201QUESTION 10The following SAS program is submitted:libnamerawdatal location of SAS data library;filename rawdata2 location of raw data file;data work.testdata;infileinsert item heroinput sales 1 salse2;run;Which one of the following is needed to complete the program correctly?A.rawdata 1B.rawdata2C.rawdata 1D.rawdata2Answer:BQUESTION 11The following SAS program is submitted and reads 100 records from a raw data file:data work.total;infile file-specification end=eof;input name$salary;totsal+salary;insert IF statement herorun;Which one of the following IF statements writes the last observation to the output data set?A.if end=0;B.if eof=0;C.ifend=1;D.if eof=1;Answer:DQUESTION 12The contents of the raw data file FURNITURE are listed below:-I-10I-20I-30chair,tablechair,couch,tableThe following SAS program is submitted:data stock;infile furniture dsd;input iteml$item2$item3$;run;A-The Power of KnowingA00-201Which one of the following is the value of the variable named ITEM2 in the first observation of the output data set?A.tableB.,tableC.(missing numeric value)D.(missing character value)Answer:DQUESTION 13A raw data file is listed below:RANCH,1250,2,1,Sheppard Avenue,$64,000SPLIT,1190,1,1,Rand Street,$65,850CONDO,1400,2,1.5,Market Street,80,050TWOSTORY,1810,4,3,Garris Street,$107,250RANCH,1500,3,3,Kemble Avenue,$86,650SPLIT,1615,4,3,West Drive,94,450SPLIT,1305,3,1.5,Graham Avenue,$73,650The following SAS program is submitted using the raw data file as input:data work.condo_ranch;infilefile-specification dsd;input style$;if style=CONDO*or style=RANCH theninput sqfeet bedrooms baths street$price:dollar 10.;run;How many observations does the W ORK.CONDO_R AN CH data set contain?A.0B.3C.5D.7Answer:DQUESTION 14A raw data file is listed below:RANCH,1250,2,1,Sheppard Avenue,$64,000SPLIT,1190,1,1,Rand Street,$65,850CONDO,1400,2,1.5,Market Street,80,050TWOSTORY,1 810,4,3,Garris Street,$107,250RANCH,1500,3,3,Kemble Avenue,$86,650SPLIT,1615,4,3,West Drive,94,450SPLIT,1305,3,1.5,Graham Avenue,$73,650The following SAS program is submitted using the raw data file as input:data work.condo_ranch;A-The Power of KnowingA00-201infilefile-specification dsd;input style$if style=CONDO or style=RANCH;input sqfeet bedrooms baths street$price:dollar 10.;run;How many observations will the output data set contain?A.0B.3C.5D.7Answer:BQUESTION 15The following SAS program is submitted:data numrecords;infile file-specification;input 1 patient$15.relative$16-26if relative=children theninput 54 diagnosis$15.else if relative=parents theninput 28 doctor$15.clinic$44-5354 diagnosis$15.input age;run;How many raw data records are read during each iteration of the DATA step during execution?A.1B.2C.3D.4Answer:AQUESTION 16The following SAS program is submitted:data work.empsalary;set workpeople(in=inemp)work.money(in=insal);if insal and inemp;run;The SAS data set WORK.PEOPLE has 5 observations,and the data setA-The Power of KnowingA00-201WORK.MONEY has 7 observations.How many observations will the data set WORK.EMPSALARY contain?A.0B.5C.7D.12Answer:AQUESTION 17The contents of two SAS data sets named EMPLOYEE and SALARY are listed below:EMPLOYEE SALARYname age name salaryBruce 30 Bruce 40000Dan 35 Bruce 35000Dan 37000Dan.The following SAS program is submitted:data work.empsalary;merge work,employee(in=inemp)work.salary(in=insal);by name;if inemp and insal;run;How many observations will the data set WORK.EMPSALARY contain?A.2B.4C.5D.6Answer:BQUESTION 18The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:WORK.EMPLOYEE WORK.SALARYfnameage fname salaryBruce 30 Bruce 25000Dan 40 Bruce 35000Dan 25000The following SAS program is submitted:data work.empdata;merge work.employeework.salary;A-The Power of KnowingA00-201by fname;totsal+salary;run;How many variables are output to the WORK.EMPDATA data set?A.3B.4C.5D.No variables are output to the data set as the program fails to execute due to errors.Answe亡 BQUESTION 19The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:WORK.EMPLOYEE WORK.SALARYfnameage name salaryBruce 30 Bruce 25000Dan 40 Bruce 35000Dan 25000The following SAS program is submitted:data work.empdata;by fname;totsal+salary;run;Which one of the following statements completes the merge of the two data sets by the FNAME variable?A.merge work.employeework.salary(fname=name);B.merge work.employeework.salary(name=fname);C.merge work.employeework.salary(rename=(fname=name);D.merge work.employeework.salary(rename=(name=fname);Answer:DQUESTION 20The following SAS program is submitted:proc sort data=work.employee;by descending fname;proc sort sort data=work.salary;by descending fname;data work.empdata;A-The Power of KnowingA00-201merge work.employeework.salary;by fname;run;Which one of the following statements explains why the program failed execution?A.The SORT procedures contain invalid syntax.B.The merged data sets are not permanent SAS data sets.C.The data sets were not merged in the order by which they were sorted.D.The RUN statements were omitted after each of the SORT procedures.Answer1:CQUESTION 21The following SAS SORT procedure step generates an output data set:proc sort data=sasuser.houses out=report;by style;run;In which library is the output data set stored?A.WORKB.REPORTC.HOUSESD.SASUSERAnswer:AQUESTION 22The following SAS DATA step is submitted:libnametemp SAS-data-library,;data temp.report;set sasuser.houses;newvar=price*1.04;run;Which one of the following statements is true regarding the program above?A.The program is reading from a temporary data set and writing to a temporary data set.B.The program is reading from a temporary data set and writing to a permanent data set.C.The program is reading from a permanent data set and writing to a temporary data set.D.The program is reading from a permanent data set and writing to a permanent data set.Answer:DQUESTION 23Which one of the following SAS DATA steps saves the temporary data set named MYDATA as a permanent data set?A-The Power of KnowingA00-201A.libname sasdata SAS-data-library;data sasdata.mydata;copy mydata;run;B.libname sasdata SAS-data-library,;data sasdata.my data;keep mydata;run;C.libname sasdata SAS-data-library,;data sasdata.my data;save mydata;run;D.libname sasdata SAS-data-library;data sasdata.my data;set mydata;run;Answer:DQUESTION 24The following SAS DATA step is submitted:data sasdata.atlantasasdata.bostonwork.portlandwork.phoenix;set company.prdsales;if region=NE then output bostan;if region=SE then output atlanta;if region=SW then output phoenix;if region=NW then output portland;run;Which one of the following is true regarding the output data sets?A.No library references are required.B.The data sets listed on all the IF statements require a library reference.C.The data sets listed in the last two IF statements require a library reference.D.The data sets listed in the first two IF statements require a library reference.Answer:DQUESTION 25The following SAS DATA step executes on Monday,April 25,2000:data newstaff;set staff;start_date=today();A-The Power of KnowingA00-201run;Which one of the following is the value of the variable START_DATE in the output data set?A.a character string with the value 04/25/2000,B.a character string with the value Monday,April 25,2000,C.the numeric value 14725,representing the SAS date for April 25,2000D.the numeric value 04252000,representing the SAS date for April 25,2000Answer:CQUESTION 26The following SAS program is submitted:data work.new;mon=3;day=23;year=2000;date=mdy(mon,day,year);run;Which one of the following is the value of the DATE variable?A.a character string with the value 23mar2000B.a character string with the value,03/23/2000C.a numeric value of 14692,which represents the SAS date value for March 23,2000D.a numeric value of 3232000,which represents the SAS date value for March 23,2000Answe亡 CQUESTION 27The following SAS program is submitted:data revenue;set year_l;varl=mdy(l,15,1960);run;Which one of the following values does the variable named VARI contain?A.14B.15C.1151960D.1/15/1960,Answer:AQUESTION 28The following SAS program is submitted:data work.report;A-The Power of KnowingA00-201set work.sales_info;if qtr(sales_date)ge 3;run;The SAS data set WORK.SALES_INFO has one observation for each month in the year 2000 and the variable SALES_DATE which contains a SAS date value for each of the twelve months.How many of the original twelve observations in WORK.SALES_INFO are written to the WORK.REPORT data set?A.2B.3C.6D.9Answer1:CQUESTION 29The following SAS program is submitted:?libnametemp SAS-data-library,;data work.new;set temp.jobs;format newdate mmddyylO.;qdate=qtr(newdate);ddate=weekday(newdate);run;proc print data=work.new;run;The variable NEWDATE contains the SAS date value for April 15,2000.What output is produced if April 15,2000 falls on a Saturday?A.Obs newdate qdate ddate1 APR152000 2 6B.Obs newdate qdate ddate1 04/15/2000 2 6C.Obs newdate qdate ddate1 APR152000 2 7D.Obs newdate qdate ddate1 04/15/2000 2 7Answer:DQUESTION 30A raw data record is shown below:07Jan2002Which one of the following informats would read this value and store it as a SAS date value?A-The Power of KnowingA00-201A.date9.B.ddmonyy9.C.ddMMMyy9.D.ddmmmyyyy9.Answer:AQUESTION 31The contents of the SAS data set PERM.JAN_SALES are listed below:VARIABLE NAME TYPE idnumcharacter variable sales_datenumeric date valueA comma delimited raw data file needs to be created from the PERM.JAN_SALES data set.The SALES_DATE values need to be in a MMDDYY10 form.Which one of the following SAS DATA steps correctly creates this raw data file?A.libname perm SAS-data-library,;data_null_;set perm.jan_sales;file file-specification dsd=put idnum sales_date:mmddyy 10.;run;B.libname perm SAS-data-library,;data_null_;set perm.jan_sales;file file-specification dim=put idnum sales_date:mmddyy 10.;run;C.libname perm SAS-data-library,;data_null_;set perm.jan_sales;file file-specification;put idnum sales_date:mmddyy 10.dim=run;D.libname perm SAS-data-library,;data_null_;set perm.jan_sales;file file-specification,;put idnum sales_date:mmddyy 10.dsd=run;Answer:BQUESTION 32The contents of the SAS data set named PERM.STUDENTS are listed below:A-The Power of KnowingA00-201name ageAlfred 14Alice 13Barbara 13Carol 14The following SAS program is submitted using the PERM.STUDENTS data set as input:Libnameperm SAS-date-library,;data students;set perm.students;file file-specification,;put name$15.5 age 2.;runWhich one of the following represents the values written to the output raw data file?A.-I10I-20I30Alfred 14Alice 13Barbara 13Carol 14B.I10-120I30Alfrl4Alic 13Barb 13aCaro 14C.-10I-201-30Alfrl4edAlicl3eBarbl3araCaro 141D.-I10I-20I30Alfred 14Alice 13Barbara 13Carol 14Answer:BQUESTION 33The contents of the raw data file TEAM are listed below:-I-10I-20I-30Janice 10Henri 11Michael 11Susan 12The following SAS program is submitted:A-The Power of KnowingA00-201data group;infile team;input name$15.age 2.;file file-specification,;put name$15,=5 age 2.;run;Which one of the following describes the output created?A.a raw data file onlyB.a SAS data set named GROUP onl
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 教育专区 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服