SAS Programmer Quiz

22 Questions
SAS Quizzes & Trivia

Quiz for SAS programmer candidates

Sample Question

What is a SAS data library?

A collection of SAS files, such as SAS data sets and catalogs

In some operating environments, a physical collection of SAS files

In some environments, a logically related collection of SAS files

All of the above

Number of Questions:

More Options
Please wait...
Questions and Answers
  • 1. 
    What is a SAS data library?
    • A. 

      A collection of SAS files, such as SAS data sets and catalogs

    • B. 

      In some operating environments, a physical collection of SAS files

    • C. 

      In some environments, a logically related collection of SAS files

    • D. 

      All of the above

  • 2. 
    In order for the date values 05 May 1955 and 04 March 2046 to be read correctly, what value must the YEARCUTOFF= option have?
    • A. 

      A value between 1947 and 1954, inclusive

    • B. 

      1955 or higher

    • C. 

      1946 or higher

    • D. 

      Any value

  • 3. 
    When you specify an engine for a library, you are always specifying
    • A. 

      The file format for files that are stored in the library

    • B. 

      The version of SAS that you are using.

    • C. 

      Access to other software vendors’ files

    • D. 

      Instructions for creating temporary SAS files.

  • 4. 
    • A. 

      Proc sort data=sasuser .mysales By region; Run;

    • B. 

      Dat sasuser .mysales; Set mydata .sales99; Run;

    • C. 

      Proc print data=sasuser .mysales lable; Lable region=’ sales region ‘ ; Run;

    • D. 

      None of the above

  • 5. 
    If you want to sort your  data and create  a temporary  data set named Calc to store the stored data , which of the following steps should you submit? 
    • A. 

      Proc sort data=work .calc out =finance . dividend; Run;

    • B. 

      Proc sort dividend out=calc; By account ; Run;

    • C. 

      : proc sort data=finance . dividend out=work . calc; By account; Run;

    • D. 

      Proc sort from finance . divinded to calc; By accout; Run;

  • 6. 
    • A. 

      PROC PRINT does not create a default report ; you must specify the rows and columns to be displayed

    • B. 

      PROC PRINT displays all observations and variable in the data set. If want an additional column for observation numbers, you can request it.

    • C. 

      : PROC PRINT displays columns in the following order: a column for observation numbers, all character variables, and all numeric variables.

    • D. 

      PROC PRINT displays all observations and variables it the data set, column for observation numbers on the far left , and variables in the order in which they occur in the data set

  • 7. 
    Filerefs remain in effect until
    • A. 

      You change them.

    • B. 

      You cancel them.

    • C. 

      You end your SAS session

    • D. 

      All of the above

  • 8. 
    Unless otherwise directed, the DATA step executes
    • A. 

      once for each compilation phase.

    • B. 

      Once for each DATA step statement.

    • C. 

      Once for each record in the input file

    • D. 

      Once for each variable in the input file.

  • 9. 
    You don’t specify the LIBRARY=option, your formats are stored in WORK and they exist (select best answer)
    • A. 

      Only for the current procedure.

    • B. 

      Only for the current DATA step.

    • C. 

      Only for the current SAS session.

    • D. 

      Permanently.

  • 10. 
    The default statistics produced by the MEANS procedure are n-count, mean, minimum, maximum, and 
    • A. 

      Median

    • B. 

      Range

    • C. 

      Standard deviation

    • D. 

      Standard error of the mean

  • 11. 
    Using ODS statements, how many types of output can you generate concurrently?
    • A. 

      1 (only listing output)

    • B. 

      2

    • C. 

      3

    • D. 

      As many as you want

  • 12. 
    • A. 

      Do not use a POINT=variable

    • B. 

      Check for an invalid value of the POINT=variable.

    • C. 

      Do not use an END=variable

    • D. 

      Include an OUTPUT statement

  • 13. 
    At the start of DATA step processing, during the compilation phase, variables are created in the program data vector (PDV), and observations are set to
    • A. 

      Blank

    • B. 

      Missing

    • C. 

      0

    • D. 

      There are no observations.

  • 14. 
    Which of the following statements is true regarding  direct access of data sets?
    • A. 

      You cannot specify END=with POINT=

    • B. 

      You cannot specify OUTPUT= with POINT=

    • C. 

      You cannot specify STOP with END=

    • D. 

      You cannot specify FIRST . with last .

  • 15. 
    Which function calculates the average of the variables Var1,Var2, Var3,  and Var4?
    • A. 

      Mean (var1 , var4)

    • B. 

      Mean (var1-var4)

    • C. 

      Mean (of var1 , var4)

    • D. 

      Mean (of var1-var4)

  • 16. 
    • A. 

      DO WHILE statement

    • B. 

      Nested DO loops

    • C. 

      DO UNTIL statement

    • D. 

      A DO group

  • 17. 
    Which statement is false regarding the use of DO loops?
    • A. 

      They can contain conditional clauses

    • B. 

      They can generate multiple observations

    • C. 

      They can be used to combine DATA and PROC steps

    • D. 

      They can be used to read data

  • 18. 
    Which statement is false regarding an ARRAY statement?
    • A. 

      It is an executable statement

    • B. 

      It can be used to create variables.

    • C. 

      It must contain either all numeric or all character elements.

    • D. 

      It must be used to define an array before the array name can be referenced.

  • 19. 
    Which is not an advantage of  column input?
    • A. 

      It can be used to read character variables that contain embedded blanks

    • B. 

      No placeholder is required for missing data.

    • C. 

      Standard as well as nonstandard data values can be read.

    • D. 

      Fields do not have to be separated by blanks or other delimiters.

  • 20. 
    An input data file has date expressions in the form 10222001. Which SAS informat should  you use to read these dates?
    • A. 

      DATE6.

    • B. 

      DATE8.

    • C. 

      MMDDYY6.

    • D. 

      MMDDYY8.

  • 21. 
    The minimum width of the TIMEw. Informat is
    • A. 

      4

    • B. 

      5

    • C. 

      6

    • D. 

      7

  • 22. 
    Which pointer control is used to read multiple records sequentially?
    • A. 

      @n

    • B. 

      +n

    • C. 

      /

    • D. 

      : all of the above