data club600;
informat full_name & $25. nHR DOB DATE11. DOHR MMDDYY8.;
input full_name nHR DOB DOHR;
format DOB MMDDYY10. DOHR MMDDYY10.;
datalines;
Barry Bonds 762 24-Jul-1964 8/8/02
Hank Aaron 755 5-Feb-1934 4/27/71
Babe Ruth 714 6-Feb-1895 8/21/31
Alex Rodriguez 696 27-Jul-1975 8/4/10
Willie Mays 660 6-May-1931 9/22/69
Ken Griffey Jr. 630 21-Nov-1969 6/9/08
Jim Thome 612 27-Aug-1970 8/15/11
Sammy Sosa 609 12-Nov-1968 6/2/07
;
proc print noobs;
run; I'm brand new to SAS but my goal with this is to eventually sort the data by the difference between column 4 and column 3. I've read quite a bit on the basics but I'm making no progress here, because I suspect that the text parsing issues aren't covered in introductory material on SAS. Initially, I was using a single line: input full_name & $25. nHR DOB DATE11. DOHR MMDDYY8.; rather than informat full_name & $25. nHR DOB DATE11. DOHR MMDDYY8.;
input full_name nHR DOB DOHR; The former method didn't handle date cases with single digit values for the DAY. I switched format for no reason other than coming across this resource: http://support.sas.com/publishing/pubcat/chaps/55126.pdf I found that layout more readable. My current issue (I suspect) is that something is happening in the parsing of the first data that is leaving the line in a state unfit for the next informat specification, so the print result is an empty entry in each row for 'DOHR'
... View more