<?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 Loop in Data step help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Loop-in-Data-step-help/m-p/166787#M32119</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 have a data set with that looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID File_period&lt;/P&gt;&lt;P&gt;1 201301&lt;/P&gt;&lt;P&gt;1 201302&lt;/P&gt;&lt;P&gt;1 201303&lt;/P&gt;&lt;P&gt;2 201302&lt;/P&gt;&lt;P&gt;2 201303&lt;/P&gt;&lt;P&gt;3 201301&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like a unique data set by ID and a new variable for all the file periods, for example:&lt;BR /&gt;ID File_Period_1 File_Period_2 File_Period_3&lt;/P&gt;&lt;P&gt;1 201301 201302 201303&lt;/P&gt;&lt;P&gt;2 201302 201301&lt;/P&gt;&lt;P&gt;3 201301&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of file periods will vary by ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what the best way to run this loop, any help greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Feb 2015 21:52:03 GMT</pubDate>
    <dc:creator>DangIT</dc:creator>
    <dc:date>2015-02-12T21:52:03Z</dc:date>
    <item>
      <title>Loop in Data step help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loop-in-Data-step-help/m-p/166787#M32119</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 have a data set with that looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID File_period&lt;/P&gt;&lt;P&gt;1 201301&lt;/P&gt;&lt;P&gt;1 201302&lt;/P&gt;&lt;P&gt;1 201303&lt;/P&gt;&lt;P&gt;2 201302&lt;/P&gt;&lt;P&gt;2 201303&lt;/P&gt;&lt;P&gt;3 201301&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like a unique data set by ID and a new variable for all the file periods, for example:&lt;BR /&gt;ID File_Period_1 File_Period_2 File_Period_3&lt;/P&gt;&lt;P&gt;1 201301 201302 201303&lt;/P&gt;&lt;P&gt;2 201302 201301&lt;/P&gt;&lt;P&gt;3 201301&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of file periods will vary by ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what the best way to run this loop, any help greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 21:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loop-in-Data-step-help/m-p/166787#M32119</guid>
      <dc:creator>DangIT</dc:creator>
      <dc:date>2015-02-12T21:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in Data step help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loop-in-Data-step-help/m-p/166788#M32120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are doing is often called transposing from Long to Wide format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc transpose data=have out=want (drop=_name_)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefix=File_period_;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;var File_period;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please make your entries Questions in the format not Discussions when they are questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 22:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loop-in-Data-step-help/m-p/166788#M32120</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-02-12T22:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loop in Data step help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Loop-in-Data-step-help/m-p/166789#M32121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2015 22:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Loop-in-Data-step-help/m-p/166789#M32121</guid>
      <dc:creator>DangIT</dc:creator>
      <dc:date>2015-02-12T22:14:09Z</dc:date>
    </item>
  </channel>
</rss>

