DATA Step, Macro, Functions and more

Error accessing Macro using sasautos option

Reply
Frequent Contributor
Posts: 124

Error accessing Macro using sasautos option

I have macro in the separate folder which I am trying access using sasautos option but I am getting error. What I am doing  wrong  and how to access the macro which is in different folder (don't want to use %include) filename mcr "c:\temp\macros"; options sasautos=mcr; data xyz;   set abc;   where ..; run; %RenMac(xyz); %RenMac(xyz);       -       180 WARNING: Apparent invocation of macro RENMAC not resolved. ERROR 180-322: Statement is not valid or it is used out of proper order.

Super User
Posts: 3,106

Re: Error accessing Macro using sasautos option

Is your macro in a file called renmac.sas and is your %macro renmac; statement the first statement in the file? You could also try options sasautos = ("c:\temp\macros") and option mautocall is set.

Frequent Contributor
Posts: 124

Re: Error accessing Macro using sasautos option

Somehow  in the renmac.sas I had first line blank.  I deleted that line. Now it worked. Thanks SASKiwi..

Super User
Posts: 3,106

Re: Error accessing Macro using sasautos option

Pleased it is now working. It would be good if you could mark your post as answered.

Ask a Question
Discussion stats
  • 3 replies
  • 222 views
  • 3 likes
  • 2 in conversation