<?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 using the same array code on many data sets with the same layout in one data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39688#M8056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9;"&gt;You might be able to get away with just using a wildcard.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;data all;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;set raw.q:;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;array q12003(3) m1 m2 m3;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;do month = 1 to 3;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;sales=q12003(month);&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;output;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;end;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Mar 2012 21:36:53 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-03-21T21:36:53Z</dc:date>
    <item>
      <title>using the same array code on many data sets with the same layout in one data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39687#M8055</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to figure out how to use the same array code on many data sets with the same layout.&amp;nbsp; I have quarterly data that contains three months of sales in each quarter.&amp;nbsp; The data is in wide form and I am using an array to push it to long form.&amp;nbsp; My goal is to reshape and append the data sets.&amp;nbsp; The array code I wrote to reshape one quarter is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data q12003;&lt;/P&gt;&lt;P&gt;set raw.q12003;&lt;/P&gt;&lt;P&gt;array q12003(3) m1 m2 m3;&lt;/P&gt;&lt;P&gt;do month = 1 to 3;&lt;/P&gt;&lt;P&gt;sales=q12003(month);&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the raw library there are quarterly data files q12003, q22003, q32003, q42003, q12004 etc.&amp;nbsp; I think it is possible to use the data step code with the array to reshape all data in raw at once without creating separate data steps for each reshape.&amp;nbsp; My intuition tells me that a macro could be used for this but I am not sure how to get started.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 21:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39687#M8055</guid>
      <dc:creator>jdub</dc:creator>
      <dc:date>2012-03-21T21:15:51Z</dc:date>
    </item>
    <item>
      <title>using the same array code on many data sets with the same layout in one data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39688#M8056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9;"&gt;You might be able to get away with just using a wildcard.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;data all;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;set raw.q:;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;array q12003(3) m1 m2 m3;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;do month = 1 to 3;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;sales=q12003(month);&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;output;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;end;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 21:36:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39688#M8056</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-03-21T21:36:53Z</dc:date>
    </item>
    <item>
      <title>using the same array code on many data sets with the same layout in one data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39689#M8057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yah, this works.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;geez, everytime I think I know a path to a solution in SAS there is always a way to fold the problem and shorten the distance to travel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 22:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39689#M8057</guid>
      <dc:creator>jdub</dc:creator>
      <dc:date>2012-03-21T22:54:26Z</dc:date>
    </item>
    <item>
      <title>using the same array code on many data sets with the same layout in one data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39690#M8058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FWIW:&amp;nbsp; I've been trying to learn the language for the past 38 years.&amp;nbsp; Every time I think I finally know everything, I discover that I'm just a novice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 22:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39690#M8058</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-03-21T22:57:55Z</dc:date>
    </item>
    <item>
      <title>using the same array code on many data sets with the same layout in one data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39691#M8059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;You are a Master, not a novice.:smileylaugh:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 23:34:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/using-the-same-array-code-on-many-data-sets-with-the-same-layout/m-p/39691#M8059</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-03-21T23:34:19Z</dc:date>
    </item>
  </channel>
</rss>

