BookmarkSubscribeRSS Feed
brophymj
Quartz | Level 8

Does anyone else have this problem? Basically, sometimes when I write a macro and run the code, nothing happens. The log just writes the code you tried to execute in black but it's like SAS is disabled and you have to turn off SAS and turn it back on before it runs properly again. Is there a way around this without having to turn off and on sas.

3 REPLIES 3
Kurt_Bremser
Super User

You have some open string or definition, or an unclosed comment. SAS waits for this to "finish".

Inspect the code/log you submitted before this happened.

Astounding
PROC Star

An additional possibility:  an unfinished macro definition (missing the %mend statement).  At any rate, here is a string you can submit that will close most (possibly all) of these types of problems without getting out of SAS:

*);*/;/*'*/ /*"*/; %MEND;run;quit;;;;;

Good luck.

ballardw
Super User

Be very careful with comments as the macro processor doesn't like the *line of code; comments.

If you are using those change them to %* code; So the macro processor knows they are comments.

Also, as much as practical, start small and add pieces. If your think your data is too large for this to run due to length of processing then make a smaller data set with the key elements and just a few records or use the system option OBS to set a number of records to process.

Spelling counts.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 20891 views
  • 2 likes
  • 4 in conversation