BookmarkSubscribeRSS Feed
JaredWootten
Calcite | Level 5

Hello everyone,

 

I've been having this same issue when i try to run a macro in sas enterprise guide. The macro essentially creates different copies of a dataset that i modify and eventually merge in a final step. 

 

The code in the macro runs fine outside of the macro, but when i try to run it in the macro, I get these same error messages. I dont think its the macro itself thats creating this issue but maybe the way that sas is running it. They seem to take issue with these same statements that are generated by sas when i run the macro. After that, i can't run any kind of code on sas without receiving similar warning messages

 

Screenshot 2024-04-22 at 3.00.46 PM.png

4 REPLIES 4
ballardw
Super User

The most common causes of that error are mismatched quotes, either a start with single quote and close with double or the other way around or just plain missing closing quote somewhere.

 

You mention a macro but provide no details. Next time you run/ test this set the MPRINT option before running the macro:

 

Options mprint;

 

%mymacro;

 

options nomprint;

Then more details of the generated code will appear.

 

It may also be cause of the Note 49.

JaredWootten
Calcite | Level 5

Hello,

 

Thanks for your reply!

 

 

below are screenshots of the macro in order. Its fairly large. I havent been able to find any open quotations.

Screenshot 2024-04-22 at 3.22.54 PM.png

Screenshot 2024-04-22 at 3.24.56 PM.png

Screenshot 2024-04-22 at 3.37.50 PM.png

Screenshot 2024-04-22 at 3.38.28 PM.png

Screenshot 2024-04-22 at 3.38.57 PM.png

Screenshot 2024-04-22 at 3.40.57 PM.png

ballardw
Super User

Please place code or log text into a text box. Then we can actually see it in a usable forma and possibly even edit it to correct problems or suggest changes. Open a text box using the </> icon that appears above the message window and the paste any copied text. That has to be simpler than making a picture, especially when it requires multiple pictures to show everything.

 

You should also show an example of actually calling the macro.

From what I see the problem is most likely to come from something before after the macro call.

 

 

You have several places in you macro that may be very hard to debug if something goes a bit awry. You use the same data set name on the Data and Set statement. That means the source data set on the Set statement was completely replaced by the output. So if there is an assignment issue you may no longer have a way to debug the data as the same set has been replaced a couple times in the macro.

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 314 views
  • 0 likes
  • 2 in conversation