BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

I called macro variables in the first one. BUUUT i got this ERROR. What can i do ?

 

 


sas_error.png
1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

That odd piece of code that's throwing the error is put in by SAS Enterprise Guide, possibly among other products, to try to catch instances of unbalanced quotes, comments, etc.

 

I've got that error a number of times, and that has always been the problem. To get clearer information, right click on your server in the "Server List" and pick Disconnect. That will get rid of your old SAS session. Then run your code; you should get more useful diagnostics.

 

Tom

View solution in original post

11 REPLIES 11
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Why are you running this code:

;*';*";*/;quit;run;

 

It looks like some macro variable or code is not written correctly and you are trying to fix it later on by closing all quotes and such like.  

I cannot however tell from what you have posted.  Step through your progam and find out where the problem starts, maybe your missing a quote (which is kind of what the note is saying) or perhaps something else is happening.

Maksim_Karyagin
Calcite | Level 5

And what was that ? where is mistakes?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

I am not sure how I am supposed to know, you haven't provided any relevant information.  All I have is a small bit of code and 2 notes in a picture.  As I said the notes are indicative to text strings which have not been closed properly, broken macros, or very long strings and this:

;*';*";*/;quit;run;

Is some attempt to fix it.  Other than that I have nothing to work with.

Maksim_Karyagin
Calcite | Level 5

I'VE ADDED 2 PICTURE.

 

Please, help me

 


1.png2.png
Kurt_Bremser
Super User

Check your code for unbalanced quotes, especially in connection with macro variables and calling them.

If that does not give you a clue, post the log (where those NOTEs appear). Post rather too much than too little.

Kurt_Bremser
Super User

These notes usually appear when a quoted string is immediately followed by a non-blank character. With unbalanced quotes, the (by you) intended start of a string looks to the SAS interpreter like the end of a very long string.

Maksim_Karyagin
Calcite | Level 5

IS IT CORRECT ???

 

 

 

*PATH AND LIBRARY;
%let PATH = E:\datafolder\Optimization\AGR;
libname AGR 'E:\datafolder\Optimization';
*options noquotelenmax nosource nonotes;
options noquotelenmax source notes;

 

ballardw
Super User

NOTES are not errors. The specific note relates to using code that may have something like Put "this is quoted text"variablename. or quoted text followed by any instruction such as "text"run;

SAS is saying that the future behavior might change so that the results from such code might change in future releases. If your intent is to write a string followed bythe value of a variable, or macro variable, without a space then perhaps consider using a concatenation function to explicitly create the desired string value an then use that value or place a space between the quoted text and the next identifier be it variable name or program statement such as Run Quit or other reserved word.

TomKari
Onyx | Level 15

That odd piece of code that's throwing the error is put in by SAS Enterprise Guide, possibly among other products, to try to catch instances of unbalanced quotes, comments, etc.

 

I've got that error a number of times, and that has always been the problem. To get clearer information, right click on your server in the "Server List" and pick Disconnect. That will get rid of your old SAS session. Then run your code; you should get more useful diagnostics.

 

Tom

Maksim_Karyagin
Calcite | Level 5

What's going on with this ??? What a problem? WHat is this?


1.png2.png3.png4.png
TomKari
Onyx | Level 15

The first one is program code. I'm not sure what you're asking. The second, third, and fourth are the same problem, somewhere an unbalanced double quote is getting SAS confused. I'm afraid your only option is to examine your code to figure out where it's happening. The problem is usually not where the error message occurs.

 

Tom

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 11 replies
  • 2704 views
  • 3 likes
  • 5 in conversation