Question: The code in the textbook uses a C: folder reference, which we are not using. It also has a quotation mark that is not

The code in the textbook uses a C:\ folder reference, which we are not using. It also has a quotation mark that is not in the character set that our environment can understand. Therefore, please use the following code as the starting point for this assignment:
LIBNAME sasdata '/home/michaelweinberg0/my_shared_file_links/michaelweinberg0/Chapter11';
DATA alaska (DROP = Year Month Day);
SET sasdata.earthquakes;
IF State = Alaska;
EruptionDate = MDY(Month,Day,Year);
RUN;
PROC PRINT DATA = alaska NOROWNUM;
WHERE Year GT 2005;
VAR EruptionDate Magnitute;
TITLE 'Alaska's Earthquakes in 2005 or Later';
FORMAT EruptionDate DATE10.;
RUN;
The United States Geological Survey provides data on earthquakes of historical interest. The SAS data set called EARTHQUAKES contains data about earthquakes with a magnitude greater than 2.5 in the United States and its territories. The variables are year, month, day, state, and magnitude. You assign a new employee the task of writing a program to create a data set with just the earthquakes from Alaska and then print the eruption date and magnitude for Alaskan earthquakes occurring in 2005 or later. The following is the program the new employee gives you.
LIBNAME sasdata c:\MySASLib;
DATA alaska (DROP = Year Month Day);
SET sasdata.earthquakes;
IF State = Alaska;
91EruptionDate = MDY(Month,Day,Year);
RUN;
PROC PRINT DATA = alaska NOROWNUM;
WHERE Year GT 2005;
VAR EruptionDate Magnitute;
TITLE Alaskas Earthquakes in 2005 or Later;
FORMAT EruptionDate DATE10.;
RUN;
a. Examine the SAS data set including the variable labels and attributes. Identify and correct any bugs in the preceding code so that this program will run correctly.
b. Add comments to your revised program for each fix so that the new employee can understand her mistakes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!