<?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: Help in my pgm in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503402#M134510</link>
    <description>&lt;P&gt;Thank you very much for quick help. The following errors i am seeing. Thank you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Required operator not found in expression: &amp;amp;title3.=
ERROR: The macro ONE will stop executing.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Oct 2018 13:35:44 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2018-10-11T13:35:44Z</dc:date>
    <item>
      <title>Help in my pgm: ERROR: Required operator not found</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503391#M134502</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of support helped me in my pgm.&amp;nbsp; &amp;nbsp; I am getting error in my pgm when I ran macro one below. It is giving me error in &amp;amp;title3 statement. Please help. Thanks.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let gmvar_asat           = %str((Population)) ;
%let gmvar_subtitle       = %str(Population| Phases(adjuvant and Adjuvant Phases));
%let title_1=%str(Between-Treatment Comparisons in Adverse Events);
%let subtitle=&amp;amp;gmvar_subtitle.|&amp;amp;gmvar_asat.;

data _null_;
    length  item $1000;
     
    %* Create Macro variables Title1-Title# to hold the title and subtitle rows *;
    title_number = 0;
    item = "&amp;amp;title_1." ; 

    title_number=title_number + 1;
    call symput("title" || compress(put(title_number,8.)), compbl(item) );

    temp_subtitle=trim(left("%nrbquote(&amp;amp;subtitle)"));
    _sindex = 1 ;

 
    do while(lengthn(scan(temp_subtitle,_sindex,"|")) &amp;gt; 0);
        title_number=title_number + 1;
        item=trim(left(scan(temp_subtitle,_sindex,"|")));
        call symput("title" || compress(put(title_number,8.)), trim(left(item)) );
        output;
        _sindex=_sindex+1;
    end;
run;&lt;BR /&gt;
%macro one;
data two;
title1= '&amp;amp;title1.';
%if       %str(&amp;amp;title2.)=%str( ) %then %do; title2 ="one"; %let _ttln=2; %end;
%else %if %str(&amp;amp;title4.)=%str( ) %then %do;title4 ="two"; %let _ttln=3 ; %end;
%else %if %str(&amp;amp;title3.)=%str( ) %then %do;title3 ="three"; %let _ttln=4 ; %end;
%else                                  %do; title2 ="&amp;amp;title2.";title3 ="&amp;amp;title3."; title4 ="&amp;amp;title4.";title5 ="five"; %let _ttln=5; %end;
run;
%mend;
%one;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Oct 2018 14:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503391#M134502</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-10-11T14:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help in my pgm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503398#M134507</link>
      <description>&lt;P&gt;What error are you getting? Show us the relevant parts of the SASLOG. Click on the {i} icon and paste the relevant parts of the SASLOG into that window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 13:24:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503398#M134507</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-10-11T13:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help in my pgm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503401#M134509</link>
      <description>&lt;P&gt;For conditions with strings containing blanks, use double quotes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro one;
data two;
title1= '&amp;amp;title1.';
%if       "%str(&amp;amp;title2.)"="%str( )" %then %do; title2 ="one"; %let _ttln=2; %end;
%else %if "%str(&amp;amp;title4.)"="%str( )" %then %do;title4 ="two"; %let _ttln=3 ; %end;
%else %if "%str(&amp;amp;title3.)"="%str( )" %then %do;title3 ="three"; %let _ttln=4 ; %end;
%else                                  %do; title2 ="&amp;amp;title2.";title3 ="&amp;amp;title3."; title4 ="&amp;amp;title4.";title5 ="five"; %let _ttln=5; %end;
run;
%mend;
%one;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but I see no reason for doing this in convoluted macro code, just a data step will do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data two;
title1= "&amp;amp;title1.";
if "&amp;amp;title2." = "" then title2 ="one";
else if "&amp;amp;title4." = "" then title4 ="two";
else if "&amp;amp;title3." = "" then title3 ="three";
else do;
  title2 = "&amp;amp;title2.";
  title3 = "&amp;amp;title3.";
  title4 = "&amp;amp;title4.";
  title5 = "five";
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;although the logic escapes me anyway.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 13:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503401#M134509</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-11T13:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help in my pgm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503402#M134510</link>
      <description>&lt;P&gt;Thank you very much for quick help. The following errors i am seeing. Thank you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Required operator not found in expression: &amp;amp;title3.=
ERROR: The macro ONE will stop executing.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Oct 2018 13:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503402#M134510</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-10-11T13:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help in my pgm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503407#M134513</link>
      <description>&lt;P&gt;Thank you very much. It worked.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 13:53:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503407#M134513</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-10-11T13:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help in my pgm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503412#M134514</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;For conditions with strings containing blanks, use double quotes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro one;
data two;
title1= '&amp;amp;title1.';
%if       "%str(&amp;amp;title2.)"="%str( )" %then %do; title2 ="one"; %let _ttln=2; %end;
%else %if "%str(&amp;amp;title4.)"="%str( )" %then %do;title4 ="two"; %let _ttln=3 ; %end;
%else %if "%str(&amp;amp;title3.)"="%str( )" %then %do;title3 ="three"; %let _ttln=4 ; %end;
%else                                  %do; title2 ="&amp;amp;title2.";title3 ="&amp;amp;title3."; title4 ="&amp;amp;title4.";title5 ="five"; %let _ttln=5; %end;
run;
%mend;
%one;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using double quotes in this context is not recommended.&amp;nbsp;&amp;nbsp;I think all that is needed is the proper execution time quoting function.&amp;nbsp; I like SUPERQ it works as I expect in most situations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do agree that the entire macro part is unnecessary in this application.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 14:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-my-pgm-ERROR-Required-operator-not-found/m-p/503412#M134514</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-10-11T14:06:24Z</dc:date>
    </item>
  </channel>
</rss>

