<?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: Wildcards in datastep in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179789#M34353</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what's the problem with find() or index() - but below a few other options I can currently think of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input zip $ name $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;12345 ram&lt;/P&gt;&lt;P&gt;67891 ravi&lt;/P&gt;&lt;P&gt;01/45 raju&lt;/P&gt;&lt;P&gt;10/46 kumar&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want1 as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where zip not like '%/%'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set a(where=(zip not like '%/%'));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where zip not like '%/%';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; delete from a (where=(zip like '%/%'));&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Feb 2015 10:30:02 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2015-02-24T10:30:02Z</dc:date>
    <item>
      <title>Wildcards in datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179788#M34352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've a code like below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input zip $ name $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;12345 ram&lt;/P&gt;&lt;P&gt;67891 ravi&lt;/P&gt;&lt;P&gt;01/45 raju&lt;/P&gt;&lt;P&gt;10/46 kumar&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Followed by I need to delete the records if the variable zip has slash (/) between them. I know it can be done via find or index function. &lt;/SPAN&gt;But I wish to understand if it can be done by wildcards. e.g. if zip like '%/%' then delete. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thankful for any help you offer me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 10:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179788#M34352</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-02-24T10:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards in datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179789#M34353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what's the problem with find() or index() - but below a few other options I can currently think of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input zip $ name $;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;12345 ram&lt;/P&gt;&lt;P&gt;67891 ravi&lt;/P&gt;&lt;P&gt;01/45 raju&lt;/P&gt;&lt;P&gt;10/46 kumar&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want1 as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where zip not like '%/%'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set a(where=(zip not like '%/%'));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where zip not like '%/%';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; delete from a (where=(zip like '%/%'));&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 10:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179789#M34353</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-02-24T10:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards in datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179790#M34354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't we use wildcards in if clause?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 11:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179790#M34354</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-02-24T11:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcards in datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179791#M34355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF statements do not support LIKE operator.&lt;/P&gt;&lt;P&gt;There are many other operators or functions you can use in the IF statement,so it is not really much of a loss.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;if index(zip,'/') then delete;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 14:31:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wildcards-in-datastep/m-p/179791#M34355</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-02-24T14:31:22Z</dc:date>
    </item>
  </channel>
</rss>

