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

Hi community,

 

I am trying to find the error in the following Macro but I am not sure I got. Any thoughts?

Thanks in advance 🙂

%MACRO Cleanup;

   %IF &syserr <= 0 %THEN

          DO;

                proc sql;

                       drop table W.BASE;

                quit;

 

          END;

%MEND Cleanup;

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

I see two errors, there may be more. It should be

 

%MACRO Cleanup;
   %IF &syserr <= 0 %THEN %DO;
                proc sql;
                       drop table W.BASE;
                quit;
    %END;
%MEND Cleanup;

If there are still errors, use the command

options mprint;

at the start of the program and show us the entire LOG for this macro (do not chop anything out of the LOG). Please preserve the formatting of the log by copying it as text and then pasting it into the window that appears when you click on the </> icon. DO NOT SKIP THIS STEP.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

I see two errors, there may be more. It should be

 

%MACRO Cleanup;
   %IF &syserr <= 0 %THEN %DO;
                proc sql;
                       drop table W.BASE;
                quit;
    %END;
%MEND Cleanup;

If there are still errors, use the command

options mprint;

at the start of the program and show us the entire LOG for this macro (do not chop anything out of the LOG). Please preserve the formatting of the log by copying it as text and then pasting it into the window that appears when you click on the </> icon. DO NOT SKIP THIS STEP.

--
Paige Miller
SamiBG
Calcite | Level 5

Hi PaigeMiller,

 

Thanks alot for the quick answer. That was what I was looking for 🙂

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 798 views
  • 0 likes
  • 2 in conversation