<?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: Create dynamic field names, creating one record from many in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204051#M306259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not going to argue with a working solution, but ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my experience, this transformation is unnecessary better than 90% of the time.&amp;nbsp; In the vast majority of cases, you can get the results you want by using the data in its original form.&amp;nbsp; You might have to learn additional programming techniques, but those techniques will come in handy throughout your programming career.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were to spell out your ultimate goal with the data, you would be pretty sure to get plenty of suggestions about how you can use the original data to get there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jun 2015 21:14:42 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2015-06-11T21:14:42Z</dc:date>
    <item>
      <title>Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204050#M306258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have data that is in multiple rows, which I need to create one row.&amp;nbsp; Along with this each of the fields in the one row need to be built on data from the multiple rows.&lt;/P&gt;&lt;TABLE border="1" cellpadding="2" cellspacing="2" style="width: 257px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="2" height="20" width="54%"&gt;&lt;BR /&gt;&lt;P&gt;What I have&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="31%"&gt;&lt;BR /&gt;&lt;P&gt;MONTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;VALUEa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;VALUEb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;VALUEc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" width="31%"&gt;&lt;BR /&gt;&lt;P&gt;April&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$100&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$43&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$143&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="31%"&gt;&lt;BR /&gt;&lt;P&gt;May&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$200&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$29&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$229&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" width="31%"&gt;&lt;BR /&gt;&lt;P&gt;Jun&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$300&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;BR /&gt;&lt;P&gt;$20&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="23%"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$320&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need...&lt;/P&gt;&lt;TABLE border="1" cellpadding="2" cellspacing="2" width="818"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="12%"&gt;&lt;BR /&gt;&lt;P&gt;What I need&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="12%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="10%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="10%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="19" width="12%"&gt;&lt;BR /&gt;&lt;P&gt;April VALUEa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="12%"&gt;&lt;BR /&gt;&lt;P&gt;April VAULEb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;April VALUEc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;May VALUEa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;May VALUEb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;May VALUE c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;Jun VALUEa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;Jun VALUEb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;Jun VALUE c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" width="12%"&gt;&lt;BR /&gt;&lt;P&gt;$100&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="12%"&gt;&lt;BR /&gt;&lt;P&gt;$43&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;$143&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;$200&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;$29&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;$229&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;$300&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="10%"&gt;&lt;BR /&gt;&lt;P&gt;$20&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" width="11%"&gt;&lt;BR /&gt;&lt;P&gt;$320&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 19:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204050#M306258</guid>
      <dc:creator>LisaSAS</dc:creator>
      <dc:date>2015-06-11T19:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204051#M306259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not going to argue with a working solution, but ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my experience, this transformation is unnecessary better than 90% of the time.&amp;nbsp; In the vast majority of cases, you can get the results you want by using the data in its original form.&amp;nbsp; You might have to learn additional programming techniques, but those techniques will come in handy throughout your programming career.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were to spell out your ultimate goal with the data, you would be pretty sure to get plenty of suggestions about how you can use the original data to get there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 21:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204051#M306259</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-11T21:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204052#M306260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ultimately what I’m looking for is a way to accomplish this without a lot of hardcoding as this table is going to grow.&amp;nbsp; Currently I have about 10 fields that I am using to do my grouping ~ each field will drill down to a deeper level.&amp;nbsp; This will allow the end user to report from the highest to lowest level based on their needs.&amp;nbsp; So these 10 fields will be what they are going to search on.&amp;nbsp; Then with that I’ll have my month field (which eventually will have all 12 months, plus the year), and then the various value fields that I am doing summations on.&amp;nbsp; The end report will break out the Value fields based on month, quarter and YTD. &lt;BR /&gt;So, for my example, I will have APR_Valuea, APR_Valueb, APR_Valuec, MAY_Valuea, MAY_Valueb, MAY_Valuec and so on for the month, quarter and YTD.&amp;nbsp; For each month, there could be 5-6 fields created, same for Quarter and YTD.&amp;nbsp; There will be a ton of fields, so I want to make this the least hard-coded way possible. &lt;/P&gt;&lt;P&gt;Make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 14:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204052#M306260</guid>
      <dc:creator>LisaSAS</dc:creator>
      <dc:date>2015-06-12T14:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204053#M306261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this paper written by me,Matt,Arthur.T&amp;nbsp; , which talk about this question.&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/resources/papers/proceedings15/2785-2015.pdf" title="http://support.sas.com/resources/papers/proceedings15/2785-2015.pdf"&gt;http://support.sas.com/resources/papers/proceedings15/2785-2015.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #353535; font-family: Lato, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;H3&gt;Code: Program&lt;/H3&gt;&lt;DIV class="sce-html-export" style="font-family: 'Courier New', Menlo, 'Lucida Console';"&gt;&lt;PRE class="sce-render" style="font-family: 'Courier New', Menlo, 'Lucida Console'; font-size: 16px;"&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;have&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;input&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;MONTH&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;$&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;VALUEa&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;VALUEb&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;VALUEc&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="format" style="color: #008080;"&gt;dollar12.&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;VALUEa&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;VALUEb&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;VALUEc&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="format" style="color: #008080;"&gt;dollar12.&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;cards&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cards-data" style="color: #bb9905;"&gt;April $100 $43 $143&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cards-data" style="color: #bb9905;"&gt;May $200 $29 $229&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="cards-data" style="color: #bb9905;"&gt;Jun $300 $20 $320&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;sql&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;select&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;catt&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'have(where=(month="'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;month&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'") rename=(VALUEa='&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;month&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'_VALUEa VALUEb='&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;month&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'_VALUEb VALUEc='&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;month&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'_VALUEc))'&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;into&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;list&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;separated&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;by&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;' '&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;have&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;data&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;want&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;merge&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;list&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;drop&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;month&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN class="sep" style="color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 14:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204053#M306261</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-06-12T14:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204054#M306262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;think what Astounding is trying to get at, and would also be my suggestion, is that the data structure you already have:&lt;/P&gt;&lt;TABLE border="1" cellpadding="2" cellspacing="2" style="border: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD colspan="2" height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="54%"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;What I have&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="31%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;MONTH&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;VALUEa&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;VALUEb&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;VALUEc&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="31%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;April&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$100&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$43&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$143&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="31%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;May&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$200&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$29&lt;/P&gt;&lt;/TD&gt;&lt;TD height="19" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$229&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="31%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Jun&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$300&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;BR /&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$20&lt;/P&gt;&lt;/TD&gt;&lt;TD height="20" style="padding-right: 4px; padding-left: 4px; border: 1px solid black; font-style: inherit; font-family: inherit;" width="23%"&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;$320&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is far easier to maintain and use.&amp;nbsp; If you have 10 values, and 6 years, your going to end up with 6 * 12 * 10 variables.&amp;nbsp; This quickly gets out of control.&amp;nbsp; Then there is how are you going to process the data further down the line.&amp;nbsp; You are going to need lists of variables etc.&amp;nbsp; Ask yourself if there really is any benefit to changing the structure of the dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 14:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204054#M306262</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-06-12T14:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204055#M306263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't do it. But if you must then use a double PROC TRANSPOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; month $ value1-value3 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;April 100 43 143&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;May 200 29 229&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;Jun 300 20 320&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;transpose&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=have &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=middle ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; month &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;notsorted&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; value1-value3 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;transpose&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=middle &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;delim&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=_ &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=want (drop=_:);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;id&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; month _name_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; col1 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 17:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204055#M306263</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-06-12T17:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204056#M306264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change it to this structure AFTER you've subset your data based on the filters. This is a reporting structure not a data storage structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 17:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204056#M306264</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-06-12T17:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create dynamic field names, creating one record from many</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204057#M306265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is EXACTLY what I needed, thank you!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 18:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dynamic-field-names-creating-one-record-from-many/m-p/204057#M306265</guid>
      <dc:creator>LisaSAS</dc:creator>
      <dc:date>2015-06-29T18:44:15Z</dc:date>
    </item>
  </channel>
</rss>

