From: SAS User on 3 Feb 2010 15:25 Hi, I am trying to collect a file name from a field but the variable does not seem to get translated. My source dataset only has one record in so should pick it up ok. proc sql; select name into :expfile from exportfilec; quit; proc import datafile = 'c:\&expfile.' out=work.fields_tmp1; run; 99 proc import datafile = 'c:\&expfile.' out=work.fields_tmp1; 100 run; ERROR: Unable to import, file c:\&expfile.XLS does not exist
From: Tom Abernathy on 3 Feb 2010 15:40 SAS does not expand macro variables inside of single quotes. Use double quote characters and the value of the macro variable EXPFILE will be expanded. proc import datafile = "c:\&expfile" out=work.fields_tmp1; run; On Feb 3, 3:25 pm, SAS User <sasuser2...(a)googlemail.com> wrote: > Hi, > > I am trying to collect a file name from a field but the variable does > not seem to get translated. My source dataset only has one record in > so should pick it up ok. > > proc sql; > select name into :expfile > from exportfilec; > quit; > > proc import datafile = 'c:\&expfile.' out=work.fields_tmp1; > run; > > 99 proc import datafile = 'c:\&expfile.' out=work.fields_tmp1; > 100 run; > > ERROR: Unable to import, file c:\&expfile.XLS does not exist
From: SAS User on 3 Feb 2010 16:17 Thank you :-) Lee
|
Pages: 1 Prev: This is how I do adverse events summaries, Next: Solutions Manuals |