DATA Step, Macro, Functions and more

macro variable in oracle libname issue

Reply
Occasional Contributor
Posts: 16

macro variable in oracle libname issue

Hi All,

Kind of a simple question here but for some reason my macro variable is not being processed correctly.  My code is below.  Instead of manually typing in the car make, I'm trying to assign it automatically based on the macro variable below.  But at the line 6, "data dw.&car._list;" is the problem.  Any help?  Thanks.

filename param1 "C:\car_params.txt";

%include param1;

%let car = &MyCar;

libname dw oracle user=&user. password="&password." path=&path.  INSERTBUFF=32000;

data dw.&car._list;   /*<-----erroring here, doesn't like macro variable for some reason*/

set CarList;

run;

Super Contributor
Posts: 490

Re: macro variable in oracle libname issue

Posted in reply to sasboy007

what is the error you are getting?

type the log error

Occasional Contributor
Posts: 16

Re: macro variable in oracle libname issue

Posted in reply to mohamed_zaki

Thanks for the reply but nevermind.  I figured it out.  I had a misspelling in my txt filename.

Ask a Question
Discussion stats
  • 2 replies
  • 158 views
  • 0 likes
  • 2 in conversation