When referring to a "log Error" it would be most helpful to post the relevant log parts as well.
(Just from a quick glance I can't see anything wrong with your code. Only thing I would change: move the options statement ahead of the data step).
NOTE: Invalid data for enddate in line 235 14-22.
235 398 17oct1997 02nov1997
Projid=398 startdate=13804 enddate=. Duration=. _ERROR_=1 _N_=1
NOTE: Invalid data for enddate in line 236 14-22.
236 942 22jan1998 10mar1998
Projid=942 startdate=13901 enddate=. Duration=. _ERROR_=1 _N_=2
NOTE: Invalid data for enddate in line 237 14-22.
237 167 15dec1999 15feb2000
Projid=167 startdate=14593 enddate=. Duration=. _ERROR_=1 _N_=3
NOTE: Invalid data for enddate in line 238 14-22.
238 250 04jan2001 11jan2001
Projid=250 startdate=14979 enddate=. Duration=. _ERROR_=1 _N_=4
NOTE: Missing values were generated as a result of performing an operation on
Each place is given by: (Number of times) at (Line)Column).
4 at 233:17
O.k., I guess I see. You have a mixture of input styles in your input statement.
The first part ("input projid") is referred to as "list input", a technique where you just name the variables without assigning an explicit informat.
The other part "input ... startdate date9. enddate date9." is referred to as "formatted input". As SAS processes the input statement it moves it's internal column pointer ahead. With formatted input the column pointer points to the column right after the (in)formatted value. In your case that means "enddate" begins with the blank separating your date values. This makes enddate having an invalid value.
a) manually move the column pointer by one column
input projid startdate date9. +1 enddate date9. ;
b) search for and read the sections on the "colon modifier" in the input statement documentation
input projid startdate : date9. enddate : date9. ;
Quote from 9.1.3 documentation: For a numeric variable, this format modifier reads the value from the next non-blank column until the pointer reaches the next blank column or the end of the data line, whichever comes first.