<?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: How do I accomplish a dynamic &amp;quot;transpose&amp;quot; with multiple variables? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414716#M101626</link>
    <description>&lt;P&gt;Actually, the macro that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;mentioned does do what you want. If no ID is mentioned, it automatically creates one. I ran the following:&lt;/P&gt;
&lt;PRE&gt;%transpose(data=have, out=want, by=strUniqID, delimiter=_,
 var=intNonUniqID strAddress dteAppDate intAppNum)
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
    <pubDate>Sun, 19 Nov 2017 22:15:55 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-11-19T22:15:55Z</dc:date>
    <item>
      <title>How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414692#M101617</link>
      <description>&lt;P&gt;I put the word transpose in quotes in the title because I'm not totally sure that that is the 100% correct term for what I'm trying to accomplish.&amp;nbsp; Most of the (large number) of results for my searches on the subject are performing the transpose in such a way that part of the data becomes the output dataset header, which is not my goal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially, what I want to achieve is to take the input dataset :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="395"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="57"&gt;&lt;STRONG&gt;strUniqID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="89"&gt;&lt;STRONG&gt;intNonUniqID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="84"&gt;&lt;STRONG&gt;strAddress&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="84"&gt;&lt;STRONG&gt;dteAppDate&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="81"&gt;&lt;STRONG&gt;intAppNum&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A12345&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;123 45th St&lt;/TD&gt;
&lt;TD&gt;1/2/1970&lt;/TD&gt;
&lt;TD&gt;47&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A12345&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;234 56th St&lt;/TD&gt;
&lt;TD&gt;3/4/1978&lt;/TD&gt;
&lt;TD&gt;39&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;B12345&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;345 67th St&lt;/TD&gt;
&lt;TD&gt;8/6/1982&lt;/TD&gt;
&lt;TD&gt;35&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;B12345&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;456 78th St&lt;/TD&gt;
&lt;TD&gt;12/31/1994&lt;/TD&gt;
&lt;TD&gt;22&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and manipulate it so that the output looks like :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="733"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="57"&gt;&lt;STRONG&gt;strUniqID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="89"&gt;&lt;STRONG&gt;intNonUniqID_1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="84"&gt;&lt;STRONG&gt;strAddress_1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="84"&gt;&lt;STRONG&gt;dteAppDate_1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="81"&gt;&lt;STRONG&gt;intAppNum_1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="89"&gt;&lt;STRONG&gt;intNonUniqID_2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="84"&gt;&lt;STRONG&gt;strAddress_2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="84"&gt;&lt;STRONG&gt;dteAppDate_2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="81"&gt;&lt;STRONG&gt;intAppNum_2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A12345&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;123 45th St&lt;/TD&gt;
&lt;TD&gt;1/2/1970&lt;/TD&gt;
&lt;TD&gt;47&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;234 56th St&lt;/TD&gt;
&lt;TD&gt;3/4/1978&lt;/TD&gt;
&lt;TD&gt;39&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;B12345&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;345 67th St&lt;/TD&gt;
&lt;TD&gt;8/6/1982&lt;/TD&gt;
&lt;TD&gt;35&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;456 78th St&lt;/TD&gt;
&lt;TD&gt;12/31/1994&lt;/TD&gt;
&lt;TD&gt;22&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know if proc transpose can accomplish this and all of the macro examples I've seen out there don't quite fit what I'm trying to do.&amp;nbsp; Any input would be MOST appreciated!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!!&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 20:09:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414692#M101617</guid>
      <dc:creator>H4xc1ty</dc:creator>
      <dc:date>2017-11-19T20:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414700#M101621</link>
      <description>&lt;P&gt;I don't think you can do this in a single PROC TRANSPOSE, you can do multiple and merge the results together.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example 2 here using PROC TRANSPOSE:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example 2 here using DATA STEP + ARRAY:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/reshaping-data-long-to-wide-using-the-data-step/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/modules/reshaping-data-long-to-wide-using-the-data-step/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you can use a user written macro here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/A_Better_Way_to_Flip_(Transpose)_a_SAS_Dataset" target="_blank"&gt;http://www.sascommunity.org/wiki/A_Better_Way_to_Flip_(Transpose)_a_SAS_Dataset&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 20:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414700#M101621</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-19T20:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414702#M101622</link>
      <description>&lt;P&gt;See, those links are exactly what I was talking about when I was saying that all of my searches weren't demonstrating what I wanted to do.&amp;nbsp; All of those links, which incidentally, I'd already reviewed, transpose the data such that one of the variables from the original dataset ends up as part of the output dataset header.&amp;nbsp; I don't want that at all.&amp;nbsp; I want to keep the original header test and just append the iteration number.&amp;nbsp; For instance, if my headers were ID,A,B,C,D,etc... I'd be looking to have that become ID,A_1,B_1,C_1,D_1,A_2,B_2,C_2,D_2,etc...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I am not being too clear, I apologize.&amp;nbsp; I am choosing my words as best I can.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 20:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414702#M101622</guid>
      <dc:creator>H4xc1ty</dc:creator>
      <dc:date>2017-11-19T20:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414704#M101623</link>
      <description>&lt;P&gt;You can have two variables in your ID statement, in your case,&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="395"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="57"&gt;&lt;STRONG&gt;strUniqID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="89"&gt;&lt;STRONG&gt;intNonUniqID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If these are not working for you, pick an approach you'd like to go with, post what you've tried and we can help from there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend the macro approach, but if not, then PROC TRANSPOSE and then the DATA STEP. &amp;nbsp;Those are the options from most dynamic to least dynamic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 20:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414704#M101623</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-19T20:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414705#M101624</link>
      <description>&lt;P&gt;After another review, that wouldn't work. You need to first add another variable so that the data will line up properly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're looking to add an enumeration variable, which I initially thought could be&amp;nbsp;&lt;STRONG&gt;intNonUniqID&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variable would be 1, 2, 1, 2 for your sample data. It allows the variables to line up, so Address1 is always under the same variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/faq/how-can-i-create-an-enumeration-variable-by-groups/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data count_var;
