@BrahmanandaRao wrote:
Hi
Good Evening
How to import multiple csv files as a single dataset
Don't "import" them. Instead just read them.
I will assume they all have the same structure, otherwise why are you putting them into a single dataset?
data want;
length fname filename $256 ;
input '/mydir/*.csv' filename=fname dsd truncover ;
input @;
if fname ne lag(fname) then input ;
input .... ;
filename=fname;
run;
Just replace the 'input ....' statement with the code to read your variables. So you might want to first use LENGTH statement to define the variable before the INPUT statement. Also you might want to add FORMAT and/or LABEL statements.