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

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

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

Works fine for me too. You have one more attach_brdm in the result from the code than in your desired result.

View solution in original post

5 REPLIES 5
Reeza
Super User

If attch2 ends up being longer than 256 characters that may be the issue.

SASKiwi
PROC Star

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.

TomKari
Onyx | Level 15

Works fine for me too. You have one more attach_brdm in the result from the code than in your desired result.

yashpande
Obsidian | Level 7

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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 2864 views
  • 6 likes
  • 5 in conversation