SAS Base Programming For SAS (r) 9

Transcription

SAS Institute A00-211SAS Base Programming for SAS (r) 9Version: 5.9

SAS Institute A00-211 ExamTopic 1, Volume AQUESTION NO: 1The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned apermanent label of “Asking Price”. Which SAS program temporarily replaces the label “AskingPrice” with the label “Sale Price” in the output?A. proc print data sasuser.houses; label price “Sale Price”; run;B. proc print data sasuser.houses label; label price “Sale Price”; run;C. proc print data sasuser.houses label; label price “Sale Price”; run;D. proc print data sasuser.houses; price “Sale Price”; run;Answer: CExplanation:QUESTION NO: 2The following SAS program is submitted:data work.empsalary;set work.people (in inemp)work.money (in insal);if insal and inemp;run;The SAS data set WORKPEOPLE has 5 observations, and the data set WORKMONEY has 7observations. How many observations will the data set WORK.EMPSALARY contain?A. 0B. 5C. 7D. 12Answer: AExplanation:www.braindumps.com2

SAS Institute A00-211 ExamQUESTION NO: 3The following SAS program is submitted:data work.accounting;set work.dept1 work.dept2;jobcode ‘FA1’;length jobcode 8;run;A character variable named JOBCODE is contained in both the WORK.DEPT1 andWORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the WORK.DEPT1data set and a length of 7 in the WORK.DEPT2 data set. What is the length of the variableJOBCODE in the output data set?A. 3B. 5C. 7D. 8Answer: BExplanation:QUESTION NO: 4Given the SAS data set SASDATA TWO:SASDATA TWOXY---523156The following SAS program is submitted:www.braindumps.com3

SAS Institute A00-211 Examdata sasuser.one two sasdata.three;set sasdata two;if x 5 then output sasuser.one;else output sasdata two;run;What is the result?A. data set SASUSER.ONE has 5 observationsdata set SASUSER.TWO has 5 observationsdata set WORK.OTHER has 3 observationsB. data set SASUSER.ONE has 2 observationsdata set SASUSER.TWO has 2 observationsdata set WORK.OTHER has 1 observationsC. data set SASUSER.ONE has 2 observationsdata set SASUSER.TWO has 2 observationsdata set WORK.OTHER has 5 observationsD. No data sets are output.The DATA step fails execution due to syntax errors.Answer: AExplanation:QUESTION NO: 5The following SAS program is submitted:footnote1 ‘Sales Report for Last Month’;footnote2 ‘Selected Products Only’;footnote3 ‘All Regions’;footnote4 ‘All Figures in Thousands of Dollars’;proc print data sasuser.shoes;footnote2 ‘All Products’;run;www.braindumps.com4

SAS Institute A00-211 ExamWhich footnote(s) is/are displayed in the report?A. All ProductsB. Sales Report for Last Month All ProductsC. All Products All Regions All Figures in Thousands of DollarsD. Sales Report for Last Month All Products All Regions All Figures in Thousands of DollarsAnswer: BExplanation:QUESTION NO: 6Given the raw data record DEPT:---- ----10--- ----20--- ----30Printing 750The following SAS program is submitted:data bonus;infile ‘dept’;inputdept 1-11 number 13- 15; insert statement here run;Which SAS statement completes the program and results in a value of ‘Printing750’ for theDEPARTMENT variable?A. department dept II number;B. department left(dept) II number;C. department trim(dept) number;D. department trim(dept) put(number,3.);Answer: DExplanation:www.braindumps.com5

SAS Institute A00-211 ExamQUESTION NO: 7The following SAS program is submitted:data one;addressl ‘214 London Way’;run;data one;set one;address tranwrd(address1, ‘Way’, ‘Drive’); run;What are the length and value of the variable ADDRESS?A. Length is 14; value is ‘214 London Dri’.B. Length is 14; value is ‘214 London Way’.C. Length is 16; value is ‘214 London Drive’.D. Length is 200; value is ‘214 London Drive’.Answer: DExplanation:QUESTION NO: 8The following SAS program is submitted:data work.sets;do until (prod gt 6);prod 1;end;run;What is the value of the variable PROD in the output data set?A. 6B. 7www.braindumps.com6

