|
Hey All,
I've got a bunch of text files I need to read in, each of which has a
'header row' of var names that I need sas to skip over. So I wrote the
following:
* ================================== ;
filename oic 'N:\oncology_infusion_center\IP401B-*.txt' ;
data gnu ;
infile oic firstobs = 2 ;
input
@1 consumno $char8.
@12 acct $char9.
@22 attending_provider $char30.
@53 service_date date11.
@113 quantity 3.0
<etc.>
;
run ;
* ================================== ;
This works just fine if I edit that filename statement so it only refers
to a single file. But if I leave it as written, I see things like:
NOTE: Invalid data for service_date in line 1985 53-63.
NOTE: Invalid data for quantity in line 1985 113-115.
NOTE: Invalid data errors for file OIC occurred outside the printed
range.
NOTE: Increase available buffer lines with the INFILE n= option.
(I'm confused by the literal data that sas prints out around those
NOTEs--some of it looks like actual data, and some of it looks like the
header row.)
I've tried removing the specific file complained about & re-running,
only to have SAS start complaining about a different file. This leads
me to the theory that the FIRSTOBS = 2 option is only being applied to
the first file.
Is that plausible? And more to the point--how do I get sas to skip line
1 of every file?
Many thanks in advance!
-Roy
Roy Pardee
Research Analyst/Programmer
Group Health Center For Health Studies (Cancer Research Network)
(206) 287-2078
Google Talk: rpardee
|