<?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: Is there a function that says var not equal to partial character string? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799471#M314376</link>
    <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  infile datalines dsd dlm=",";
  input name $ @@;
  if upcase(substr(name,1,1))='P';
  datalines;
red, orange, yellow, blue, green, indigo, violet, purple, turquoise, pink
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;...or this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data sample;
  infile datalines dsd dlm=",";
  input name $ @@;
  if upcase(name)=:'P';
  datalines;
red, orange, yellow, blue, green, indigo, violet, purple, turquoise, pink
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 02 Mar 2022 00:43:16 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2022-03-02T00:43:16Z</dc:date>
    <item>
      <title>Is there a function that says var not equal to partial character string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799418#M314347</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infill datalines dsd dlm=",':
input name $ @@;
red, orange, yellow, blue, green, indigo, violet, purple, turquoise, pink
;
run;

data want;
set have;
if name="p " /* what is a function that deals with partial character strings*/
;
run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hi, I'm trying to find a function where I can condition a data step to return back only values that match the partial character string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;could I receive some assistance? thanks&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 18:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799418#M314347</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-03-01T18:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that says var not equal to partial character string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799422#M314350</link>
      <description>&lt;P&gt;There are a lot of ways to do thins i would guess.&lt;BR /&gt;&lt;BR /&gt;I would try&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
match_name = find (name, 'p','i');
if match_name &amp;gt; 0;
drop match_name;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Returns purple and pink.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 19:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799422#M314350</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2022-03-01T19:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that says var not equal to partial character string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799424#M314352</link>
      <description>&lt;P&gt;FIND()&amp;nbsp;&lt;/P&gt;
&lt;P&gt;INDEX()&lt;/P&gt;
&lt;P&gt;Colon (=:), if looking for matches at the start of strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/252358"&gt;@Hello_there&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infill datalines dsd dlm=",':
input name $ @@;
red, orange, yellow, blue, green, indigo, violet, purple, turquoise, pink
;
run;

data want;
set have;
if name="p " /* what is a function that deals with partial character strings*/
;
run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hi, I'm trying to find a function where I can condition a data step to return back only values that match the partial character string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;could I receive some assistance? thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 19:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799424#M314352</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-03-01T19:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that says var not equal to partial character string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799457#M314367</link>
      <description>&lt;P&gt;What exactly do you mean by ="p "? That it contains a p anywhere in the string? That the exact string p followed by a space is in the string (which means no matches in your example)? Starts with a p?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You really need to show exactly what you expect for the output as there may be several ways and may not match your need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 21:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799457#M314367</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-01T21:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that says var not equal to partial character string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799470#M314375</link>
      <description>Hi, sorry for the confusion. &lt;BR /&gt;&lt;BR /&gt;I'm looking for a function that select the colors that start with "p"</description>
      <pubDate>Wed, 02 Mar 2022 00:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799470#M314375</guid>
      <dc:creator>Hello_there</dc:creator>
      <dc:date>2022-03-02T00:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that says var not equal to partial character string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799471#M314376</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  infile datalines dsd dlm=",";
  input name $ @@;
  if upcase(substr(name,1,1))='P';
  datalines;
red, orange, yellow, blue, green, indigo, violet, purple, turquoise, pink
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;...or this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data sample;
  infile datalines dsd dlm=",";
  input name $ @@;
  if upcase(name)=:'P';
  datalines;
red, orange, yellow, blue, green, indigo, violet, purple, turquoise, pink
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Mar 2022 00:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799471#M314376</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-03-02T00:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that says var not equal to partial character string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799476#M314377</link>
      <description>&lt;P&gt;or&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt; if upcase(first(NAME))='P';&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Mar 2022 02:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-function-that-says-var-not-equal-to-partial-character/m-p/799476#M314377</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-03-02T02:02:26Z</dc:date>
    </item>
  </channel>
</rss>

