SAS Chapter 17: Formatting Data

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Moxleyv
M
Moxleyv
Community Contributor
Quizzes Created: 38 | Total Attempts: 21,992
| Attempts: 249 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. Given the following PROC FORMAT step, how is the value 6.1 displayed when the SKICOND format is applied?
proc format;
   value skicond
          0-3='Poor'
         3<-6='Fair'
         6<-9='Good'
         9<-high='Excellent';
run;

Explanation

The value 6.1 falls in the range 6

Submit
Please wait...
About This Quiz
Data Management Quizzes & Trivia

This quiz assesses knowledge in SAS data formatting, covering system options, PROC FORMAT, and handling missing formats. It is designed for learners looking to enhance their skills in managing and presenting data effectively using SAS.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2. Which SAS system option is used to identify format catalogs to SAS?

Explanation

By default, SAS searches for custom formats in the Work and Library libraries. The FMTSEARCH= system option specifies other catalogs to search when a format is referenced.

Submit
3. What option is used with PROC FORMAT to document the formats in a particular format catalog?

Explanation

The FMTLIB keyword is used to document the formats in a catalog. You can use the SELECT and EXCLUDE statements to process specific formats rather than the entire catalog.

Submit
4. Which of the following variables must be in the data set that is specified on the CNTLIN= option?

Explanation

A data set that is used to create a format with the CNTLIN= option must have the variables FmtName, Start, and Label. If a range is specified, it must also include the variable End.

Submit
5. Given the following code, what option is missing?
proc format;
    value times (?) 
         '00:00't-'04:59't = 'Red Eye'
         '05:00't-'11:59't = 'Morning'
         '12:00't-'17:59't = 'Afternoon'
         '18:00't-'23:59't = 'Evening'
         '00:00't-'11:59't = 'AM'
         '12:00't-'23:59't = 'PM';
run;

Explanation

The format created by this value statement has overlapping ranges, so the MULTILABEL option must be used. A multilabel format can be used by any procedure that supports the MLF option.

Submit
6. Which PROC FORMAT option is used to create a SAS data set from a format?

Explanation

The CNTLOUT= option is used to create a SAS data set from a format.

Submit
7. When the NOFMTERR system option is in effect, what happens when SAS encounters a format it cannot locate?

Explanation

By default, FMTERR is in effect and SAS stops processing if it cannot find a format that is referenced. When NOFMTERR is in effect, SAS substitutes the $w. or w. format and continues processing.

Submit
8. Given the following OPTIONS statement, in what order will SAS search to find a user-defined format?
options fmtsearch=(work abc.newfmt sasuser);

Explanation

SAS will search in the order specified on the FMTSEARCH= option. By default, SAS searches in the Work and Library libraries first unless they are specified on the option. Because Library is not specified here, it is searched after Work.

Submit
9. Given the following PROC FORMAT step, how is the value 70 displayed when the AGEGRP. format is applied?
proc format;
   picture agegrp
           1-<13='00 Youth'
           13-<20='00 Teen'
           20-<70='00 Adult'
           70-high='000 Senior';
run;

Explanation

A non-inclusive range is used such that the age at the high end of the range is not included. To create the picture format, three zeros are used to create a position for a three-digit numeric value. Because zero is used as a digit selector rather than a nonzero value, leading zeros are not included in the formatted value.

Submit
10. Which set of statements would you add to the PROC CATALOG code to copy the LEVELS. and $PICKS. formats from theSasuser.Formats catalog to the Work.Formats catalog?
proc catalog cat=sasuser.formats;
   ? 
   ? 
run;

Explanation

In the COPY statement, OUT= specifies the catalog to which you want to copy the format catalog entry. In the SELECT statement you specify the catalog entries by their entire name. Remember that numeric formats are stored with the extension .FORMAT and character formats are stored with the extension .FORMATC.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 20, 2023 +

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

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 01, 2013
    Quiz Created by
    Moxleyv
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Given the following PROC FORMAT step, how is the...
Which SAS system option is used to identify format catalogs to SAS?
What option is used with PROC FORMAT to document the formats in a...
Which of the following variables must be in the data set that is...
Given the following code, what option is missing? ...
Which PROC FORMAT option is used to create a SAS data set from a...
When the NOFMTERR system option is in effect, what happens when SAS...
Given the following OPTIONS statement, in what order will SAS search...
Given the following PROC FORMAT step, how is the...
Which set of statements would you add to the PROC CATALOG code to copy...
Alert!

Advertisement