SAS Institute A00-211 ExamC. 8D. (missing numeric)Answer: BExplanation:QUESTION NO: 9The SAS data sets WORK.EMPLOYEE and WORK.SALARY are shown below:WORK.EMPLOYEE WORK.SALARYfname age 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 FNAMEvariable?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: DExplanation:www.braindumps.com7

SAS Institute A00-211 ExamQUESTION NO: 10Which program displays a listing of all data sets in the SASUSER library?A. proc contents lib sasuser.all; run;B. proc contents data sasuser.all; run;C. proc contents lib sasuser. alI ; run;D. proc contents data sasuser. all ; run;Answer: DExplanation:QUESTION NO: 11The following SAS program is submitted:proc sort data work.employee;by descending fname;proc sort data work.salary;by descending fname;data work.empdata;merge work.employeework.salary;by fname;run;Why does the program rail to execute?A. The SORT procedures contain invalid syntax.B. The merged data sets are not permanent SAS data sets.C. The RUN statement was omitted alter each or the SORT procedures.D. The data sets were not merged in the order by which they were sorted.www.braindumps.com8

SAS Institute A00-211 ExamAnswer: DExplanation:QUESTION NO: 12The following SAS program is submittad:data work.sales;do year 1 to 5;do month 1 to 12;x 1;outputend;end;run;How many observations are written the WORK SALES data set?A. 0B. 1C. 5D. 60Answer: DExplanation:QUESTION NO: 13Given the following raw data record:----I----10---I----20---I----30son Travis,The following output is desired:www.braindumps.com9

SAS Institute A00-211 ExamObs relation firstname1 son TravisWhich SAS program correctly reads in the raw data?A. data family ( dIm ‘,’); infile ‘tile specification’; input relation firstname ; run;B. options dIm ‘,’; data family; infile ‘file specification’; input relation firstname ; run;C. data family; infile ‘file specification’ dIm ‘,’; input relation firstname ; run;D. data family; infile ‘file specification’; input relation firstname / dim ‘,’; run;Answer: CExplanation:QUESTION NO: 14Given the SAS data set AGES:AGESAGE--------The variable AGE contains character values. The following SAS program is submitted:data subset;set ages;where age 12;run;How many observations are written out to the data set SUBSET?A. 0B. 1C. 2D. 3Answer: AExplanation:www.braindumps.com10

SAS Institute A00-211 ExamQUESTION NO: 15Given the SAS data set PRICES:PRICESprodid S 2.34HARDWARE30010R18KY21.29SOFTWARE2553KL8BY 6.37HARDWARE12515DY65DW 5.60HARDWARE455DGTY23 4.55HARDWARE672The following SAS program is submitted:data hware inter soft;set prices (keep producttype price);if price le 5.00;if producttype ‘HARDWARE’ then output HWARE;else if producttype ‘NETWORK’ then output INTER;else if producttype ‘SOFTWARE’ then output SOFT;run;How many observations does the HWARE data set contain?www.braindumps.com11

SAS Institute A00-211 ExamA. 0B. 2C. 3D. 4Answer: BExplanation:QUESTION NO: 16The following SAS program is submitted:data work.accounting;set work.department;length jobcode 12;jobcode ’FAl’;run;The WORK.DEPARTMENT data set contains a character variable named JOBCODE with a lengthof 5. What is the result?A. The length of the variable JOBCODE is 3.B. The length of the variable JOBCODE is 5.C. The length of the variable JOSBODE is 12.D. The program fails to execute due to errors.Answer: BExplanation:QUESTION NO: 17Which ODS statement option terminates output being written to an HTML rile?A. ENDB. QUITC. STOPD. CLOSEwww.braindumps.com12

SAS Institute A00-211 ExamAnswer: DExplanation:QUESTION NO: 18The SAS data set PETS is sorted by the variables TYPE and BREED.The following SAS program is submitted:proc print data pets;var type breed;sum number;run;What is the result?A. The SUM statement produces only a grand total of NUMBER.B. The SUM statement produces only subtotals of NUMBER for each value of TYPE.C. The SUM statement produces both a grand total of NUMBER and subtotals of NUMBER foreach value of TYPE.D. Nothing is produced by the SUM statement; the program fails to execute.Answer: AExplanation:QUESTION NO: 19The following SAS program is submitted:data work.passengers;if OrigPassengers . then'OrigPassengers 100;TransPassengers 100;OrigPassengers .;www.braindumps.com13

