SAS Chapter 7: Creating And Applying User-defined Formats

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: 388 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. If you don't specify the LIBRARY= option, your formats are stored in Work.Formats, and they exist ...

Explanation

If you do not specify the LIBRARY= option, formats are stored in a format catalog named Work.Formats. As the libref Work, implies, any format that is stored in Work.Formats is a temporary format that exists only for the current SAS session.

Submit
Please wait...
About This Quiz
SAS Quizzes & Trivia

This SAS Chapter 7 quiz focuses on creating and applying user-defined formats. It tests knowledge on format storage, correct procedure syntax, format naming rules, and label character limits,... see moreessential for effective data management in SAS. see less

2. Which of the following FORMAT procedures is written correctly?

Explanation

A semicolon is needed after the PROC FORMAT statement. The VALUE statement begins with the keyword VALUE and ends with a semicolon after all the labels have been defined.

Submit
3. How many characters can be used in a label?

Explanation

When specifying a label, enclose it in quotation marks and limit the label to 256 characters.

Submit
4. Which of the following statements will store your formats in a permanent catalog?

Explanation

To store formats in a permanent catalog, you first write a LIBNAME statement to associate the libref with the SAS data library in which the catalog will be stored. Then add the LIB= (or LIBRARY=) option to the PROC FORMAT statement, specifying the name of the catalog.

Submit
5. When creating a format with the VALUE statement, the format's new name
  • cannot end with a number
  • cannot end with a period
  • cannot be the name of a SAS format, and...

Explanation

The name of a format that is created with a VALUE statement must begin with a dollar sign ($) if it applies to a character variable.

Submit
6. The format JOBFMT was created in a FORMAT procedure.  Which FORMAT statement will apply to the variable JobTitle in the program output?

Explanation

To associate a user-defined format with a variable, place a period at the end of the format name when it is used in the FORMAT statement.

Submit
7. Which of these is false?  Ranges in the VALUE statement can specify... 

Explanation

You can list values separated by commas, but the list must contain either all numeric or character.

Submit
8. You can place the FORMAT statement in either a DATA step or a PROC step.  What happens when you place it in a DATA step?

Explanation

By placing the FORMAT statement in a DATA step, you permanently associate the defined format with variables.

Submit
9. Which keyword can be used to label missing numeric values as well as any values that are not specified in the range?

Explanation

MISS and MISSING are invalid keywords, and LOW does not include missing numeric values. The keyword OTHER can be used in the VALUE statement to label missing values as well as any values that are not specifically included in a range.

Submit
10. Which keyword, when added to the PROC FORMAT statement, will display all the formats in your catalog?

Explanation

Adding the keyword FMTLIB to the PROCFORMAT statement displays a list of all the formats in your catalog, along with descriptions of their values

Submit
View My Results

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

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

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 21, 2013
    Quiz Created by
    Moxleyv
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
If you don't specify the LIBRARY= option, your formats are stored...
Which of the following FORMAT procedures is written correctly?
How many characters can be used in a label?
Which of the following statements will store your formats in a...
When creating a format with the VALUE statement, the format's new...
The format JOBFMT was created in a FORMAT procedure.  Which...
Which of these is false?  Ranges in the VALUE statement can...
You can place the FORMAT statement in either a DATA step or a PROC...
Which keyword can be used to label missing numeric values as well as...
Which keyword, when added to the PROC FORMAT statement, will display...
Alert!

Advertisement