DATA Step, Macro, Functions and more

Program not getting execued

Reply
Contributor
Posts: 53

Program not getting execued

HI,

 

I am running my code in sas9.2.

 

When I submit the code, I see everything in black in the log window. (Ususally it has colours).

ANd I dont see anything in the output window. I know only the code inside a macro comes in black.

 

ANy idea why my code is not giving any output/ Log messages?

 

Thanks,

Archana

Super User
Super User
Posts: 7,988

Re: Program not getting execued

Posted in reply to ArchanaSudhir

It sounds to me like you have had unbalanced Quote marks at some point in a program, hence anything you are submitting now is showing as part of that text, i.e.:

a="abcde;

run;

 

As there is no finishing quote, the ;run; is part of the text so is anything following.  Generally I would save and restart SAS, thats simplest.  Make sure anything you run has balanced quotes, if you start with single finish with single, double finish with double, they must balace each other out.

Super User
Posts: 11,343

Re: Program not getting execued

Posted in reply to ArchanaSudhir

Since you mention that a MACRO was involved, you might post the code of the macro involved.

Trusted Advisor
Posts: 1,118

Re: Program not getting execued

Posted in reply to ArchanaSudhir

Sometimes it helps to submit a certain sequence of closing quotes and statements. Here is one example with explanation cited from a former colleague's website, Roland's SAS® Macros:

 

*';*";*/;*);run;%put >>> NOW WORKING;

"Copy and paste the above line of code into your sas session and run it three times if your session gets stuck in that you submit things and see it echoed in the log but it does not do anything. If you see the ">>> NOW WORKING" message starting at column one in the log then your session just came back to life again (hopefully)."

 

Other suggestions (some including a MEND statement, which I think is promising if you have worked with macros in your hanging session) were discussed on http://stackoverflow.com/questions/107414/whats-your-best-trick-to-break-out-of-an-unbalanced-quote-....

Ask a Question
Discussion stats
  • 3 replies
  • 195 views
  • 0 likes
  • 4 in conversation