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.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
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
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme