I have 2 different delimited files (csv and text) having the variables below respectively. The first 3 are character variables and the rest are numeric variables:Plant, Type, Treatment, conc, uptake. the text file has 5 numeric variables and a character variable.I would like to import the two files using a macro variable for every delimiter in SAS as part of an exercise. I have the code below to extract multiple files using macro. I would like to get your advice on how to create a macro variable for every delimiter (csv, text).
%macro one (output, Sample);
proc import out=output
datafile= "C:\Users\komal\Desktop\Sample.csv"
dbms=csv replace;
getnames=yes;
run;
%mend one;
%one (output, Sample.csv);
%one (data2, datafiletwo.txt);
%one (output, Sample.csv);
, but you say your second file is a text file and you write%one (data2, datafiletwo.xlsx);
, apparently refering an excel workbook. – Dirk Horsten