Hi,
I need to import some dat files into SAS however each file is in a folder and all of these folders are within one folder.
At first I was just importing them one by one using libname and infile. However, I have 60 files I need.
Is there any way to extract the dat files without having to import them one by one? I know there are other posts that recommend doing a macro but I have very little experience with SAS and do not know how to do a macro. I am using SAS 9.4 (32).
Below is what i was doing
libname ds 'D:\Picarro Data\picarro data\2\2019';
x 'cd D:\Picarro Data\picarro data\2\2019';
* IMPORT P 2 DATA;
data df2_08272019;
infile '08\27\LBDS2023-20190827-111601Z-DataLog_User.dat' firstobs=2;
input DATE :$10. TIME :$15. FRAC_DAYS_SINCE_JAN1 $ FRAC_HRS_SINCE_JAN1 $ JULIAN_DAYS $ EPOCH_TIME $ ALARM_STATUS $ INST_STATUS $ CavityPressure $ CavityTemp WarmBoxTemp species H2CO H2CO_30s H2CO_2min H2CO_5min H2O CH4;
run;
data df2_082819;
infile '08\28\LBDS2023-20190828-101608Z-DataLog_User.dat' firstobs=2;
input DATE :$10. TIME :$15. FRAC_DAYS_SINCE_JAN1 $ FRAC_HRS_SINCE_JAN1 $ JULIAN_DAYS $ EPOCH_TIME $ ALARM_STATUS $ INST_STATUS $ CavityPressure $ CavityTemp WarmBoxTemp species H2CO H2CO_30s H2CO_2min H2CO_5min H2O CH4;
run;
Any help would be great.
Thank you.