SAS Institute A00-211 ExamTotalPassengers sum (OrigPassengers, TransPassengers) 0;run;What is the value of the TOTALPASSENGERS variable in the output data set?A. 0B. 100C. 200D. (missing numeric value)Answer: BExplanation:QUESTION NO: 20Given the SAS data set PRICES:PRICESProdid S 2.34HARDWARE30010R18KY2 1.29SOFTWARE2553KL8BY 6.37HARDWARE12515DY65DW 5.60HARDWARE455DGTY23 4.55HARDWARE672The following SAS program is submitted:data hware inter cheap;set prices(keep productype price);if producttype ‘HARDWARE’ then output hware; else if producttype ‘NETWORK’ thenoutputinter; if price le 5.00;run;www.braindumps.com14

SAS Institute A00-211 Examif producttype ‘HARDWARE’ then output hware; else if producttype ‘NETWORK’ then outputinter; if price le 5.00;run;How many observations does the HWARE data set contain?A. 0B. 2C. 3D. 4Answer: DExplanation:QUESTION NO: 21The following SAS program is submitted:How many observations are written to the WORK.SALES data set?A. 0B. 1C. 5D. 60Answer: BExplanation:QUESTION NO: 22The following SAS program is submitted:www.braindumps.com15

SAS Institute A00-211 ExamThe program fails execution due to syntax errors. What is the cause of the syntax error?A. The variable MONTHSALES does not exist.B. An array cannot be referenced on a KEEP data set option.C. The KEEP data set option should be (KEEP MONTHSALES).D. The KEEP data set option should be the statement KEEP MONTHSALES{12}.Answer: BExplanation:QUESTION NO: 23Given the SAS data set EMPLOYEES:EMPLOYEESNAME SALARY-------- he following SAS program is submitted:proc print data employees; where name like ‘ i%’;run;What is contained in the output?www.braindumps.com16

SAS Institute A00-211 ExamA. Liu onlyB. Innis and Ellis onlyC. Innis, Ellis, and Liu onlyD. Innis, Jolli, Ellis, and LiuAnswer: AExplanation:QUESTION NO: 24Given the SAS data set ONE:ONEObsDte------------109JAN2005212JAN2005The following SAS program is submitted:data two;set one;day insert expression here ;format dte date9.;run;The data set TWO is created:TWOObsDteDay109JAN2005112JAN20054Which expression successfully completed the program and created the variable DAY?www.braindumps.com17

SAS Institute A00-211 ExamA. day(dte)B. weekday(dte)C. dayofweek(dte)D. datdif(dte,’01jan2005’d,’act/act’)Answer: BExplanation:QUESTION NO: 25Read the table:Given the SAS data set T7TWOSTORY21.0692501450NORTH6TWOSTORY42.5102950 2000SOUTHwww.braindumps.com18

SAS Institute A00-211 ExamThe following SAS program is submitted:proc report data sasuser.houses nowd headline;column style price;where price It 100000; insert DEFINE statement here define price / mean width 9 format dollar12.;title;run;The following output is desired:styleprice------------CONDO 79,700TWOSTORY 62550Which DEFINE statement completes the program and produces the desired output?A. define style / width 9,B. define style / orderwidth 9;C. define style / group width 9;D. define style / display width 9;Answer: CExplanation:QUESTION NO: 26Given the SAS data set ---------------------www.braindumps.com19

SAS Institute A00-211 ExamAmy24Amy17Gerard33Wang33Wang112Wang18The following SAS program is submitted:proc sort data work.awards;by descending fname points;run;How are the observations sorted?A. ENAME POINTS MONTHWang33Wang112Wang18Gerard33Amy24Amy17B. ENAME POINTS MONTHAmy24Amy17Gerard33Wang33Wang18Wang112C. ENAME POINTS MONTH Wang33Wang18Wang112Gerard33Amy24Amy17D. ENAME POINTS MONTHWang112Wang18Wang33www.braindumps.com20

