Use the code in the unfinished code section to create the data set call “two” from “one”, which you created in problem 1. Add the following to “two”: Create a new text variable called “yrob2” using the last 2 digits of the variable “yrob”. For example if year = 1980 we would want 80 for this new variable. Next, create a new text variable called “last4” from SSN using the last 4 digits of the SSN. Now, create a new text variable called “ID” by concatenating “clinic”, “mthob”, “yrob2” & “last4” (in this order). Remove any spaces or blanks from this new variable called “ID”. Remove all variables from this dataset except for name & ID. Hint: Think about the most efficient way to do this. finished Code *Lab 8 – Problem 2; title "Building an ID number from data"; data lab.ssn_number; set lab.one; ssn2 = compress(ssn, '-'); ssn3 = input(ssn2, ??11.); drop ssn2; run; proc print data=lab.ssn_number; run;
... View more