<?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: 'If do' question in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/If-do-question/m-p/182110#M46379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"and" is a logical operator and not a tool to string statements together.&lt;/P&gt;&lt;P&gt;If you are inclined to write unreadable spaghetti code, "if field1='X' then do;field2='Y';field3='Z';end;" in one line will do nicely.&lt;/P&gt;&lt;P&gt;/sarcasm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2014 14:56:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2014-10-13T14:56:02Z</dc:date>
    <item>
      <title>'If do' question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-do-question/m-p/182108#M46377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I want to write code that changes the value of 2 or more fields if another field has a certain value i normally write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Field1 = 'X' then do:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Field2 = 'Y';&lt;/P&gt;&lt;P&gt;&amp;nbsp; Field3 = 'Z';&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using If-do is there a way you can write it like if Field1 = 'X' then Field2 = 'Y' and Field3 = 'Z'??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-do-question/m-p/182108#M46377</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2014-10-13T14:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: 'If do' question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-do-question/m-p/182109#M46378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not that I know of.&amp;nbsp; Your if syntax above looks fine to me, and reads far better than a long string version such as you request, e.g. I can instantly see that there are two variables being manipulated and what is assigned simply by observing the indented text, it would really bug me if I started seeing code like:&lt;/P&gt;&lt;P&gt;if a=b then a=2 and b=5 and c=5 and d=3 and e=e and...;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-do-question/m-p/182109#M46378</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-10-13T14:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: 'If do' question</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-do-question/m-p/182110#M46379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"and" is a logical operator and not a tool to string statements together.&lt;/P&gt;&lt;P&gt;If you are inclined to write unreadable spaghetti code, "if field1='X' then do;field2='Y';field3='Z';end;" in one line will do nicely.&lt;/P&gt;&lt;P&gt;/sarcasm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 14:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-do-question/m-p/182110#M46379</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-10-13T14:56:02Z</dc:date>
    </item>
  </channel>
</rss>