SAS Institute A00-211 ExamGerard33Amy17Amy24Answer: DExplanation:QUESTION NO: 27The following SAS program is submitted:libname temp ‘SAS data library’;data work.new;set temp.jobs;format newdate mmddw10.;mdate month(newdate);ddate weekday(newdate);run;proc print data work.new; run;The variable NEWDATE contains the SAS date value for April 15. 2005. What output is producedif April 15, 2005 falls on a Friday?A. Obsnewdate mdate ddate104/15/2005 APR 6B. Obs newdate mdate ddate104/15/2005 4 6C. Obs newdate mdate ddate104/15/2005 APR 7D. Obs newdate mdate ddate104/15/2005 4 7Answer: BExplanation:www.braindumps.com21

SAS Institute A00-211 ExamQUESTION NO: 28The contents of the raw data file PRODUCT are listed below:--------10-------20-------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: CExplanation:QUESTION NO: 29The following SAS program is submitted:proc contents data sashelp.class varnum; quit;What does the VARNUM option print?A. a list of variable namesB. the total number of variablesC. a list of the variables in alphabetic orderD. a list of the variables in the order they were createdAnswer: DExplanation:www.braindumps.com22

SAS Institute A00-211 ExamQUESTION NO: 30The following SAS program is submitted:data test;set chemists;jobcode ‘Chem2’then description ‘Senior Chemist’;else description ‘Unknown’;run;The value for the variable JOBCODE is:JOBCODE------------chem2What is the value of the variable DESCRIPTION?A. chem2B. UnknownC. Senior ChemistD. ‘ ‘ (missing character value)Answer: BExplanation:QUESTION NO: 31Given the AIRPLANES data setAlRPLANESTYPE MPGwww.braindumps.com23

SAS Institute A00-211 Exam-------- -----F-18 105C-130 25Harrier 75A-6 110The following SAS program is submitted:data gt100;set airplanes(keep type mpg load);load mpg * 150;run;The program fails to execute due to syntax errors.What is the cause of the syntax error?A. MPG is not a numeric variable.B. LOAD is not a variable in the data set GT100.C. LOAD is not variable in the data set AIRPLANES.D. LOAD must be defined prior to the SET statement.Answer: CExplanation:QUESTION NO: 32Given the raw data file EMPLOYEE:----I----1 0---I----20---I----30Ruth 39 11Jose 32 22Sue 30 33www.braindumps.com24

SAS Institute A00-211 ExamJohn 40 44The following SAS program is submitted:data test;infile ‘employee’;input employee name 1-4;if employee name ‘Ruth’ then input idnum 10-11;else input age 7-8;run;What value does the variable IDNUM contain when the name of the employee is “Ruth”?A. 11B. 22C. 33D. (missing numeric value)Answer: BExplanation:QUESTION NO: 33The following SAS program is submitted:data temp.x;set sasuser.y;run;What must be submitted prior to this SAS program for the program to execute successfully?A. A LIBNAME statement for the libref TEMP only must be submitted.B. A LIBNAME statement for the libref SASUSER only must be submitted.C. LIBNAME statements for the librefs TEMP and SASUSER must be submitted.D. No LIBNAME statement needs to be submitted.www.braindumps.com25

SAS Institute A00-211 ExamAnswer: AExplanation:QUESTION NO: 34The data set RALESTATE has the variable LOCALFEE with a format or 9. and a variableCOUNTRYFEE with a format or 7.;The following SAS program is submitted:data history;format local fee country fee percent6.;set realestate;local fee local fee / 100;country fee country fee / 100;run;What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?A. LOCALFEE has format of 9. and COUNTRYFEE has a format of 7.B. LOCALFEE has format of 9. and COUNTRYFEE has a format of percent6.C. LOCALFEE has format of percent6. and COUNTRYFEE has a format of percent6.D. The data step fails execution; there is no format for LOCALFEEAnswer: CExplanation:QUESTION NO: 35The following SAS program is submitted:proc freq data class;tables gender * age / insert option here ;run;www.braindumps.com26

SAS Institute A00-211 ExamThe following report is created:The FREQ ProcedureTable of gender by ageRow ColumnGender ageFrequencyPercent Percent tal10100.00Which option correctly completes the program and creates the report?A. LISTB. NOCOLSC. CROSSLISTD. NOCROSSTABAnswer: CExplanation:www.braindumps.com27

