SAS Chapter 21: Controlling Data Storage Space

5 Questions | Attempts: 38
Share

SettingsSettingsSettings
SAS Quizzes & Trivia

Practice for the SAS advance certification exam


Questions and Answers
  • 1. 

    Which of the following statements about uncompressed SAS data files is true?

    • A.

      The descriptor portion is stored on whatever page has enough room for it.

    • B.

      New observations are always added in the first sufficient available space.

    • C.

      Deleted observation space is tracked.

    • D.

      New observations are always added at the end of the data set.

    Correct Answer
    D. New observations are always added at the end of the data set.
    Explanation
    The descriptor portion of an uncompressed data file is always stored at the end of the first data set page. New observations are always added to the end of the data set, and deleted observation space is neither tracked nor reused.

    Rate this question:

  • 2. 

    Which of the following statements about compressed SAS data files is true?

    • A.

      The descriptor portion is stored on whatever data set page has enough room for it.

    • B.

      Deleted observation spaced can be reused.

    • C.

      Compressed SAS data files have a smaller overhead than uncompressed SAS data files.

    • D.

      In a compressed SAS data set, each observation must be the same size.

    Correct Answer
    B. Deleted observation spaced can be reused.
    Explanation
    The descriptor portion of a compressed data file is always stored at the end of the first data set page. If you specify REUSE=YES, SAS tracks and reuses deleted observation space within a compressed data file. Therefore, every observation in a compressed data file can be a different size. Compressed data files do have a larger overhead than uncompressed data files.

    Rate this question:

  • 3. 

    Which of the following programs correctly creates reduced-length numeric variables?

    • A.

      data temp; infile file1; input x 4. y 3. z 2.; run;

    • B.

      data temp; format x 4. y 3. z 2.; infile file1; input x 4. y 3. z 2.; run;

    • C.

      data temp; length x 4 y 3 z 2; infile file1; input x 4. y 3. z 2.; run;

    • D.

      data temp; informat x 4. y 3. z 2.; infile file1; input x 4. y 3. z 2.; run;

    Correct Answer
    C. data temp; length x 4 y 3 z 2; infile file1; input x 4. y 3. z 2.; run;
    Explanation
    You use the LENGTH statement to assign a reduced length to a numeric variable. If you do not use the LENGTH statement to define a reduced length for numeric variables, their default length is 8 bytes. The FORMAT statement associates a format with a variable, and the INFORMAT statement associates an informat with a variable.

    Rate this question:

  • 4. 

    Which of the following statements about SAS data views is true?

    • A.

      SAS data views use less disk space but more CPU resources than SAS data files.

    • B.

      SAS data views can be created only in permanent SAS data libraries.

    • C.

      SAS data views use less CPU resources but more disk space than SAS data files.

    • D.

      SAS data views can be created only in temporary SAS data libraries.

    Correct Answer
    A. SAS data views use less disk space but more CPU resources than SAS data files.
    Explanation
    SAS data views use significantly less disk space than SAS data files. However, SAS data views typically need more CPU resources than SAS data files. You can create a SAS data view in either the temporary SAS data library or in a permanent SAS data library.

    Rate this question:

  • 5. 

    Which of the following programs should you use to detect any loss of precision between the default-length numeric variables inCompany.Regular and the reduced-length numeric variables in the data set Company.Reduced?

    • A.

      proc contents data=company.regular; compare data=company.reduced; run;

    • B.

      proc compare base=company.regular compare=company.reduced; run;

    • C.

      proc print data=company.regular; run; proc print data=company.reduced; run;

    • D.

      proc datasets library=company; contents data=regular compare=reduced; run;

    Correct Answer
    B. proc compare base=company.regular compare=company.reduced; run;
    Explanation
    You use the COMPARE procedure to detect any differences in the values of two data sets. The COMPARE statement is not valid syntax in either the CONTENTS procedure or the DATASETS procedure. Printing both data sets might not reveal differences in the precise values of the shortened variables, depending on the formats that are used.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 16, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 03, 2013
    Quiz Created by
    Moxleyv

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.