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.
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.