SAS Institute A00-211 ExamQUESTION NO: 36The value 110700 is stored in a numeric variable named SALARY.Which FORMAT statement displays the value as 110,700.00 in a report?A. format salary comma11.2;B. format salary dollar8.2;C. format salary dollar11.2;D. format salary comma8.2 dollar8.2;Answer: CExplanation:QUESTION NO: 37Given the raw data file YEARAMT:---- ---10--- ---20--- ----301901 21905 11910 61925 .1941 1The following SAS program is submitted:data coins;infile ‘yearamt’;input year quantity; insert statement(s) here run;Which statement(s) completed the program and produced a non-missing value for the variableTOTQUANTITY in the final observation of the output data set?www.braindumps.com28

SAS Institute A00-211 ExamA. totquantity quantity;B. totquantity sum(totquantity quantity);C. retain totquantity; totquantity totquantity quantity;D. retain totquantity0; totquantity totquantity quantity;Answer: AExplanation:QUESTION NO: 38Given the SAS data set EMPLOYEE INFO:EMPLOYEE 2198111.12The following SAS program is submitted:proc sort data employee info; insert BY statement here run;Which BY statement completes the program and sorts the data sequentially by ascendingexpense values within each ascending IDNUMBER value?www.braindumps.com29

SAS Institute A00-211 ExamA. by Expenses IDNumber;B. by IDNumber Expenses;C. by ascending Expenses IDNumber;D. by ascending IDNumber ascending Expenses;Answer: BExplanation:QUESTION NO: 39The following SAS program is submitted:proc formatvalue score 1 - 50 ‘Fail’51 - 100 ‘Pass’;run;proc report data work.courses nowd;column exam;define exam / display format score.;run;The variable EXAM has a value of 50.5.How will the EXAM variable value be displayed in the REPORT procedure output?A. FailB. PassC. 50.5D. . (missing numeric value)Answer: CExplanation:QUESTION NO: 40www.braindumps.com30

SAS Institute A00-211 ExamWhat is the purpose or the MISSOVER option on the INFILE statement?A. It prevents SAS from loading a new record when the end of the current record is reached.B. It enables SAS to scan the input data records until the character string that is specified in the@‘character-string’ expression is round.C. It enables SAS to continue to read the next input data record if it does not find values in thecurrent input tine for all the variables in the statement.D. It causes the DATA step to stop processing if an INPUT statement reaches the end of thecurrent record without finding values for all variables in the statement.Answer: AExplanation:QUESTION NO: 41The following SAS program is submitted:data work.test;set work.staff (keep jansales febsales marsales);array diff sales{3} difsales1 - difsales3;array monthly{3} jansales febsales marsales;run;What new variables are created?A. JANSALES, FEBSALES and MARSALESB. MONTHLY1, MONTHLY2 and MONTHLY3C. DIFSALES1, DIFSALES2 and DIFSALES3D. DIFF SALES1, DIFF SALES2 and DIFF SALES3Answer: CExplanation:QUESTION NO: 42What describes the SAS automatic ERROR variable?www.braindumps.com31

SAS Institute A00-211 ExamA. The ERROR variable contains the values ‘TRUE’ or ‘FALSE.’B. The ERROR variable maintains a count of the number of data errors.C. The ERROR variable can be used in expressions or calculations in the DATA step.D. The ERROR variable contains the number or the observation that caused the error.Answer: CExplanation:QUESTION NO: 43Given the following raw data record:07Jan2005Which INFORMAT reads this raw data and stores it as a SAS date value?A. dmy9.B. date9.C. ddMMMyy9.D. ddmmmyyyy9.Answer: BExplanation:QUESTION NO: 44Which statement correctly computes the average of four numerical values?A. average mean(num1, num4);B. average mean(num1 - num4);C. average mean(ofnum1 - num4)D. average mean(num1 num2 num3 num4);Answer: CExplanation:QUESTION NO: 45www.braindumps.com32

SAS Institute A00-211 ExamThe following SAS program is submitted:libname temp ‘SAS data library’;data temp.sales;merge temp.saleswork.receipt;by names;run;The input data files are sorted by the NAMES variable:What is the result?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 andwrite operations.D. The program fails execution because the SAS data sets on the MERGE statement are in twodifferent libraries.Answer: BExplanation:QUESTION NO: 46Given the contents of the raw data file owThe following SAS program is submitted:data flowers;infile ‘typecolor’;input type 1-5 1 color ;run;www.braindumps.com33

