I am unsure if this is possible (or stupid question), as I just started looking at SAS last week. I've managed to import my .CSV file to a SAS data set using the:
proc import
Specifying the guessingrows=
to limit my out=
.
My problem is now that my CSV files to import are not of same structure, which I noticed after writing some code using the obsnum=
to specify start and x-lines to read.
So my question is wether or not SAS is capable of either look for a specific string/empty variable, and use as end observation?
My Data looks like (but number of Var_x varies for each file):
First I tried looking at the slice=
but is only useful if I know the exact Places of interest, as the empty Space between the Groups can vary.
Is it possible to use the set
function to specify to start at line 1 and read till encounting a blank field? Or can you redirect me to some function (that I couldn't find myself)?
I would like to look at each "block" separately and process.
Thank you in advance
PROC IMPORT
can't do this. You'd definitely have to write your own import code (not that that is hard). – Joe