set have;

by strUniqID;

if first.strUniqID then count=0;
count+1;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can use the approaches illustrated in my first post.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 20:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414705#M101624</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-19T20:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414710#M101625</link>
      <description>&lt;P&gt;While the examples in&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s links may not be an exact match, they should be easily adaptable.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc transpose data=have out=wide1 (drop=_name_) prefix=intNonUniqID_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;var intNonUniqID;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;by strUniqID;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc transpose data=have out=wide2 (drop=_name_) prefix=strAddress_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;var strAddress;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;by strUniqID;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc transpose data=have out=wide3 (drop=_name_) prefix=dteAppDate_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;var dteAppDate;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;by strUniqID;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc transpose data=have out=wide4 (drop=_name_) prefix=intAppNum_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;var intAppNum;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;by strUniqID;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;* retain ;&lt;/P&gt;
&lt;P&gt;merge wide1 wide2 wide3 wide4;&lt;/P&gt;
&lt;P&gt;by strUniqID;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may need to fill out the RETAIN statement, if you want to control the order of the variables.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 21:42:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414710#M101625</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-19T21:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414716#M101626</link>
      <description>&lt;P&gt;Actually, the macro that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;mentioned does do what you want. If no ID is mentioned, it automatically creates one. I ran the following:&lt;/P&gt;
&lt;PRE&gt;%transpose(data=have, out=want, by=strUniqID, delimiter=_,
 var=intNonUniqID strAddress dteAppDate intAppNum)
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 22:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414716#M101626</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-11-19T22:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414720#M101628</link>
      <description>&lt;P&gt;I wish that were the case, but doing that breaks for me. As I mentioned earlier, I've seen that macro before and have been playing with it to get it to do what I want. Thus far though, no joy. Thanks for chiming in though.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 22:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414720#M101628</guid>
      <dc:creator>H4xc1ty</dc:creator>
      <dc:date>2017-11-19T22:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414722#M101629</link>
      <description>&lt;P&gt;What do you mean by "breaks"? I ran the following:&lt;/P&gt;
&lt;PRE&gt;data have;
  infile cards dlm='09'x;
  format dteAppDate mmddyy10.;
  input strUniqID $	intNonUniqID	strAddress $	dteAppDate mmddyy10.	intAppNum;
  cards;
