<?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: SAS data set combine in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363055#M85861</link>
    <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;The column name 201701 becasue previous step PROC Tranpose ID Month.&lt;/P&gt;&lt;P&gt;I shoudl rename Month ?&lt;/P&gt;&lt;P&gt;But it will have 12 month data .....&lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2017 13:22:07 GMT</pubDate>
    <dc:creator>JHE</dc:creator>
    <dc:date>2017-05-31T13:22:07Z</dc:date>
    <item>
      <title>SAS data set combine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363049#M85858</link>
      <description>&lt;P&gt;I have two tabes need to combine, for monthly payment , see atatch file format as refernce.&lt;/P&gt;&lt;P&gt;Table1 columns:&lt;/P&gt;&lt;P&gt;LOB , Code, Code_Desc, Original_Payment, Current_Payment, 201701&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table2 &amp;nbsp;columns:&lt;/P&gt;&lt;P&gt;LOB , Code, Code_Desc, Original_Payment, Current_Payment, 201702&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need final combined table as :&lt;/P&gt;&lt;P&gt;LOB , Code, Code_Desc, Original_Payment,Original_Payment, Current_Payment, 201701,Original_Payment, Current_Payment, 201702&lt;/P&gt;&lt;P&gt;and so on ... for 12 month each year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which SAS PROC or method would be use to solve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363049#M85858</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-31T13:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data set combine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363051#M85859</link>
      <description>&lt;P&gt;First, post test data in the form of a datastep. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seoncd, your limited required output is not enough, variables cannot be called 201701, its invalid, and you can't have multiples of the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, what you want is either a) two transposes - i.e. one for original payment, one for current payment, then merge the tow together, or b) use arrays.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363051#M85859</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-31T13:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data set combine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363055#M85861</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;The column name 201701 becasue previous step PROC Tranpose ID Month.&lt;/P&gt;&lt;P&gt;I shoudl rename Month ?&lt;/P&gt;&lt;P&gt;But it will have 12 month data .....&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363055#M85861</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-31T13:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data set combine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363059#M85864</link>
      <description>&lt;P&gt;I would suggest using the PREFIX option within PROC TRANSPOSE to add a prefix so the variable becomes&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Y201701 instead of _201701&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use IDLABEL if you want. Create another variable that has the date as January 2017 and then assign that to the IDLABEL.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363059#M85864</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-31T13:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data set combine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363066#M85866</link>
      <description>&lt;P&gt;Data Set:&lt;/P&gt;&lt;P&gt;LOB, Category, Code, Code_Desc, Original_Payable, Current _Payable, Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Month&lt;/P&gt;&lt;P&gt;201701,&lt;/P&gt;&lt;P&gt;201702,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to ranspose&lt;/P&gt;&lt;P&gt;ID monht.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would not working, error message. have to create data set by month then merge or combine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363066#M85866</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-31T13:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data set combine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363068#M85868</link>
      <description>&lt;P&gt;Absolutely, prefix the columns name.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 13:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363068#M85868</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-31T13:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS data set combine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363086#M85881</link>
      <description>&lt;P&gt;What is not working? &amp;nbsp;You should be able to do:&lt;/P&gt;
&lt;PRE&gt;proc sort data=have;
  by lob category code code_desc month;
run;

proc transpose data=have out=original prefix=o;
  by lob category code code_desc;
  var original_payable;
  id month;
run;
proc transpose data=have out=current prefix=c;
  by lob category code code_desc;
  var current_payable;
  id month;
run;

data want;
  merge original current;
  by lob category code code_desc;
run;&lt;/PRE&gt;
&lt;P&gt;Although I would really advise against using data in the column names. &amp;nbsp;I would use idlabel and put the year/month information in the label, then call your variables origX, and currX, X being incremental, that way you can refer to them using shorthand such as:&lt;/P&gt;
&lt;P&gt;max(of orig:)&lt;/P&gt;
&lt;P&gt;Or by arrays.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 14:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-data-set-combine/m-p/363086#M85881</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-31T14:19:03Z</dc:date>
    </item>
  </channel>
</rss>

