<?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: Wildcarding Variable names in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154029#M40475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create a list of all variables that end in date using dictionary.Columns/sashelp.vcolumn but it may not be worth it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 14:58:15 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2014-12-17T14:58:15Z</dc:date>
    <item>
      <title>Wildcarding Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154028#M40474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know if there is a way of formatting all the date variables using a wildcard naming convention. For instance, if you have 4&lt;BR /&gt;date variables (datestart, dateend, datedue and datestopped), you can use the following; '&lt;EM&gt;format date: ddmmyy8.;&lt;/EM&gt;' but if the&lt;/P&gt;&lt;P&gt;variables were called startdate, enddate, duedate and stopdate, is there a way to wildcard the variable name from the beginning ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help offered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 14:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154028#M40474</guid>
      <dc:creator>crayfordsean</dc:creator>
      <dc:date>2014-12-17T14:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcarding Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154029#M40475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create a list of all variables that end in date using dictionary.Columns/sashelp.vcolumn but it may not be worth it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 14:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154029#M40475</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-17T14:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcarding Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154030#M40476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Reeza stated you may use the dictionary. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;select name into :vars separated by ' ' from sashelp.vcolumn&lt;BR /&gt;where memname='CLASS' and libname='SASHELP' AND name like '%e';&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%put &amp;amp;vars;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;informat &amp;amp;vars $15.;&amp;nbsp; &lt;BR /&gt;set sashelp.class (drop=&amp;amp;vars) ;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 15:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154030#M40476</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2014-12-17T15:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcarding Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154031#M40477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IIf the variables are side by side you can use --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;format firstvar--lastvar date9.;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 15:05:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154031#M40477</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-17T15:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcarding Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154032#M40478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the variables aren't side by side here is a working example of what Fareeza suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input startdate x enddate y duedate stopdate;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 5 6&lt;/P&gt;&lt;P&gt;2 3 4 5 6 7&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select name into :vars&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from sashelp.vcolumn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname='WORK' and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memname='HAVE' and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name like '%date'&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 want;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; set have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.63636302948px;"&gt;&amp;nbsp; format &amp;amp;vars. date9.; &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 15:30:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154032#M40478</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-12-17T15:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcarding Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154033#M40479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you put the FORMAT statement after the SET it won't reorder the variables in HAVE.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 16:42:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154033#M40479</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-12-17T16:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Wildcarding Variable names</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154034#M40480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good point! I changed it in my post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 16:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Wildcarding-Variable-names/m-p/154034#M40480</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-12-17T16:56:48Z</dc:date>
    </item>
  </channel>
</rss>

