Ten students took a test. The tests were scored by an optical mark sense reader (scanner), and the ID and test score (SCORE) were recorded for each student and stored in a SAS data set called TEST....


Ten students took a test. The tests were scored by an optical mark sense reader (scanner), and the ID and test score (SCORE) were recorded for each student and stored in a SAS data set called TEST. The school maintains a SAS data set called STUDENTS with the ID and NAME of every student. You want to produce a roster with the student ill, NAME, and test score (SCORE).111ere are IDs and names in the STUDENT data set for students who did not take the test. Also, there was one student who took the test who was not in the STUDENT file. So, in the roster, include this student but assign a value of "Not in Student File" for the NAME. Run the following program to create the two data sets TEST and STUDENT (note that neither data set is sorted):


As a bonus, see if you can produce the roster in alphabetical order by last name (with the Not in Student File name last). Hint: For the student who is not in the student file, set the value of last name (LAST) equal to "ZZZ." Then, for the other names. use the SCAN function to select the last name (a minus value for the "word" argument scans from the right). Sort by the last name but don't include that variable in the VAR list of PROC PRINT.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here