D and dashes euroxwd reads nonstandard numeric data

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MAX. DOLLARX. $12.345 €12.345 12345 Raw Data Value 12345 EUROX. Informat SAS Data Value 0 DDMMYY. 311260 31/12/60 31/12/1960 365 DATE. 55 MMDDYY. 010160 01/01/60 01/01/1960 31DEC59 31DEC1959 -1 56 List Input for Nonstandard Data 7.04 Quiz Which INPUT statement correctly uses list input to read the space-delimited raw data file? Partial sales.csv 120102,Tom,Zhou,M,108255,Sales Manager,AU,11AUG1969,06/01/1989 120103,Wilson,Dawes,M,87975,Sales Manager,AU,22JAN1949,01/01/1974 120121,Irenie,Elvish,F,26600,Sales Rep. II,AU,02AUG1944,01/01/1974 120122,Christina,Ngan,F,27475,Sales Rep. II,AU,27JUL1954,07/01/1978 120123,Kimiko,Hotstone,F,26190,Sales Rep. I,AU,28SEP1964,10/01/1985 120124,Lucian,Daymond,M,26480,Sales Rep. I,AU,13MAY1959,03/01/1979 120125,Fong,Hofmeister,M,32040,Sales Rep. IV,AU,06DEC1954,03/01/1979 120126,Satyakam,Denny,M,26780,Sales Rep. II,AU,20SEP1988,08/01/2006 120127,Sharryn,Clarkson,F,28100,Sales Rep. II,AU,04JAN1979,11/01/1998 Raw Data Donny 5MAY2008 25 FL $43,132.50 Margaret 20FEB2008 43 NC 65,150 a. input name $ hired date. age state $ salary comma.; input Employee_ID First_Name $ Last_Name $ Gender $ Salary Job_Title $ Country $ : means obey the length between 2 commas Birth_Date :date. Hire_Date :mmddyy.; b. input name $ hired :date. age state $ salary :comma.; 58 57 Business Scenario Business Scenario Create a temporary SAS data set named Work.subset3 from the delimited raw data file named sales.csv. data work.subset3; length First_Name $ 12 Last_Name $ 18 Gender $ 1 Job_Title $ 25 Country $ 2; infile 'sales.csv' dlm=','; input Employee_ID First_Name $ Last_Name $ Gender $ Salary Job_Title $ Country $ Birth_Date :date. Hire_Date :mmddyy.; run; p107d03 59 : give you a weight, lenght we be recognized as the length between 2 commas proc print data=work.subset3; run; Partial PROC PRINT Output Obs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 60 First_ Name Last_Name Gender Tom Wilson Irenie Christina Kimiko Lucian Fong Satyakam Sharryn Monica Alvin Kevin Marinus Fancine Zhou Dawes Elvish Ngan Hotstone Daymond Hofmeister Denny Clarkson Kletschkus Roebuck Lyon Surawski Kaiser M M F F F M M M F F M M M F Job_Title Sales Sales Sales Sales Sales Sales Sales Sales Sales Sales Sales Sales Sales Sales Manager Manager Rep. II Rep. II Rep. I Rep. I Rep. IV Rep. II Rep. II Rep. IV Rep. III Rep. I Rep. I Rep. III Country AU AU AU AU AU AU AU AU AU AU AU AU AU AU Employee_ ID Salary Birth_ Date Hire_ Date 120102 120103 120121 120122 120123 120124 120125 120126 120127 120128 120129 120130 120131 120132 108255 87975 26600 27475 26190 26480 32040 26780 28100 30890 30070 26955 26910 28525 3510 -3996 -5630 -1984 1732 -233 -1852 10490 6943 9691 1787 9114 7207 -3923 10744 5114 5114 6756 9405 6999 6999 17014 14184 17106 9405 16922 15706 6848 p107d03 informat is to define input data format is used to define output data 10 Additional SAS Statements Additional SAS Statements Additional SAS statements can be added to perform further processing in the DATA step. proc print data=work.subset3 label; run; data work.subset3; length First_Name $ 12 Last_Name $ 18 Gender $ 1 Job_Title $ 25 Country $ 2; infile 'sales.csv' dlm=','; input Employee_ID First_Name $ Last_Name $ Gender $ Salary Job_Title $ Country $ Birth_Date :date. Hire_Date :mmddyy.; keep First_Name Last_Name Salary Job_Title Hire_Date; label Job_Title='Sales Title' Hire_Date='Date Hired'; format Salary dollar12. Hire_Date monyy7.; run; p1...
View Full Document

Ask a homework question - tutors are online