The LENGTH statement is a method for defining your variables. You can also use the ATTRIB statement. Once you have defined your variables the INPUT statement is much easier to write. In fact you can even use variable lists as in the example below. The TRUNCOVER option will allow the INPUT statement to handle lines when the last value is empty, or even if there are not enough delimiters on the line. For example see how I changed the next to last line of input data. Your example data looks like a normal CSV file. So you should use the DSD option. data want ; infile cards dsd truncover ; length Employee_ID 8 First_Name $ 12 Last_Name $ 18 Gender $ 1 Salary 8 Job_Title $ 25 Country $ 2 Date1 8 Date2 8 ; informat date1 date9. date2 mmddyy10. ; format date1 date2 yymmdd10.; input Employee_ID -- Date2 ; cards; 120102,Tom,Zhou,M,108255,Sales Manager,AU,11AUG1973,06/01/1993 120103,Wilson,Dawes,M,87975,Sales Manager,AU,22JAN1953,01/01/1978 120121,Irenie,Elvish,F,26600,Sales Rep. II,AU,02AUG1948,01/01/1978 120122,Christina,Ngan,F,27475,Sales Rep. II,AU,27JUL1958,07/01/1982 120123,Kimiko,Hotstone,F,26190,Sales Rep. I,AU,28SEP1968,10/01/1989 120124,Lucian,Daymond,M,26480,Sales Rep. I,AU,13MAY1963 120125,Fong,Hofmeister,M,32040,Sales Rep. IV,AU,06DEC1958,03/01/1983 ;;;;
... View more