Given below is a macro to return a link in a macro variable appr_link. I am getting some errors. The log is also attached. %let Report_Name=testng; %put &=Report_Name.; %let dev_email ="emailid "; %macro test_m(dev_email=, repname=, appr_link=); data _null_; length str_date $10.; call symput('str_date',put(today(),MMDDYY10.)); run; %put &=str_date; %LET Appr_Body_Text = As the report owner, I have reviewed the schedule/data for the &repname. and believe it accurately reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to accuracy or completeness related to this process.; %let aprlink="<pre> <a href='mailto:emailid?subject=BUSINESS APPROVAL: &Report_Name.; sent on &str_date. %nrstr(&cc=) %sysfunc(dequote(&dev_email.)) %nrstr(&body=)&Appr_Body_Text.'>REPORT APPROVAL EMAIL</a></pre>" ; %put &=str_date; %put &=aprlink.; %let appr_link=&aprlink.; &aprlink.; %mend; %test_m(dev_email=&dev_email. ,repname=&Report_Name.,appr_link=aprlink) %put &appr_link.; **********************************LOG********************************************************** 27 28 %let Report_Name=testng; 29 %put &=Report_Name.; SYMBOLGEN: Macro variable REPORT_NAME resolves to testng REPORT_NAME=testng 30 %let dev_email ="emailid "; 31 32 33 %macro test_m(dev_email=, repname=, appr_link=); 34 data _null_; 35 length str_date $10.; 36 call symput('str_date',put(today(),MMDDYY10.)); 37 run; 38 %put &=str_date; 39 40 %LET Appr_Body_Text = As the report owner, I have reviewed the schedule/data for the &repname. and believe it accurately 40 ! reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to 40 ! accuracy or completeness related to this process.; 41 %let aprlink="<pre> <a href='mailto:Emailid?subject=BUSINESS APPROVAL: &Report_Name.; sent on 41 ! &str_date. %nrstr(&cc=) %sysfunc(dequote(&dev_email.)) %nrstr(&body=)&Appr_Body_Text.'>REPORT APPROVAL EMAIL</a></pre>" ; 42 %put &=str_date; 43 %put &=aprlink.; 44 %let appr_link=&aprlink.; 45 46 &aprlink.; 47 48 %mend; 49 %test_m(dev_email=&dev_email. ,repname=&Report_Name.,appr_link=aprlink) MLOGIC(TEST_M): Beginning execution. SYMBOLGEN: Macro variable DEV_EMAIL resolves to "emailid" SYMBOLGEN: Macro variable REPORT_NAME resolves to testng MLOGIC(TEST_M): Parameter DEV_EMAIL has value "emailid” MLOGIC(TEST_M): Parameter REPNAME has value testng MLOGIC(TEST_M): Parameter APPR_LINK has value aprlink MPRINT(TEST_M): data _null_; MPRINT(TEST_M): length str_date $10.; MPRINT(TEST_M): call symput('str_date',put(today(),MMDDYY10.)); MPRINT(TEST_M): run; NOTE: Variable str_date is uninitialized. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 3 The SAS System 14:58 Tuesday, December 12, 2023 MLOGIC(TEST_M): %PUT &=str_date SYMBOLGEN: Macro variable STR_DATE resolves to 12/12/2023 STR_DATE=12/12/2023 MLOGIC(TEST_M): %LET (variable name is APPR_BODY_TEXT) SYMBOLGEN: Macro variable REPNAME resolves to testng MLOGIC(TEST_M): %LET (variable name is APRLINK) SYMBOLGEN: Macro variable REPORT_NAME resolves to testng SYMBOLGEN: Macro variable STR_DATE resolves to 12/12/2023 SYMBOLGEN: Macro variable DEV_EMAIL resolves to "emailid” SYMBOLGEN: Macro variable APPR_BODY_TEXT resolves to As the report owner, I have reviewed the schedule/data for the testng and believe it accurately reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to accuracy or completeness related to this process. NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks. MLOGIC(TEST_M): %PUT &=str_date SYMBOLGEN: Macro variable STR_DATE resolves to 12/12/2023 STR_DATE=12/12/2023 MLOGIC(TEST_M): %PUT &=aprlink. SYMBOLGEN: Macro variable APRLINK resolves to "<pre> <a href='mailto:Emailid?subject=BUSINESS APPROVAL: testng; sent on 12/12/2023 &cc= emailid&body=As the report owner, I have reviewed the schedule/data for the testng and believe it accurately reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to accuracy or completeness related to this process.'>REPORT APPROVAL EMAIL</a></pre>" SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing. NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks. APRLINK="<pre> <a href='mailto:Emailid?subject=BUSINESS APPROVAL: testng; sent on 12/12/2023 &cc= Emailid &body=As the report owner, I have reviewed the schedule/data for the testng and believe it accurately reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to accuracy or completeness related to this process.'>REPORT APPROVAL EMAIL</a></pre>" MLOGIC(TEST_M): %LET (variable name is APPR_LINK) SYMBOLGEN: Macro variable APRLINK resolves to "<pre> <a href='mailto:Emailid?subject=BUSINESS APPROVAL: testng; sent on 12/12/2023 &cc= Emailid &body=As the report owner, I have reviewed the schedule/data for the testng and believe it accurately reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to accuracy or completeness related to this process.'>REPORT APPROVAL EMAIL</a></pre>" SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing. NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks. SYMBOLGEN: Macro variable APRLINK resolves to "<pre> <a href='mailto:Emailid?subject=BUSINESS APPROVAL: testng; sent on 12/12/2023 &cc= Emailid &body=As the report owner, I have reviewed the schedule/data for the testng and believe it accurately reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to accuracy or completeness related to this process.'>REPORT APPROVAL EMAIL</a></pre>" SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing. NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks. MPRINT(TEST_M): "<pre> <a href='mailto:Emailid?subject=BUSINESS APPROVAL: testng; sent on 12/12/2023 &cc= Emailid &body=As the report owner, I have reviewed the schedule/data for the testng and believe it accurately reflects the loan activity for this population of accounts/process. I am not aware of any material issues related to accuracy or completeness related to this process.'>REPORT APPROVAL EMAIL</a></pre>"; MLOGIC(TEST_M): Ending execution. WARNING: Apparent symbolic reference APPR_LINK not resolved. NOTE: Line generated by the macro variable "APRLINK". 49 "<pre> <a href='mailto:Emailid?subject=BUSINESS APPROVAL: testng; sent on 12/12/2023 &cc= ___________________________________________________________________________________________________________________ 180 4 The SAS System 14:58 Tuesday, December 12, 2023 49 ! emailid &body=As the report owner, I have reviewed the schedule/data for the testng and believe 49 ! it accurately ERROR 180-322: Statement is not valid or it is used out of proper order. 50 %put &appr_link.; &appr_link.
... View more