SAS Institute A00-211 ExamWhat are the values of the variables TYPE and COLOR?A. type colordaisygreenB. type colordaisy ellowC. type colordaisyyellow” “(missing character value)D. No values are stored for the TYPE and COLOR variables.Answer: BExplanation:QUESTION NO: 47A user-defined format has been created using the FORMAT procedure. Where is it stored?A. in a SAS catalogB. in an external binary fileC. in a SAS dataset in the WORK libraryD. in a SAS dataset in a permanent SAS data libraryAnswer: AExplanation:QUESTION NO: 48The following SAS program is submitted:data work.flights;destination ‘cph’;select(destination);when(’LHR’) city ‘London’;when(’CPH’) city ‘Copenhagen’;otherwise city ‘Other’;end;www.braindumps.com34

SAS Institute A00-211 Examrun;What is the value of the CITY variable?A. OtherB. CopenhC. CopenhagenD. ‘‘(missing character value)Answer: AExplanation:QUESTION NO: 49The following SAS program is submitted:data work.new;length word 7;amount 4;it amount 4 then word ‘FOUR’;else if amount 7then word ‘SEVEN’;else word ‘NONE!!!’;amount 7;run;What are the values of the AMOUNT and WORD variables in SAS dataset work.new?A. amount word4 FOURB. amount word4 NONE!!!C. amount word7 FOURD. amount word7 SEVENwww.braindumps.com35

SAS Institute A00-211 ExamAnswer: CExplanation:QUESTION NO: 50The following SAS program is submitted, creating the SAS data set ONE:data one;infile ‘file specification’;input num chars ;run;ONENUMCHAR---------------123323177The following SAS program is submitted:proc print data one;where char 23;run;What is output?A. NUM CHAR1 772B. NUM CHAR1 233 23C. NUM CHARwww.braindumps.com36

SAS Institute A00-211 Exam1 233 231 77D. No output is generated.Answer: DExplanation:QUESTION NO: 51The following SAS program is submitted:data work.retail;cost ‘20000’;total .10* costrun;What is the result?A. The value of the variable TOTAL in the output data set is 2000. No messages are written to theSAS log.B. The value of the variable TOTAL in the output data set is 2000. A note that conversion hastaken place is written to the SAS log.C. The value of the variable TOTAL in the output data set is missing. An error message is writtento the SAS log.D. The variable TOTAL in the output data set has no value. The program fails to execute due to asyntax error.Answer: BExplanation:QUESTION NO: 52The following SAS program is submitted:Data null ;set old;www.braindumps.com37

SAS Institute A00-211 Examput sales 1 sales2;run;Where is the output written?A. to the SAS logB. to the SAS data set NULLC. to the SAS output window or to an output fileD. to the raw data file that was most recently openedAnswer: AExplanation:QUESTION NO: 53The following SAS program is submitted:data work.test;array items{3} temporary ;run;What are the names of the variable(s) in the WORKTEST data set?A. ITEMSB. ITEMS1, ITEMS2, ITEMS3C. No variables are created because it is a temporary array.D. The program fails to execute because there are no variables listed on the ARRAY statement.Answer: CExplanation:QUESTION NO: 54Read the tablewww.braindumps.com38

SAS Institute A00-211 ExamThe following SAS program is submitted:proc freq data sales; insert TABLES statement here run;The following output is created by the FREQUENCY procedure:www.braindumps.com39

SAS Institute A00-211 ExamWhich TABLES statement(s) completed the program and produced the output?A. tables region product;B. tables region * product;C. tables product * region;D. tables product; tables region;Answer: BExplanation:QUESTION NO: 55The following SAS program is submitted:data one;date ‘04juI2005’d;format date weekdate.; run;proc print data one; run;What output is generated?www.braindumps.com40

