<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trying to execute two macro function while passing the ith value of a macro variable in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427794#M27554</link>
    <description>&lt;P&gt;I have tried this solution but still the same error?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2018 18:47:21 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2018-01-15T18:47:21Z</dc:date>
    <item>
      <title>Trying to execute two macro function while passing the ith value of a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427788#M27549</link>
      <description>&lt;P&gt;Hello SAS Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am receiving this error message (The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation marks.)&amp;nbsp; while run the code bellow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do we correct this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let liste1=4514 4530 4532 4548 4557 4595 4598 4621 4631 4673;&lt;BR /&gt;%macro loop(vlist);&lt;BR /&gt;%let nobs1=%sysfunc(countw(&amp;amp;vlist));/*Number of sale agents*/&lt;BR /&gt;%do i=1 %to &amp;amp;nobs1;&lt;BR /&gt;%let Temp=%sysfunc(compress(%scan(&amp;amp;vlist,&amp;amp;i)));&lt;BR /&gt;%calcul(&amp;amp;Temp);&lt;BR /&gt;%rapport(&amp;amp;Temp);&lt;BR /&gt;%end;&lt;BR /&gt;%loop(&amp;amp;liste1.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 Le Système SAS 13:04 Monday, January 15, 2018&lt;/P&gt;&lt;P&gt;1 ;*'&lt;BR /&gt;_&lt;BR /&gt;49&lt;BR /&gt;1 ! ;*";*/;quit;run;&lt;BR /&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;&lt;P&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='VT_Outil Ma Contribution par agent 2018_ALP3'&lt;BR /&gt;_______________________________&lt;BR /&gt;49&lt;BR /&gt;3 ! ;&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Flux de processus'&lt;BR /&gt;_&lt;BR /&gt;49&lt;BR /&gt;4 ! ;&lt;BR /&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;&lt;P&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;8 %LET _SASPROGRAMFILE='S:\IAAH\IaahCycleSAS_DEV\Rapports\TRTRPDNC\Operationnel\VT_Outil Ma Contribution par agent&lt;BR /&gt;8 ! 2018_ALP3.sas'&lt;BR /&gt;_&lt;BR /&gt;49&lt;BR /&gt;8 ! ;&lt;BR /&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;&lt;P&gt;9 %LET _SASPROGRAMFILEHOST='LT1300';&lt;BR /&gt;10&lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;12 OPTIONS DEV=PNG;&lt;BR /&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;14 FILENAME EGSR TEMP;&lt;BR /&gt;15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;16 STYLE=HTMLBlue&lt;BR /&gt;17 STYLESHEET=(URL="file:///C:/Program%20Files/SAS94/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")&lt;BR /&gt;18 NOGTITLE&lt;BR /&gt;19 NOGFOOTNOTE&lt;BR /&gt;NOTE: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation&lt;BR /&gt;marks.&lt;BR /&gt;20 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;21 ENCODING=UTF8&lt;BR /&gt;22 options(rolap="on")&lt;BR /&gt;23 ;&lt;BR /&gt;24&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 %let liste1=4514 4530 4532 4548 4557 4595 4598 4621 4631 4673;&lt;BR /&gt;27 %macro loop(vlist);&lt;BR /&gt;28 %let nobs1=%sysfunc(countw(&amp;amp;vlist));/*Number of sale agents*/&lt;BR /&gt;29 %do i=1 %to &amp;amp;nobs1;&lt;BR /&gt;30 %let Temp=%sysfunc(compress(%scan(&amp;amp;vlist,&amp;amp;i)));&lt;BR /&gt;31 %calcul(&amp;amp;Temp);&lt;BR /&gt;32 %rapport(&amp;amp;Temp);&lt;BR /&gt;33 %end;&lt;BR /&gt;34 %loop(&amp;amp;liste1.);&lt;BR /&gt;2 Le Système SAS 13:04 Monday, January 15, 2018&lt;/P&gt;&lt;P&gt;35&lt;BR /&gt;36 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;37 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;38 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;39 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;40 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;41 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;42 %LET _SASPROGRAMFILE=;&lt;BR /&gt;43 %LET _SASPROGRAMFILEHOST=;&lt;BR /&gt;44&lt;BR /&gt;45 ;*';*";*/;quit;run;&lt;BR /&gt;46 ODS _ALL_ CLOSE;&lt;BR /&gt;47&lt;BR /&gt;48&lt;BR /&gt;49 QUIT; RUN;&lt;BR /&gt;50&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 18:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427788#M27549</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-01-15T18:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute two macro function while passing the ith value of a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427792#M27553</link>
      <description>&lt;P&gt;Those errors are actually coming before your code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happens if you restart, for a clean session, and submit the following code. Does that generate the same errors?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Jan 2018 18:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427792#M27553</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-15T18:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute two macro function while passing the ith value of a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427794#M27554</link>
      <description>&lt;P&gt;I have tried this solution but still the same error?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 18:47:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427794#M27554</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-01-15T18:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute two macro function while passing the ith value of a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427811#M27555</link>
      <description>&lt;P&gt;The code you have showed does not cause the error.&amp;nbsp; The below runs fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let liste1=4514 4530 4532 4548 4557 4595 4598 4621 4631 4673;
%macro loop(vlist);
%let nobs1=%sysfunc(countw(&amp;amp;vlist));/*Number of sale agents*/
%do i=1 %to &amp;amp;nobs1;
  %let Temp=%sysfunc(compress(%scan(&amp;amp;vlist,&amp;amp;i)));
  /** 
  %calcul(&amp;amp;Temp);
  %rapport(&amp;amp;Temp);
  **/
  %put Temp=&amp;amp;Temp ;
%end;
%mend loop ;
%loop(&amp;amp;liste1.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This suggests the problem is either earlier in your code / SAS session, or in one of the macros you are invoking, %calcul or %rapport.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note it looks like your code is missing a %MEND statement to end the definition of %loop.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 19:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/427811#M27555</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-01-15T19:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute two macro function while passing the ith value of a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/428019#M27560</link>
      <description>&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note that my&amp;nbsp;&lt;SPAN&gt;%MEND statement to end the definition of %loop in not missing (see the 3 last lines)&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macrostatement"&gt;%end&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token macrobound"&gt;%mend&lt;/SPAN&gt; loop &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token macroname"&gt;%loop&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;liste1&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;moreover, I agree with you that I have error(s) generated by the execution of my macro function either &lt;BR /&gt;%rapport or %calcul;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Alain&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 14:25:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/428019#M27560</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-01-16T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute two macro function while passing the ith value of a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/428021#M27561</link>
      <description>&lt;P&gt;Did you copy the last three lines from&amp;nbsp;my post? I added a %MEND to test out your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at the code and log from your initial post, I don't see a %MEND statement before you call %loop:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;26 %let liste1=4514 4530 4532 4548 4557 4595 4598 4621 4631 4673;&lt;BR /&gt;27 %macro loop(vlist);&lt;BR /&gt;28 %let nobs1=%sysfunc(countw(&amp;amp;vlist));/*Number of sale agents*/&lt;BR /&gt;29 %do i=1 %to &amp;amp;nobs1;&lt;BR /&gt;30 %let Temp=%sysfunc(compress(%scan(&amp;amp;vlist,&amp;amp;i)));&lt;BR /&gt;31 %calcul(&amp;amp;Temp);&lt;BR /&gt;32 %rapport(&amp;amp;Temp);&lt;BR /&gt;33 %end;&lt;BR /&gt;34 %loop(&amp;amp;liste1.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Missing a %MEND statement can cause all sorts of interesting problems.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 14:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/428021#M27561</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-01-16T14:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to execute two macro function while passing the ith value of a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/428034#M27563</link>
      <description>&lt;P&gt;I agree with you.&lt;/P&gt;&lt;P&gt;Alain&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 14:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trying-to-execute-two-macro-function-while-passing-the-ith-value/m-p/428034#M27563</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-01-16T14:40:54Z</dc:date>
    </item>
  </channel>
</rss>