A12345	1	123 45th St	1/2/1970	47
A12345	2	234 56th St	3/4/1978	39
B12345	3	345 67th St	8/6/1982	35
B12345	4	456 78th St	12/31/1994	22
;
&lt;/PRE&gt;
&lt;P&gt;then I ran the transpose macro (that I downloaded). Then I ran:&lt;/P&gt;
&lt;PRE&gt;%transpose(data=have, out=want, by=strUniqID, delimiter=_,
 var=intNonUniqID strAddress dteAppDate intAppNum);
 
&lt;/PRE&gt;
&lt;P&gt;A snapshot of my results follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Output of resulting file" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/16731i1318C06979EEE28E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Output of resulting file" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Output of resulting file&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 22:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414722#M101629</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-11-19T22:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414727#M101631</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/49501"&gt;@H4xc1ty&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I wish that were the case, but doing that breaks for me. As I mentioned earlier, I've seen that macro before and have been playing with it to get it to do what I want. Thus far though, no joy. Thanks for chiming in though.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Given what you've presented, the approaches outlined should work. This isn't me (or anyone else here) trying to be difficult, it means that from reading your question, data and answering hundreds if not thousands of these types of questions, there's nothing that explicitly differentiates your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is a special case, you need to show us what you've done so far and why it doesn't work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Saying something doesn't work or 'no joy' isn't informative.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: I tested&amp;nbsp;it using &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;sample data&amp;nbsp;and the multiple PROC TRANSPOSE method works as designed after the addition of the count variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 00:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414727#M101631</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-20T00:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414774#M101657</link>
      <description>&lt;P&gt;It comes back to the same old, same old:&lt;/P&gt;
&lt;P&gt;POST YOUR DATA IN A DATA STEP!&lt;/P&gt;
&lt;P&gt;That way everybody here can test their code with EXACTLY the data you have. Without that, it's often guesswork, and you and the other posters are not talking about the same thing.&lt;/P&gt;
&lt;P&gt;So please put &lt;EM&gt;some&lt;/EM&gt; effort into it and post your data in the correct form; if you have trouble, use the macro from&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; to convert your dataset to a data step.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 08:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414774#M101657</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-20T08:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414825#M101674</link>
      <description>&lt;P&gt;Check the MERGE skill proposed by me,Arthur.T,Matt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings15/2785-2015.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings15/2785-2015.pdf&lt;/A&gt;&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;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile cards expandtabs truncover;
 
  input strUniqID $	intNonUniqID	strAddress &amp;amp; $20.	dteAppDate : mmddyy10.	intAppNum;
format dteAppDate  mmddyy10.;
cards;
A12345	1	123 45th St	 1/2/1970	47
A12345	2	234 56th St	 3/4/1978	39
B12345	3	345 67th St	 8/6/1982	35
B12345	4	456 78th St	 12/31/1994	22
;

data have;
 set have;
 by strUniqID;
 if first.strUniqID then n=0;
 n+1;
run;

proc sql noprint;
select distinct catt('have(where=(n=',n,') 
 rename=(intNonUniqID=intNonUniqID_',n,'
        strAddress=strAddress_',n,'
        dteAppDate=dteAppDate_',n,'
        intAppNum=intAppNum_',n,'))')  into : list separated by ' '
 from have;
 quit;

 %put list ;

 data want; 
  merge &amp;amp;list ;
  by strUniqID;
  drop n;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Nov 2017 13:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414825#M101674</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-11-20T13:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414851#M101679</link>
      <description>YES!!!  This is exactly what I need!!! Thanks so much!  Also, I offer my apologies to everyone if I wasn't being clear or providing enough information.  It was not my intention to be vague.  I appreciate all of the responses greatly!</description>
      <pubDate>Mon, 20 Nov 2017 14:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414851#M101679</guid>
      <dc:creator>H4xc1ty</dc:creator>
      <dc:date>2017-11-20T14:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I accomplish a dynamic "transpose" with multiple variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414902#M101695</link>
      <description>&lt;P&gt;Unless I'm missing something, the approach that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;recommended produces the same result as the approach I suggested, but requires a lot more code and takes 14 times longer to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you "sure" it is producing what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 17:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-accomplish-a-dynamic-quot-transpose-quot-with-multiple/m-p/414902#M101695</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-11-20T17:25:55Z</dc:date>
    </item>
  </channel>
</rss>

