BookmarkSubscribeRSS Feed
Babloo
Rhodochrosite | Level 12

I'm calling the macro as shown below.  This macro was working fine in development server but when I deployed this code to production I've got the error. Production version of the code is same as development now. Any help why I got the error?

 

%retrieve_transfer_data (
start_date_udh=%quote(&start_date_udh),
end_date_udh=%quote(&end_date_udh),
out_sales_table=%quote(&out_sales_table)

Error is

%retrieve_transfer_data( start_date_udh=, end_date_udh=, out_sales_table= ) / 
minoperator;
19   %retrieve_transfer_data(
     -
     180
ERROR 180-322: Statement is not valid or it is used out of proper order.

SYMBOLGEN:  Macro variable OUT_SALES_TABLE resolves to out_sales_table
MPRINT(ASSEMBLE_DATA):   * declare local macros variables *;
ERROR: The %LOCAL statement is not valid in open code.
2 REPLIES 2
PaigeMiller
Diamond | Level 26

Show us the ENTIRE code for the macro. Show us the ENTIRE log for this macro, not just the error messages. Please copy the log as text and then paste it into the window that appears when you click on the </> icon.

PaigeMiller_0-1663012019648.png

--
Paige Miller
ballardw
Super User

Has the macro been compiled in the current session? If the code that creates the macro is not executed then it is not available to execute and is likely the most common failure.

 

You may need to provide a copy of the macro code in a location that the executing SAS session recognizes as an autocall location so that it can find and compile the code when needed.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 796 views
  • 0 likes
  • 3 in conversation