GoConqr has a new look! Let us know what you think.

Quiz

CRACKMAN_70

Terry Yan 70 questions 6,702 views 5.0 (4 ratings)

Take the quiz

Questions in this quiz (70)

  1. 11.The following SAS program is submitted:

    data WORK.TOTAL;

    set WORK.SALARY;

    by Department Gender;

    if First.<_insert_code_> then Payroll=0;

    Payroll+Wagerate;

    if Last.<_insert_code_>;

    run;

    The SAS data set WORK.SALARY is currently ordered by Gender within Department.

    Which inserted code will accumulate subtotals for each Gender within Department?
    1. AA. Gender
    2. BB. Department
    3. CC. Gender Department
    4. DD. Department Gender
  2. 22.Given the following raw data records in TEXTFILE.TXT:

    —-|—-10—|—-20—|—-30
    John,FEB,13,25,14,27,Final
    John,MAR,26,17,29,11,23,Current
    Tina,FEB,15,18,12,13,Final
    Tina,MAR,29,14,19,27,20,Current

    The following output is desired:

    Obs Name Month Status Week1 Week2 Week3 Week4 Week5

    1 John FEB Final $13 $25 $14 $27 .
    2 John MAR Current $26 $17 $29 $11 $23
    3 Tina FEB Final $15 $18 $12 $13 .
    4 Tina MAR Current $29 $14 $19 $27 $20

    Which SAS program correctly produces the desired output?
    1. AA.
      data WORK.NUMBERS;
      length Name $ 4 Month $ 3 Status $ 7;
      infile \’TEXTFILE.TXT\’ dsd;
      input Name $ Month $;
      if Month=\’FEB\’ then input Week1 Week2 Week3 Week4 Status $;
      else if Month=\’MAR\’ then input Week1 Week2 Week3 Week4 Week5 Status $;
      format Week1-Week5 dollar6.;
      run;
      proc print data=WORK.NUMBERS;
      run;
    2. BB.
      data WORK.NUMBERS;
      length Name $ 4 Month $ 3 Status $ 7;
      infile \’TEXTFILE.TXT\’ dlm=\’,\’ missover;
      input Name $ Month $;
      if Month=\’FEB\’ then input Week1 Week2 Week3 Week4 Status $;
      else if Month=\’MAR\’ then input Week1 Week2 Week3 Week4 Week5 Status $;
      format Week1-Week5 dollar6.;
      run;
      proc print data=WORK.NUMBERS;
      run;
    3. CC.
      data WORK.NUMBERS;
      length Name $ 4 Month $ 3 Status $ 7;
      infile \’TEXTFILE.TXT\’ dlm=\’,\’;
      input Name $ Month $ @;
      if Month=\’FEB\’ then input Week1 Week2 Week3 Week4 Status $;
      else if Month=\’MAR\’ then input Week1 Week2 Week3 Week4 Week5 Status $;
      format Week1-Week5 dollar6.;
      run;
      proc print data=WORK.NUMBERS;
      run;
    4. DD.
      data WORK.NUMBERS;
      length Name $ 4 Month $ 3 Status $ 7;
      infile \’TEXTFILE.TXT\’ dsd @;
      input Name $ Month $;
      if Month=\’FEB\’ then input Week1 Week2 Week3 Week4 Status $;
      else if Month=\’MAR\’ then input Week1 Week2 Week3 Week4 Week5 Status $;
      format Week1-Week5 dollar6.;
      run;
      proc print data=WORK.NUMBERS;
      run;
  3. 33.The Excel workbook REGIONS.XLS contains the following four worksheets:
    EAST
    WEST
    NORTH
    SOUTH

    The following program is submitted:

    libname MYXLS \’regions.xls\’;

    Which PROC PRINT step correctly displays the NORTH worksheet?
    1. AA. proc print data=MYXLS.NORTH;run;
    2. BB. proc print data=MYXLS.NORTH$;run;
    3. CC. proc print data=MYXLS.\’NORTH\’e;run;
    4. DD. proc print data=MYXLS.\’NORTH$\’n;run;
  4. 44.The following SAS program is submitted:

    data WORK.DATE_INFO;
    Day=\”01\” ;
    Yr=1960 ;
    X=mdy(Day,01,Yr) ;
    run;

    What is the value of the variable X?
    1. AA. the numeric value 0
    2. BB. the character value \”01011960\”
    3. CC. a missing value due to syntax errors
    4. DD. the step will not compile because of the character argument in the mdy function
  5. 55.Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?
    1. AA. infile \’customer.txt\’ 1-10;
    2. BB. input \’customer.txt\’ stop@10;
    3. CC. infile \’customer.txt\’ obs=10;
    4. DD. input \’customer.txt\’ stop=10;
  6. 66.After a SAS program is submitted, the following is written to the SAS log:

    101 data WORK.JANUARY;
    102 set WORK.ALLYEAR(keep=product month num_Sold Cost);
    103 if Month=\’Jan\’ then output WORK.JANUARY;
    104 Sales=Cost * Num_Sold;
    105 keep=Product Sales;
    —–
    22
    ERROR 22-322: Syntax error, expecting one of the following: !,!!, &, *, **, +, -, , <=, <>, =, >, >=,
    AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,NOTIN, OR, ^=, |, ||, ~=.
    106 run;

    What changes should be made to the KEEP statement to correct the errors in the LOG?
    1. AA. keep=(Product Sales);
    2. BB. keep Product, Sales;
    3. CC. keep=Product, Sales;
    4. DD. keep Product Sales;
  7. 77.Which of the following choices is an unacceptable ODS destination for producing output that can be viewed in Microsoft Excel?
    1. AA. MSOFFICE2K
    2. BB. EXCELXP
    3. CC. CSVALL
    4. DD. WINXP
  8. 88.The SAS data set named WORK.SALARY contains 10 observations for each department,and is currently ordered by Department. The following SAS program is submitted:

    data WORK.TOTAL;
    set WORK.SALARY(keep=Department MonthlyWageRate);
    by Department;
    if First.Department=1 then Payroll=0;
    Payroll+(MonthlyWageRate*12);
    if Last.Department=1;
    run;
    Which statement is true?
    1. AA. The by statement in the DATA step causes a syntax error.
    2. BB. The statement Payroll+(MonthlyWageRate*12); in the data step causes a syntax error.
    3. CC. The values of the variable Payroll represent the monthly total for each department in the WORK.SALARY data set.
    4. DD. The values of the variable Payroll represent a monthly total for all values of WAGERATE in the WORK.SALARY data set.
  9. 99. data course;
    input exam;
    datalines;
    50.1
    ;
    run;

    proc format;
    value score 1 – 50 = \’Fail\’
    51 – 100 = \’Pass\’;
    run;

    proc report data =course nowd;
    column exam;
    define exam / display format=score.;
    run;
    What is the value for exam?
    1. AA. Fail
    2. BB. Pass
    3. CC. 50.1
    4. DD. No output
  10. 1010.The following SAS program is submitted:

    data WORK.RETAIL;
    Cost=\’$20.000\’;
    Discount=.10*Cost;
    run;

    What is the result?
    1. AA. The value of the variable Discount in the output data set is 2000.No messages are written to the SAS log.
    2. BB. The value of the variable Discount in the output data set is 2000.A note that conversion has taken place is written to the SAS log.
    3. CC. The value of the variable Discount in the output data set is missing.A note in the SAS log refers to invalid numeric data.
    4. DD. The variable Discount in the output data set is set to zero.No messages are written to the SAS log.

Information

Description
跟crackman做sas base认证试题
Author
Terry Yan
Language
English
Views
6,702
Rating
5.0 out of 5 · 4 ratings
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?