<?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: Use of colon (:) in editor window in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375513#M90028</link>
    <description>&lt;P&gt;Here is one way:&lt;/P&gt;
&lt;PRE&gt;data have;
  input car1-car4;
  cards;
1 3 4 9
1 5 2 2
5 2 3 7
;

data want;
set have;
  array cars car:;
  do i=1 to dim(cars);
    if cars(i) in (5,6,7,8) then do;
      output;
      leave;
    end;
  end;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2017 21:14:06 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-07-12T21:14:06Z</dc:date>
    <item>
      <title>Use of colon (:) in editor window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375509#M90025</link>
      <description>&lt;P&gt;A dataset "want" has 4 variables car1, car2, car3, car4. I want to see if any of the 4 variables have values 5,6,7,8 in them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data need;&lt;/P&gt;&lt;P&gt;set want;&lt;/P&gt;&lt;P&gt;if car: in (5,6,7,8) then output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error at car:&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: &amp;lt;, &amp;lt;=, =, &amp;gt;, &amp;gt;=, EQ, GE, GT, LE, LT, NE, NG, NL, ^=, ~=.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I use all four variables without writing each one of them in the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 20:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375509#M90025</guid>
      <dc:creator>div44</dc:creator>
      <dc:date>2017-07-12T20:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use of colon (:) in editor window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375513#M90028</link>
      <description>&lt;P&gt;Here is one way:&lt;/P&gt;
&lt;PRE&gt;data have;
  input car1-car4;
  cards;
1 3 4 9
1 5 2 2
5 2 3 7
;

data want;
set have;
  array cars car:;
  do i=1 to dim(cars);
    if cars(i) in (5,6,7,8) then do;
      output;
      leave;
    end;
  end;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 21:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375513#M90028</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-07-12T21:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use of colon (:) in editor window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375547#M90046</link>
      <description>&lt;P&gt;Here is another way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  input CAR1-CAR4;
  cards;
1 3 4 9
1 5 2 2
5 2 3 7
;

data WANT;
  set HAVE;
  MATCH= prxmatch('/[5678]/',catt(of CAR1-CAR4)) &amp;gt; 0 ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV&gt;
&lt;TABLE class="table" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt; &lt;COL class="data" /&gt; &lt;COL class="data" /&gt; &lt;COL class="data" /&gt; &lt;COL class="data" /&gt; &lt;COL class="data" /&gt; &lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="header" scope="colgroup"&gt;CAR1&lt;/TH&gt;
&lt;TH class="header" scope="colgroup"&gt;CAR2&lt;/TH&gt;
&lt;TH class="header" scope="colgroup"&gt;CAR3&lt;/TH&gt;
&lt;TH class="header" scope="colgroup"&gt;CAR4&lt;/TH&gt;
&lt;TH class="header" scope="colgroup"&gt;MATCH&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="b data"&gt;1&lt;/TD&gt;
&lt;TD class="b data"&gt;3&lt;/TD&gt;
&lt;TD class="b data"&gt;4&lt;/TD&gt;
&lt;TD class="b data"&gt;9&lt;/TD&gt;
&lt;TD class="b data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="b data"&gt;1&lt;/TD&gt;
&lt;TD class="b data"&gt;5&lt;/TD&gt;
&lt;TD class="b data"&gt;2&lt;/TD&gt;
&lt;TD class="b data"&gt;2&lt;/TD&gt;
&lt;TD class="b data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="b data"&gt;5&lt;/TD&gt;
&lt;TD class="b data"&gt;2&lt;/TD&gt;
&lt;TD class="b data"&gt;3&lt;/TD&gt;
&lt;TD class="b data"&gt;7&lt;/TD&gt;
&lt;TD class="b data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 00:43:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375547#M90046</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-07-13T00:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use of colon (:) in editor window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375595#M90067</link>
      <description>&lt;P&gt;it's a bit like&amp;nbsp;&lt;SPAN&gt;taking a sledgehammer to crack a nut but I like that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would have done nearly the same as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;demonstrated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  array cars car:;
  do over cars;
    if cars in (5,6,7,8) then Flag=1;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 09:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Use-of-colon-in-editor-window/m-p/375595#M90067</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2017-07-13T09:24:30Z</dc:date>
    </item>
  </channel>
</rss>

