|
Craig
By any wild chance, do these csvs (and their lines) have a fixed length. If
this unlikely event were to happen, you might be able to use the PEEK
function to grab the chunks that you need.
Paul Dorfman has shown a neat application or two using Peek but I'm not at
all sure that it would work here.
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Craig Stroup
<craig.stroup@FCC
.GOV> To
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Discussion" cc
<SAS-L@LISTSERV.U
GA.EDU> Subject
Infile the 3rd line of lots of CSV
files
01/03/2008 10:16
AM
Please respond to
Craig Stroup
<craig.stroup@FCC
.GOV>
I would like to import just the third line of each of 20,000 CSV files. As
a partial solution to the problem, I tried using firstobs=3, but after
skipping the first two obs of the first file, SAS read all the lines
(including the first 2 lines) of the rest of the files. And I didn't have
any ideas on keeping SAS from reading the rest of the lines of each file.
Below is the base code I am using.
Bigfile="e:\Location\*.csv";
infile xxx filevar=BigFile dsd missover;
input .... ;
Thanks!
Craig
-----------------------------------------
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.
|