SAS Chapter 18: Modifying SAS Data Sets And Tracking Changes

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: 130 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. Which type of integrity constraint would you place on the variable StoreID to ensure that there are no missing values and that there are no duplicate values?

Explanation

The PRIMARY KEY integrity constraint includes both the NOT NULL and UNIQUE constraints.

Submit
Please wait...
About This Quiz
SAS Chapter 18: Modifying SAS Data Sets And Tracking Changes - Quiz

Explore key SAS data set modifications and integrity constraints in this quiz. Master skills like creating audit trails, using transaction data sets for updates, and applying integrity constraints... see moreto ensure data quality. Essential for professionals improving data handling in SAS. see less

2. Which code initiates generation data sets on the existing SAS data set Sasuser.Amounts and specifies that five historical versions are saved in addition to the base version?

Explanation

You use the DATASETS procedure and the MODIFY statement to specify a number of generation data sets for a data set. The GENMAX= option is used to specify the number of versions to save. The number you specify includes the base version.

Submit
3. Which of the following statements about audit trails is true?

Explanation

Audit trails are used to track changes that are made to a data set in place.

Submit
4. Which code deletes all generations of the data set Sasuser.Amounts including the base data set?

Explanation

The keyword ALL is used to indicate that you want to delete all generations of the specified data set including the base version. The keyword HIST deletes the generation data sets, but saves the base version.

Submit
5. The automatic variable _IORC_ is created when you use the MODIFY statement with a BY statement or the KEY= option. How can you use the value of _IORC_?

Explanation

The value of _IORC_ is a numeric return code that indicates the status of the most recently executed I/O operation. Checking the value of this variable allows you to detect abnormal I/O conditions and direct execution in particular ways.

Submit
6. Which DATA step uses the transaction data set Records.Overnight to update the master data set Records.Snowfall by accumAmt?

Explanation

In the MODIFY statement, you specify the master data set followed by the transaction data set. Then you specify the variable in the BY statement.

Submit
7. Which statement about using the MODIFY statement in a DATA step is true?

Explanation

The MODIFY statement in a DATA step can be used only to modify the values in a data set. It cannot be used to modify the descriptor portion of the data set.

Submit
8. Which statement about using the KEY= option in the MODIFY statement is true?

Explanation

When you use the KEY= option, you must specify the update that you want to make to the data set.

Submit
9. Which code creates an audit trail on the SAS data set Reports.Quarter1?

Explanation

To initiate an audit on an existing SAS data set with the DATASETS procedure, you specify the data set in the AUDIT statement, and then you specify the INITIATE statement. You specify the library with the LIB= option.

Submit
10. Which PROC DATASETS step creates an integrity constraint named val_age on the data set Survey to ensure that values of the variableage are greater than or equal to 18?

Explanation

In the MODIFY statement, you list the SAS data set that you want to modify. Then you use the IC CREATE statement to create the integrity constraint. This integrity constraint is a CHECK constraint and you use a WHERE clause to specify the condition that the variable values must meet.

Submit
View My Results

Quiz Review Timeline (Updated): Jul 24, 2024 +

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

  • Current Version
  • Jul 24, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 02, 2013
    Quiz Created by
    Moxleyv
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which type of integrity constraint would you place on the...
Which code initiates generation data sets on the existing SAS data...
Which of the following statements about audit trails is true?
Which code deletes all generations of the data...
The automatic variable _IORC_ is created when you use the...
Which DATA step uses the transaction data...
Which statement about using the MODIFY statement in a DATA step...
Which statement about using the KEY= option in the MODIFY statement...
Which code creates an audit trail on the SAS data...
Which PROC DATASETS step creates an integrity constraint named val_age...
Alert!

Advertisement