Hi All,
I am facing error as below
ERROR: Macro keyword LET appears as text.
The code i have is
%let folder=/gpfs1/SP_Output/Lev1/users/l058017/search_engine_logs/;
%let sub2_l=sitename;
%let attch2="&folder.attach_brdm/attach_brdm_&sub2_l..zip" "&folder.attach_crce/attach_crce_&sub2_l..zip" "&folder.attach_crce/attach_ecps_&sub2_l..zip";
i am using this macro attch2 to send zipped files in email. This code works in base SAS and EG , However when I try to run this in batch it gives error as Macro Keyword LET appears as text.
I want attch2 to be resolved as
"/gpfs1/SP_Output/Lev1/users/l058017/search_engine_logs/attach_brdm_sitename.zip" "/gpfs1/SP_Output/Lev1/users/l058017/search_engine_logs/attach_crce_sitename.zip" "/gpfs1/SP_Output/Lev1/users/l058017/search_engine_logs/attach_ecps_sitename.zip"
Where I am commiting the mistake ??
Need suggestion please
Works fine for me too. You have one more attach_brdm in the result from the code than in your desired result.
Please post the section of the log where the ERROR message appears, so one can see the context.
If attch2 ends up being longer than 256 characters that may be the issue.
I tried running your code and it works fine for me.
I'm wondering if your error is caused by code before your %LET statements. Please provide this so we can offer further advice.
Works fine for me too. You have one more attach_brdm in the result from the code than in your desired result.
Yes there was an issue with the earlier statement where I missed the semicolon.
Thanks a lot Kurt, SAS Kiwi, Tom, Reeza for such valuable inputs
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.