You need to write a SAS program that creates a temporary SAS data set called CLASS from these… 1 answer below »

Problem 1 (Reading data values separated by spaces)
Tools: INPUT Statement; PROC PRINT
Data: You have collected some data on a group of students. The data values, separated by one or more spaces, represent the variables F_Name (first name), ID, Gender, GPA, Height and Weight.
Hector 123 M 3.5 59 155
Nancy 328 F 3.7 52 99
Edward 747 M 2.4 62 205
Michelle 778 F 3.0 54 115
Sampson 289 M 3.5 60 180 Directions: You need to write a SAS program that creates a temporary SAS data set called CLASS from these lines of data. Read all records from above data into the program. Display the contents of this data set. Hints: 1. All the first names are 8 characters or less.
2. ID is to be stored as character data.
Problem 2 (Reading Data Values Separated by Spaces with a Character Value Greater than 8 Bytes) Tools: INPUT statement; or INFORMAT statement Data: Raw data similar to Problem 1 with one name greater than 8 characters in length
Hector 123 M 3.5 59 155
Nancy 328 F 3.7 52 99
Edward 747 M 2.4 62 205
Michelle 778 F 3.0 54 115
Washington 289 M 3.5 60 180 Directions: Repeat Problem 1 with the new data. Note that one of the names is now longer than 8 characters long.
Problem 3 (Reading Data Values Where Missing Values Are Represented by Periods except at the End of Short Data Lines) Tools: INFILE statement; MISSOVER option; INPUT statement Data: Raw data similar to Problem 1 with some missing values and short records
Hector 123 M 3.5 . 155
. 328 F 3.7 52 99
Edward 747
Michelle 778 F 3.0 54
Sampson 289 M 3.5 60 180
Directions:
Repeat Problem 1 with the new data. Note that there are several missing values (both for numeric and character variables) and there are some short records.
Problem 4: We used IMPORT in class, can you use EXPORT to export the data set from Problem 3 to an EXCEL file.
The following code must be in one program. Save your program. Run the Program. Save your log file. Save your output file. All 3 components : *.sas, *.log, *.lst must be e-mailed to Kira Stone [KS793509@wcupa.edu]. Subject for the Email should be Your Last Name – HW 2

Don't use plagiarized sources. Get Your Custom Essay on
You need to write a SAS program that creates a temporary SAS data set called CLASS from these… 1 answer below »
Just from $13/Page
Order Essay

Attachments:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

*