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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 725 views
  • 0 likes
  • 2 in conversation