SAS Institute A00-211 ExamA. Obs date1 Monday, July 4, 2005B. Obs date1 July4, 2005C. Obs date1 04Jul2005D. Obs date1 Monday, 07/04/2005Answer: AExplanation:QUESTION NO: 56The following SAS program is submitted:data test;set sasuser.employees;if 2 le years service le 10 thenamount 1000;else amount 0;amount per year years service / amountrun;What is the value of the variable AMOUNT PER YEAR if an employee has been with thecompany for one year?A. 0B. 0.001C. 1D. . (missing numeric value)Answer: DExplanation:QUESTION NO: 57www.braindumps.com41

SAS Institute A00-211 ExamGiven the SAS data set PERM.STUDENTS:PERM.STUDENTS NAMEAGE---------------- Alfred14Alice13Barbara13Carol14The following SAS program is submitted:libname perm ‘SAS data library’;data students;set perm.students;file ‘file specification’;put name age; insert statement here run;The following double-spaced file is desired as outputAlfred 14Alice 13Barbara 13Carol 14Which statement completes the program and creates the desired file?A. putB. put/;C. double;D. put null ;Answer: AExplanation:www.braindumps.com42

SAS Institute A00-211 ExamQUESTION NO: 58The following SAS program is submitted:data work.total;set work.salary(keep department wagerate);by department;if first.departmentthen payroll 0;payroll wagerate;if last.department;run;The SAS data set named WORKSALARY contains 10 observations for each department, and iscurrently ordered by DEPARTMENT.Which statement is true?A. The BY statement in the DATA step causes a syntax error.B. The statement payroll wagerate; in the DATA step causes a syntax error.C. The values of the variable PAYROLL represent the total for each department in theWORK.SALARY data set.D. The values of the variable PAYROLL represent a total for all values of WAGERATE in theWORKSALARY data set.Answer: CExplanation:QUESTION NO: 59Given the contents of the raw data file EMPLOYEE:---- ----10---- ----20---- ----30www.braindumps.com43

SAS Institute A00-211 2004EDUCThe following SAS program is submitted:data emps;infile ‘employee’;input@1 name @15 date insert INFORMAT here @25 department ;run;Which INFORMAT correctly completes the program?A. date9.B. ddmmyyyy9.C. ddmmyy10.D. ddmmyyyy10.Answer: CExplanation:QUESTION NO: 60The following SAS program is submitted:www.braindumps.com44

SAS Institute A00-211 Examdata test;infile ‘file specification’;input name amount@@;run;Which of the following is true?A. Two @@ together are the same as one c.B. Two @@ hold the data records until the bottom of the DATA step.C. Two @@ hold the raw data record across iterations of the DATA step.D. Two @@ are invalid syntax and will cause the program to fail to execute.Answer: CExplanation:QUESTION NO: 61Given the SAS data set QTR 1 RDU76254YYZ82174The following SAS program is submitted:proc sort data qtr1 revenue;by destination descending revenue; run;What is the first observation in the output data set?A. destination revenuewww.braindumps.com45

SAS Institute A00-211 ExamFRA 62129B. destination revenueFRA 75962C. destination revenueYYZ 53634D. destination revenueYYZ 82174Answer: BExplanation:QUESTION NO: 62The following SAS program is submitted:data numrecords;infile ‘file specification’;input@1 patient 15.relative 16-26@;if relative ‘children’ theninput @54 diagnosis 15. @;else if relative ‘parents’ theninput @28 doctor 15.clinic 44-53@54 diagnosis 15. @;input age;run;How many raw data records are read during each iteration of the DATA step execution?A. 1B. 2C. 3D. 4www.braindumps.com46

SAS Institute A00-211 ExamAnswer: BExplanation:QUESTION NO: 63Given the SAS data set ONE:Given the SAS data set WORK.ONE:The following SAS program is submitted:Which report is produced?www.braindumps.com47

SAS Institute A00-211 ExamA. Option AB. Option BC. Option CD. Option DAnswer: BExplanation:QUESTION NO: 64After a SAS program is submitted, the following is written to the SAS log:www.braindumps.com48

SAS Institute A00-211 Exam105 data january;106 set allmonths(keep product month num sold cost);107 if month ‘Jan’

SAS Institute A00-211 SAS Base Programming for SAS (r) 9 Version: 5.9. Topic 1, Volume A QUESTION NO: 1 . SAS Institute A00-211 Exam www.braindumps.com 2. QUESTION NO: 3 The following SAS program is submitted: data work.accounting; set work.dept1 work.dept2; jobcode 'FA1';