logo Hurry, Grab up to 30% discount on the entire course
Order Now logo
534 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
StatAnalytica ExpertBusiness
(5/5)

988 Answers

Hire Me
expert
Arman KhanPsychology
(5/5)

854 Answers

Hire Me
expert
Santosh DevgodaMathematics
(5/5)

832 Answers

Hire Me
expert
Anthony BidiniBusiness
(5/5)

668 Answers

Hire Me
SAS
(5/5)

Write a PROC PRINT step that lists ParkName, Location, and Count. Print rows where Count is not equal to 0 and Location includes MAIN ENTRANCE.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Level 1

4. Filtering Rows in a Listing Report Using Character Data

The pg1.np_summary table contains public use statistics from the National Park Service. The park type codes are inconsistent for national preserves. Examine these inconsistencies by producing a report that lists any national preserve.

a. Open p103p04.sas from the practices folder. Add a WHERE statement to print only the rows where ParkName includes Preserve.

Note: ParkName contains character values. These values are case sensitive.

b. Submit the program and view the results. Which codes are used for preserves?

Note: If you use double quotation marks in the WHERE statement, you receive a warning in the log. To eliminate the warning, use single quotation marks.

5. Creating a Listing Report for Missing Data

Use PROC PRINT and the WHERE statement to examine the pg1.eu_occ table.

a. Create a new program. Write a PROC PRINT step to read the pg1.eu_occ table. Use a WHERE statement to list rows where Hotel, ShortStay, and Camp are missing. Run the program. How many rows are included?

b. Modify the WHERE statement to list rows with Hotel values greater than 40,000,000. Run the program. Which months are included in the report?

 3-32 Lesson 3 Exploring and Validating Data

Level 2

6. Using Macro Variables to Subset Data in Procedures

a. Create a new program. Write a PROC FREQ step to analyze rows from pg1.np_species. Include only rows where Species_ID starts with YOSE (Yosemite National Park) and Category equals Mammal. Generate frequency tables for Abundance and Conservation_Status.

b. Write a PROC PRINT step to list the same subset of rows from pg1.np_species. Include Species_ID, Category, Scientific_Name, and Common_Names in the report. Run the program. 

c. Create a macro variable named ParkCode to store YOSE, and another macro variable named SpeciesCat to store Mammal. Modify the code to reference the macro variables. Run the program and confirm that the same results are generated.

Note: The macro variable values are case sensitive when they are used in a WHERE statement.

d. Change the values of the macro variables to ZION (Zion National Park) and Bird. Run the program.

 Challenge

7. Eliminating Case Sensitivity in WHERE Conditions

Character comparisons in a WHERE statement are case sensitive. Use SAS functions to make comparisons case insensitive.

a. Open pg1.np_traffic. Notice that the case of Location values is inconsistent.

b. Create a new program. Write a PROC PRINT step that lists ParkName, Location, and Count. Print rows where Count is not equal to 0 and Location includes MAIN ENTRANCE. Submit the program. Use the log to confirm that 38 rows are listed.

Note: If you use double quotation marks in the WHERE statement, you receive a warning in the log. To eliminate the warning, use single quotation marks.

c. The UPCASE function can be used to eliminate case sensitivity in character WHERE expressions. Use the UPCASE function on the Location column to include any case of MAIN ENTRANCE. Run the program and verify that 40 rows are listed.

(5/5)
Attachments:

Expert's Answer

534 Times Downloaded

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme