Check out this thread. It might be helpful:
On Fri, 3 Mar 2006 11:58:41 -0800, Matt_Pettis <Matthew.Pettis@GMAIL.COM>
>Man, I am really using SAS-L today...
>I am reading raw files into a datastep using a filename ref, where the
>filename statement is of the form:
>filename raw "c:\temp\*.txt";
>In my datastep, I would like to trigger an event to happen (actually,
>the output of a dataset built by using the hash object in SAS9) after
>the very last line of the very last file of this set of concatenated
>files is read in. using the end=, eof=, eov= variables set in the
>'infile' statement don't seem to help, as they either trigger at the
>end or beginning of every file in the concatenated file list. this has
>gotta be doable -- anybody have help or advice on this?