SAS Certification Practice Exam_ Base Programming

download SAS Certification Practice Exam_ Base Programming

of 18

Transcript of SAS Certification Practice Exam_ Base Programming

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    1/18

    SAS

    Certification Practice Exam:

    Base Programming for SAS

    9

    Certification Practice Exam

    You should read the introductory materialbefore you take this practice exam.

    Select the best answer for each question and click Score My Practice Exam.

    A raw data file is listed below.

    1- - - +- - --10- - - +- - - - 20- - - +- - -

    01/ 05/ 1989 Fr ank 1112/ 25/ 1987 J une 1301/ 05/ 1991 Sal l y 9

    The following SAS program is submitted using this file as input:

    data wor k. f ami l y; i nf i l e 'file-specification';

    i nput @1 date_of _bi r t h mmddyy10. @15 f i r st _name $5. @25 age 3;run;

    pr oc pr i nt data=work. f ami l y noobs;run;

    The following output is generated for the Work.Familydata set:

    Date_of_birth First_name Age

    10597 Frank .

    10220 June .

    11327 Sally .

    Which of the following statements is true regarding the Work.Familyoutput?

    a. The output has the expected data values.

    b. The output does not have the expected data values due to an invalid data set name.

    c. The output does not have the expected data values due to an invalid informat for Ageonly.

    d. The output does not have the expected data values due to invalid informats for both Ageand

    Dat e_of _bi r t h.

    1.

    The following SAS program is submitted:

    dat a empl oyees; i nf i l e 'file-specification'; i nput @1 name $10. @15 dat e dat e9 @25 depar t ment $;run;

    How many numeric variables are created?

    a. 0

    b. 1

    c. 2

    2.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    2/18

    d. 3

    What is the function of the FILENAME statement in SAS?

    a. It associates a file reference with an external file.

    b. It associates a library reference with an external file.

    c. It associates a file reference with a relational database.

    d. It associates a library reference with a relational database.

    3.

    A raw data file is listed below.

    1- - - +- - --10- - - +- - - - 20- - - +- - -

    J ose, 47, 210Sue, , 108

    The following SAS program is submitted using this file as input:

    data empl oyeest ats; ; i nput name $ age wei ght ;run;

    The following output is desired:

    name age w eight

    Jose 47 210

    Sue . 108

    Which of the following INFILE statements completes the program and accesses the data correctly?

    a. i nf i l e ' file-specification' pad;

    b.i nf i l e ' file-specification' dsd;

    c.i nf i l e ' file-specification' mi ssover;

    d.i nf i l e ' file-specification' dl m=' , ' ;

    4.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    3/18

    A raw data file is listed below.

    1- - - +- - --10- - - +- - - - 20- - - +- - -

    RANCH, 1250, 10MAR2004SPLI T, 1190, 10/ 20/ 2004CONDO, 1400, 17J UN2004

    TWOSTORY, 1810, 12/ 31/ 2004RANCH, 1500, 20J AN2004SPLI T, 1615, 08/ 19/ 2004

    The following SAS program is submitted using this file as input:

    dat a work. condo_r anch; i nf i l e ' file-specification' dsd; i nput st yl e $ @; i f st yl e = ' CONDO' or st yl e = ' RANCH' t hen i nput sqf eet sal edat e : dat e9. ; el se i nput sqf eet sal edate : mmddyy10. ;

    r un;

    How many observations does the Work.Condo_ranchdata set contain?

    a. 0

    b. 3

    c. 5

    d. 6

    5.

    A raw data file is listed below.

    1- - - +- - --10- - - +- - - - 20- - - +- - - - 30- - - +- - - - 40- - - +- - - - 50TWOSTORY 1040 2 1SANDERS ROAD $55, 850CONDO 2150 4 2. 5J EANS AVENUE $127, 150

    The following program is submitted using this file as input:

    dat a work. houses;

    i nf i l e 'file-specification'; run;

    Which one of the following INPUT statements reads the raw data file correctly?

    a.i nput @1 st yl e $8. +1 sqf eet 4. +1 bedr ooms 1. @20 bat hs 3. st r eet 16. @40 pr i ce dol l ar8;

    b.i nput @1 st yl e $8 +1 sqf eet 4. +1 bedr ooms 1. @20 bat hs 3. st r eet $16 @40 pr i ce dol l ar 8. ;

    c.i nput @1 st yl e $8. +1 sqf eet 4. +1 bedr ooms 1. @20 bat hs 3.

    6.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    4/18

    st r eet $16. @40 pr i ce dol l ar 8. ;

    d.i nput @1 st yl e $8. +1 sqf eet 4. +1 bedr ooms 1. @20 bat hs 3 st r eet 16. @40 pr i ce dol l ar 8. ;

    The following SAS program is submitted:

    data bot h; set M F( i n = I NF) ; i f I NF t hen gen = ' F' ; el se gen = ' M' ; by name;run;

    The SAS data sets Work.Mand Work.Fare each sorted by the variable Name. The data set Work.M

    contains 10 observations, and the data setWork.Fcontains 9 observations. How many observations doesthe Work.Bothdata set contain?

    a. 0

    b. 9

    c. 10

    d. 19

    7.

    The following SAS program is submitted:

    data t est ( dr op=age) ; set sashel p. cl ass( keep=name age gender

    hei ght wei ght ) ; dr op=gender ; newage=age+1;

    run;

    Sashelp.Classcontains 5 variables. What is the result?

    a. No variables are written to the data set Work.Test.

    b. 4 variables are written to the data set Work.Test.

    c. 5 variables are written to the data set Work.Test.

    d. 6 variables are written to the data set Work.Test.

    8.

    The following SAS program is submitted at the start of a new SAS session:

    l i bname sasdata 'SAS-data-library';data sasdat a. sal es;

    set sasdata. sal esdata; pr of i t =expenses- r evenues;run;

    pr oc pri nt dat a=sal es;run;

    The SAS data set Sasdata.Salesdatahas 10 observations. Which one of the following answers explainswhy a report fails to generate?

    a. The DATA step fails to execute.

    b. The SAS data set Salesdoes not exist.

    c. The SAS data set Saleshas no observations.

    9.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    5/18

    d. The PRINT procedure statement syntax is incorrect.

    The SAS data setSasdata.Twois listed below.

    Sasdata.Two

    x y

    5 2

    5 4

    3 6

    The following SAS program is submitted:

    data sasuser. one one; set sasdata. t wo; out put one;run;

    What is the result?

    a. The data set Sasuser.Onehas 0 observations and the data set Onehas 0 observations.

    b. The data set Sasuser.Onehas 0 observations and the data setOnehas 3 observations.c. The data set Sasuser.Onehas 3 observations and the data set Onehas 0 observations.

    d. The data set Sasuser.Onehas 3 observations and the data setOnehas 3 observations.

    10.

    The following SAS program is submitted:

    dat a work. new; y=10; z=05; x=12; dat e=mdy( x, y, z) ;run;

    What is the value of the Dat evariable?

    a. a character string with the value 12/10/05

    b. a character string with the value 10Dec2005

    c. a numeric value of 16780, which represents the SAS date value for December 10, 2005

    d. a numeric value of 121005, which represents the SAS date value for December 10, 2005

    11.

    The following SAS program is submitted:

    data wor k. r eport ; set wor k. sal es_i nf o; i f qt r ( sal es_dat e) ge 3;run;

    The SAS data set Work.Sales_infohas one observation for each month in the year 2005, and the variableSal es_Datecontains a SAS date value for each of the 12 months. How many of the original 12

    observations in Work.Sales_infoare written to the Work.Reportdata set?

    a. 2

    b. 3

    c. 6

    d. 9

    12.

    The following SAS program is submitted:

    dat a _nul l _;

    13.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    6/18

    set ol d( keep=sal es1 sal es2) ; f i l e ' file-specification' ; put sal es1 sal es2;run;

    What is the result?

    a. A raw data file is created with no delimiter separating the fields.

    b. A raw data file is created with a space delimiter separating the fields.

    c. A raw data file is created with a comma delimiter separating the fields.

    d. No raw data file is created. The DATA step fails execution because no delimiter is specified.

    The following SAS program is submitted:

    dat a _nul l _; set ol d = l ast ; put sal es1 sal es2; i f l ast t hen put ' Thi s i s t he end of t he dat a set ' ;r un;

    Which of the following options creates the variable Last ?

    a. END

    b. EOFc. PTOBS

    d. TOTOBS

    14.

    The SAS data set Oneis listed below.

    One

    X Y Z

    1 A 27

    1 A 33

    1 B 45

    2 A 52

    2 B 69

    3 B 70

    4 A 82

    4 C 91

    The following SAS program is submitted:

    dat a two; set one;

    by x; i f f i r st . x;run;

    pr oc pr i nt dat a=t wo noobs;run;

    Which of the following reports is the result?

    a. X Y Z

    1 A 27

    15.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    7/18

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    8/18

    d. CONTENTS

    The observations in the SAS data set Work.Testare ordered by the values of the variable Sal ar y. The

    following SAS program is submitted:

    pr oc sor t data=work. t est ; run;

    Which of the following statements completes the program and sorts the Work.Testdata set by Namein

    descending order?

    a.by desc name;

    b.by name desc;

    c.by descendi ng name;

    d.by name descendi ng;

    19.

    The following SAS program is submitted:

    pr oc sort data=payr ol l ; by Empl oyeeI DNumber ;run;

    How are the observations sorted?

    a. Payrollis re-created in sorted order by Empl oyeeI DNumber .

    b. Payrollis stored in original order, and a new data set Payrollis created in sorted order byEmpl oyeeI DNumber .

    c. Payrollis stored in original order, and a new data set Payrollsortedis created in sorted orderby Empl oyeeI DNumber .

    d. Payrollis re-created in sorted order by Empl oyeeI DNumber , and a new data set Payrollis

    created in sorted order by Empl oyeeI DNumber .

    20.

    Which one of the following SAS programs creates a variable named Ci tywith a value of Chicago?

    a.dat a wor k. ai r por t s; Ai r port Code=' ord' ; i f Ai r port Code=' ORD' Ci t y=' Chi cago' ;r un;

    b.dat a wor k. ai r por t s;

    Ai r por t Code=' ORD' ; i f Ai r port Code=' ORD' Ci t y=' Chi cago' ;r un;

    c.dat a wor k. ai r por t s; Ai r por t Code=' ORD' ; i f Ai r port Code=' ORD' t hen Ci t y=' Chi cago' ;r un;

    d.dat a wor k. ai r por t s; Ai r por t Code=' ORD' ;

    21.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    9/18

    i f Ai r port Code=' ORD' ; t hen Ci t y=' Chi cago' ;r un;

    The SAS data set Employeesis listed below.

    Employees

    Name Salary

    Patel 60000

    Payne 50000

    El lis 55000

    Liu 45000

    The following SAS program is submitted:

    pr oc pr i nt dat a=empl oyees; where name ? ' e' ;r un;

    What is the result?

    a. No observations are written to the report.

    b. The observation for Ellisonly is written to the report.

    c. The observations for Pateland Payneonly are written to the report.

    d. The observations for Patel, Payne, and Ellisonly are written to the report.

    22.

    The following SAS program is submitted:

    dat a r esul t ; l name="o' r ei l ey"; ;run;

    Which statement completes the program and creates the variable Xwith a value of O'Reiley?

    a.x=propcase( l name) ;

    b.x=pr opcase( l name, "' " ) ;

    c.x=upcase( l name) ;

    d.x=upcase( l name, "' ") ;

    23.

    The following SAS program is submitted:

    data work. count ; i f Or i gi nal Amount = . t hen Or i gi nal Amount =100; Addi t i onal I t ems=100; Or i gi nal Amount = . ; Tot al Count=( Or i gi nal Amount+Addi t i onal I t ems) +0;run;

    What is the value of theTot al count variable in the output data set?

    24.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    8 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    10/18

    a. 0

    b. 100

    c. 200

    d. .(missing numeric value)

    Which SAS program renames two variables?

    a. set work. dept 1 work. dept2(rename=( j code=j obcode)

    ( sal =sal ar y) ) ;

    b. set work. dept 1 work. dept2(rename=( j code=j obcode sal =sal ar y) ) ;

    c. set work. dept 1 work. dept 2 rename=( j code=j obcode sal =sal ar y);

    d. set work. dept 1 work. dept r ename=j code=j obcode sal =sal ary;

    25.

    The variable Namein the data set Employeehas a format of $CHAR9. The variable Name in the data set

    Saleshas a format of $CHAR15. The following SAS program is submitted:

    dat a mer ged; mer ge empl oyee sal es; by name; f or mat name $CHAR12. ;run;

    What is the format for the variable Namein the data set Merged?

    a. $CHAR.

    b. $CHAR9.c. $CHAR12.

    d. $CHAR15.

    26.

    What is true of the sum statement in a SAS DATA step program?

    a. It is valid only 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 thenext.

    27.

    What is the correct form of the sum statement in a DATA step?

    a.sumvar 1 var2;

    b.var 1 + var 2;

    c.t otal =var 1 + var2;

    d.t otal =sum( var 1, var 2) ;

    28.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    18 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    11/18

    The following SAS program is submitted:

    dat a one; address1=' 214 London Cour t ' ;r un;

    data out put ; set one; addr ess1=;

    run;

    Which of the following completes the program and changes the word Courtto Drivein the value of thevariable Addr ess1?

    a.t r anwr d( addr ess1, ' Cour t ' , ' Dr i ve' )

    b.t r ant ab( addr ess1, ' Cour t ' , ' Dri ve' )

    c.t r ansl at e( address1, ' Cour t ' , ' Dr i ve' )

    d. t r ansf or m( addr ess1, ' Cour t ' , ' Dr i ve' )

    29.

    The following SAS program is submitted:

    data wor k. t est; t i t l e="Hi t chhi ker ' s Gui de t o t he SAS Language"; wor d=subst r ( t i t l e, 13, 5) ;run;

    What is the value of the variable Wor din the output data set?

    a. Guid

    b. ide tc. s Guid

    d. Guide to the SAS Language

    30.

    The following SAS program is submitted:

    data work. pr oduct s; Pr oduct _Number =5461; I t em=' 1001' ; I t em_Ref erence=i t em| | ' / ' | | pr oduct _Number ;run;

    What is the result?

    a. The variable I t em_r ef erenceis created with a missing value.

    b. The variable I t em_r efer enceis created with the value 1001/5461.

    c. The variable I t em_r ef erenceis created with the value 1001/ 5461.

    d. The variable I t em_r ef erenceis not created. The program fails to execute because of errors.

    31.

    The following SAS program is submitted:

    dat a work. month; date=put ( ' 13mar 2000' d, ddmmyy10. ) ;run;

    What are the type and length of the variable Dat ein the output data set?

    32.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    18 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    12/18

    a. The type is numeric and the length is 8 bytes.

    b. The type is numeric and the length is 10 bytes.

    c. The type is character and the length is 8 bytes.

    d. The type is character and the length is 10 bytes.

    A SAS program is submitted and the following is written to the SAS log:

    SAS Log

    178 data days;179 do i =' SUN' ' MON' ' TUES' ; - - - - - - - - - - - 388 200ERROR 388- 185: Expect i ng an ar i t hmet i c oper ator .

    ERROR 300- 322: The symbol i s not r ecogni zed andwi l l be i gnor ed.

    180 day=i ! ! ' DAY' ;181 end;182 r un;

    What caused the error?

    a. The list of values should be in parentheses.

    b. The values should be separated by commas.

    c. The values should not be in quotation marks.

    d. Character values are not allowed on a DO loop statement.

    33.

    The following SAS program is submitted:

    dat a wor k. cl i ent s; cal l s=6; do whi l e( cal l s l e 6) ; cal l s+1; end; cal l s+1;run;

    What is the result?

    a. The variable Cal l shas a value of 6in the output data set.

    b. The variable Cal l shas a value of 7in the output data set.

    c. The variable Cal l shas a value of 8in the output data set.

    d. The variable Cal l s has no value. The program fails to execute.

    34.

    The following SAS program is submitted:

    dat a st at s; set r evenue; ar r ay weekl y{5} mon t ue wed t hu f r i ; t otal =weekl y{i }*. 25; out put ; end;run;

    Which one of the following DO statements completes the program and processes the elements of the

    35.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    18 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    13/18

    weekl yarray?

    a. do i =1- 5;

    b. do i =1 t o 5;

    c.do weekl y=1 t o 5;

    d.

    do weekl y{i }=1 to 5;

    The following program is submitted:

    data wor k. t est; ar r ay di f f _sal es{3};run;

    Which of the variables are written to the Work.Testdata set?

    a. Di f f _sal esonly

    b. Di f f _sal es3only

    c. Di f f _sal es, Di f f _sal es1, Di f f _sal es2

    d. Di f f _sal es1, Di f f _sal es2, Di f f _sal es3

    36.

    The following SAS program is submitted:

    pr oc r epor t dat a=work. houses nowd; col umn st yl e pr i ce; where pr i ce

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    14/18

    pr oc sort dat a=houses; by st yl e;run;

    pr oc pr i nt dat a=houses; run;

    The following list report is generated:

    st yl e bedr ooms bat hs pr i ce

    CONDO 2

    3

    4

    2

    1. 5

    2. 5

    2. 5

    2. 0

    $80, 050

    $79, 350

    $127, 150

    $110, 700TWOSTORY 4

    2

    2

    4

    3. 0

    1. 0

    1. 0

    2. 5

    $107, 250

    $55, 850

    $569, 250

    $102, 950

    Which of the following SAS statements completes the program and creates the desired report?

    a.i d styl e;var bedr oom bat hs pr i ce;

    b.i d styl e;var st yl e bedr ooms bat hs pr i ce;

    c. i d styl e;by styl e;var bedr ooms baths pri ce;

    d.i d styl e;by styl e;var st yl e bedr ooms bat hs pr i ce;

    The following SAS program is submitted:

    pr oc f r eq data=cl ass;run;

    The SAS data set Classhas two character variables and three numeric variables. How many tables aregenerated?

    a. 0

    b. 2

    c. 3

    d. 5

    39.

    The following SAS program is submitted:

    proc means data=sasuser . houses mean;

    40.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    18 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    15/18

    run;

    The following report is produced:

    style N Obs Variable Label Mean

    CONDO 4 bedroomsbaths

    Number of bedroomsNumber of bathrooms

    2.75000002.1250000

    RANCH 4 bedrooms

    baths

    Number of bedrooms

    Number of bathrooms

    2.2500000

    2.0000000SPLIT 3 bedrooms

    bathsNumber of bedroomsNumber of bathrooms

    2.66666671.8333333

    TWOSTORY 4 bedroomsbaths

    Number of bedroomsNumber of bathrooms

    3.00000001.8750000

    Which of the following statements completes the program and creates the desired report?

    a.cl ass st yl e;

    b.var bedr ooms baths;

    c.cl ass st yl e;var bedr ooms baths;

    d.var st yl e;cl ass bedr ooms bat hs;

    The following SAS program is submitted:

    opt i ons pageno=1 number ;pr oc pr i nt data=sasuser . houses;run;

    proc means dat a=sasuser . shoes;run;

    The report created by the PRINT procedure generates five pages of output. What is the page number onthe first page that is generated by the MEANS procedure?

    a. 1

    b. 2

    c. 5

    d. 6

    41.

    Which one of the following statements describes creating user-defined formats with the FORMATprocedure?

    a. User-def ined formats cannot end in a number.

    b. The format name can be up to 200 characters in length.

    c. The format name can end with a period in the value statement.

    d. User-def ined formats can share a name with a SAS format if they are stored in a differentlocation.

    42.

    The following SAS program is submitted:

    ods ht ml f i l e=' newf i l e. ht ml ' ;

    43.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    18 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    16/18

    pr oc pr i nt data=sasuser . houses;run;

    proc means dat a=sasuser . houses;run;

    pr oc f r eq data=sasuser. shoes;run;

    ods ht ml cl ose;

    pr oc pr i nt data=sasuser . shoes;run;

    How many HTML files are created?

    a. 1

    b. 2

    c. 3

    d. 4

    Which statement directs output to an HTML file?

    a. the ODS HTML statement

    b. the HTML statement

    c. the EXPORT statement

    d. the PRINTTO statement

    44.

    The following SAS program is submitted:

    dat a t est ; set i a. f l t s _pts ; i f j ob_code=' f l t at3' t hen descri pt i on=' Fl i ght At t endant ' ; l engt h descri pt i on 8;run;

    The variableJ ob_codeis a character variable with a length of 6 bytes. What is the result?

    a. The variable Descri pt i onwith a length of 6 bytes is created.

    b. The variable Descri pt i onwith a length of 8 bytes is created.

    c. The variables Descri pt i onwith a length of 16 bytes is created.

    d. The variable Descri pt i onis not created. The DATA step fails because of errors.

    45.

    The descriptor and data portions of the Work.Salariesdata set are shown below.

    Variable Type Len Pos

    name Char 8 0

    sal ar y Char 8 16st at us Char 8 8

    name status salary

    Liz S 15,600

    Herman S 26,700

    Marty S 35,000

    46.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base

    18 10/22/2013

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    17/18

    The following SAS program is submitted:

    pr oc pr i nt dat a=work. sal ari es; where sal ary

  • 7/22/2019 SAS Certification Practice Exam_ Base Programming

    18/18

    213 sol d{cnt }=num_sol d;214 cnt +1;215 i f l ast . quar t er t hen out put ;216 r un;

    ERROR: Ar r ay subscr i pt out of r ange at l i ne 213col umn 4. quar t er =2 num_sol d=3 FI RST. quar t er =0LAST. quart er=1 sol d1=. sol d2=. sol d3=. cnt=4

    _ERROR_=1 _N_=7

    NOTE: The SAS Syst emst opped processi ng t hi sst ep because of err ors .NOTE: There were 8 observat i ons r ead f r omt he

    dat aset WORK. ALLMONTHS.WARNI NG: The dat a set WORK. ARRAYS may be i ncompl et e.

    When t hi s st ep was st opped t her e were 1observat i ons and 6 var i abl es.

    WARNI NG: Dat a set WORK. ARRAYS was not r epl acedbecause t hi s s t ep was st opped.

    NOTE: DATA st at ement used: r eal t i me 0. 10 seconds

    Which of the following answers would correct the error message?

    a. Reverse the order of lines 213 and 214.

    b. Increase the ARRAY dimension to a value of 4.

    c. Sort the Work.Allmonthsdata set in descending order by the Quart er variable.

    d. Add a WHERE= data set option to the Work.Allmonthsdata set to limit values of the variableCnt to 3or less.

    The following SAS program is submitted:

    dat a t est ; i nf i l e ' file-specification' ; i nput count r y $ amount ;

    run;

    Which one of the following automatic variables can be used to test whether a value for the variable Amount

    is non-numeric?

    a. _N_

    b. _ERROR_

    c. _NUMERIC_

    d. _CHARACTER_

    50.

    Copyright 2008 SAS Institute Inc., Cary, NC, USA. All rights reserved.

    Certification Practice Exam: Base Programming https://support.sas.com/edu/OLTRN/61030/m0001/base