Question: Level 2 1 1 . Changing a Variable's Data Type The data set orion.US _ newhire contains information about newly hired employees. Partial orion.US _

Level 2
11. Changing a Variable's Data Type
The data set orion.US_newhire contains information about newly hired employees.
Partial orion.US_newhire
\table[[ID,Telephone,Birthday],[,,],[120-012-40-4928,5467887,O5DEC1972],[120-012-83-3816,6888321,O3MAY1969],[120-341-44-0781,9418123,23NOV1976],[120-423-01-7721,7839191,28JUN1971]]
Partial PROC CONTENTS Output of orion.US_newhire
a. Create a new data set from orion.US_newhire.
Name the new data set US_converted.
Remove the embedded hyphens in ID.
Convert ID to a numeric value.
Convert Telephone to character and place a -(hyphen or dash) between the third and fourth digits.
Convert Birthday to a SAS date value.
b. Print IS_converted with an appropriate title and use PROC CONTENTS to check the variables types.5.5 Converting Variable Type
5-81
Partial US_converted (10 Total Observations)
\table[[US New Hires],[ID,Telephone,Birthday,],[,,,],[120012404928,546-7887,4722,],[120012833816,688-8321,3410,],[120341440781,941-8123,6171,],[120423017721,783-9191,4196,]]
Partial PROC CONTENTS Output
\table[[Variables in Creation Order],[#,Variable,Type,Len],[1,10,\table[[Num]],8],[2,Telephone,Char,8],[3,Birthday,Num,8]]
End of Exercises
 Level 2 11. Changing a Variable's Data Type The data set

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 Databases Questions!