<?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: Transpose and rename with conditions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759307#M239936</link>
    <description>&lt;P&gt;Thank you so much! This has been a learning experience for sure. It is the solution. Thank you again.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Aug 2021 12:45:18 GMT</pubDate>
    <dc:creator>Mscarboncopy</dc:creator>
    <dc:date>2021-08-04T12:45:18Z</dc:date>
    <item>
      <title>Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755702#M238523</link>
      <description>&lt;P&gt;I need to create 2 date variables depending on other variables. I will use variables M and P for the example. 1 is the value when they select M or P. If they select M1 they have to give date1 &amp;nbsp;and so on. They will never give 2 types of date so if they choose M1 date1 will only be for that. Choosing M1 will not allow them to choose P1 and so on.&lt;/P&gt;&lt;P&gt;Because each id can have more than 1 date coded and I need to transpose the file, I was renaming them first using if then statements then transposing and renaming the new 2 date variables on the merge. &amp;nbsp;What is the best way to do this? What am I missing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data I have looks like this:&lt;/P&gt;&lt;P&gt;ID date1 &amp;nbsp;date2&amp;nbsp; date3 date4 date5 date6 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;M1 M2 M3 M4 M5 M6 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;P1 P2 P3&amp;nbsp; &amp;nbsp;P4 &amp;nbsp;&amp;nbsp;P5 P6&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;date &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;date&amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp;date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;. &amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp; &amp;nbsp;. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; date&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp;&amp;nbsp;date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;ID 1 for example: since date 2 and 6 are linked to M2 and M6 they would be renamed Mdate2 Mdate6 &amp;nbsp;and since date4 is related to P4 it &amp;nbsp;would be rename Pdate4 so the transpose can assign them to the correct date variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to have this:&lt;/P&gt;&lt;P&gt;ID Mdate &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Pdate&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;Mdate2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Pdate4&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;Mdate6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; Mdate1&amp;nbsp; &amp;nbsp; &amp;nbsp; Pdate6&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; Mdate3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying if then statements to prepare for the transpose&lt;/P&gt;&lt;P&gt;if M1 = &lt;STRONG&gt;1&lt;/STRONG&gt; then Mdate1 = date1;&lt;/P&gt;&lt;P&gt;else if &amp;nbsp;&amp;nbsp;&amp;nbsp; M2&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;1&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; Mdate2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date2 ;&lt;/P&gt;&lt;P&gt;else if &amp;nbsp;&amp;nbsp;&amp;nbsp; M3&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;1&lt;/STRONG&gt; then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mdate3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date3 ;&lt;/P&gt;&lt;P&gt;else if &amp;nbsp;&amp;nbsp;&amp;nbsp; M4&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;1&lt;/STRONG&gt; then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mdate4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date4 ;&amp;nbsp; etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;else if P1 = &lt;STRONG&gt;1&lt;/STRONG&gt; then Pdate1 = date1;&lt;/P&gt;&lt;P&gt;else if &amp;nbsp;&amp;nbsp;&amp;nbsp; P2&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;1&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp; Pdate2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date2 ;&lt;/P&gt;&lt;P&gt;else if &amp;nbsp;&amp;nbsp;&amp;nbsp; P3&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;1&lt;/STRONG&gt; then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pdate3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date3 ;&lt;/P&gt;&lt;P&gt;else if &amp;nbsp;&amp;nbsp;&amp;nbsp; P4&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;1&lt;/STRONG&gt; then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pdate4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date4 ;&amp;nbsp; etc&lt;/P&gt;&lt;P&gt;This is not working&amp;nbsp;&lt;/P&gt;&lt;P&gt;but my next step would be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;transpose&lt;/STRONG&gt; data=Main&lt;/P&gt;&lt;P&gt;out=out1;&lt;/P&gt;&lt;P&gt;var Mdate1 – Mdate6;&lt;/P&gt;&lt;P&gt;by&amp;nbsp; id;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;transpose&lt;/STRONG&gt; data=Main&lt;/P&gt;&lt;P&gt;out=out2;&lt;/P&gt;&lt;P&gt;var Pdate1 – Pdate6;&lt;/P&gt;&lt;P&gt;by&amp;nbsp; id;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data want;&lt;/P&gt;&lt;P&gt;Merge&lt;/P&gt;&lt;P&gt;Out1 (Rename = (COL1 = Mdate) where=(not missing(Mdate)))&lt;/P&gt;&lt;P&gt;Out2(Rename = (COL1 =Pdate) where=(not missing(Pdate)));&lt;/P&gt;&lt;P&gt;By id;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;How can I do this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 16:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755702#M238523</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-07-21T16:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755737#M238540</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/210474"&gt;@Mscarboncopy&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can create the WANT dataset in a single DATA step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create sample data for demonstration */

data have(drop=j);
call streaminit(3141592);
ID=.;
array date[6];
array MP[2,6] M1-M6 P1-P6;
do ID=1 to 10;
  call missing(of date[*], of MP[*]);
  do j=1 to dim(date);
    if rand('bern',.5) then do;
      date[j]=rand('integer',20000,22400);
      MP[rand('table',.5),j]=1;
    end;
  end;
  output;
end;
format date: date9.;
run;

/* Write dates to variables Mdate and Pdate */

data want(keep=ID Mdate Pdate);
set have;
array d[0:6] date0-date6;
array M[6];
array P[6];
*if ~n(of d[*]) then output; /* optional */
do i=1 to 6;
  j=whichn(1, of M[*]);
  k=whichn(1, of P[*]);
  if j then do;
    Mdate=d[j];
    M[j]=.;
  end;
  if k then do;
    Pdate=d[k];
    P[k]=.;
  end;
  if n(Mdate,Pdate) then output;
  call missing(Mdate,Pdate);
end;
format Mdate Pdate date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The "optional" OUTPUT statement would write an observation with missing &lt;FONT face="courier new,courier"&gt;Mdate&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;Pdate&lt;/FONT&gt; for an ID with only missing dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 20:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755737#M238540</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-07-21T20:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755922#M238591</link>
      <description>&lt;P&gt;Using Freelance's dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have(drop=j);
call streaminit(3141592);
ID=.;
array date[6];
array MP[2,6] M1-M6 P1-P6;
do ID=1 to 10;
  call missing(of date[*], of MP[*]);
  do j=1 to dim(date);
    if rand('bern',.5) then do;
      date[j]=rand('integer',20000,22400);
      MP[rand('table',.5),j]=1;
    end;
  end;
  output;
end;
format date: date9.;
run;


proc transpose data=have out=temp;
by id;
var M: P:;
run;
data temp1;
 set temp(where=(col1 is not missing));
 length _id _name $ 40;
 _name=prxchange('s/(M|P)/\1date/i',1,_name_);
 _id=substr(_name,1,5);
run;
data want;
 merge temp1(where=(upcase(_id)='MDATE') rename=(_name=mdate))
       temp1(where=(upcase(_id)='PDATE') rename=(_name=pdate));
 by id;
 output;
 call missing(of _all_);
 drop _name_ _id col1;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Jul 2021 12:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755922#M238591</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-07-22T12:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755978#M238608</link>
      <description>&lt;P&gt;Thank you! This works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 16:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/755978#M238608</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-07-22T16:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759009#M239763</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp; I have an update (question) about this.&lt;/P&gt;&lt;P&gt;I realized that when I create the files if an ID has some missing dates Vars Mdate and Pdate (in the code below) are misplaced.&lt;/P&gt;&lt;P&gt;For example -&amp;nbsp; I am using only Pdate here for a random ID - date3 is missing and date12 is supposed to be 1/1/03. What can I do to prevent this? The code&amp;nbsp;you suggested works perfectly otherwise. No issues with Ids with all dates missing but the partially missing is the issue. It happens to all ids that have some dates missing. Thank you!&lt;/P&gt;&lt;P&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDATE&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;1-Jan-03&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;1-Jan-03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;date3 should be here and 3 should be missing&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 03 Aug 2021 12:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759009#M239763</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-08-03T12:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759021#M239769</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/210474"&gt;@Mscarboncopy&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you talking about inconsistencies between the date variables &lt;FONT face="courier new,courier"&gt;date1&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;date2&lt;/FONT&gt;, ... and the flag variables &lt;FONT face="courier new,courier"&gt;M1&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;M2&lt;/FONT&gt;, ..., &lt;FONT face="courier new,courier"&gt;P1&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;P2&lt;/FONT&gt;, ... in your real data? Or do you mean a different numbering, with gaps, of those variables (which would necessarily affect &lt;EM&gt;all&lt;/EM&gt; observations, not only &lt;EM&gt;some&lt;/EM&gt; IDs)? I mean we had lots of missing values in the date and flag variables of dataset HAVE and in the date variables (&lt;FONT face="courier new,courier"&gt;Mdate&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;Pdate&lt;/FONT&gt;) of dataset WANT, not causing any issues. Please show a single observation (ideally including only variables we had previously, i.e., &lt;FONT face="courier new,courier"&gt;ID&lt;/FONT&gt;,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;date1&lt;/FONT&gt;, ...,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;date&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/FONT&gt;,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;M1&lt;/FONT&gt;, ...,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;M&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/FONT&gt;,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;P1&lt;/FONT&gt;, ..., &lt;FONT face="courier new,courier"&gt;P&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/FONT&gt;) for which you need a different result and what this result should look like in terms of &lt;FONT face="courier new,courier"&gt;ID&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;Mdate&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;Pdate&lt;/FONT&gt;. Then I'm sure we'll find a solution.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 13:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759021#M239769</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-08-03T13:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759028#M239776</link>
      <description>&lt;P&gt;Yes of course. Thank you for that reminder. The issue is when I merge my files.&lt;/P&gt;&lt;P&gt;So when I run the code to create the dates I get this for this one ID:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Pdate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1/2003&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/1/2003&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the condition VAR I am using an array and using the same timing variable past. As I used for the date past.&lt;/P&gt;&lt;P&gt;array _pas {*} pas: ;&lt;BR /&gt;do PSYcondPast=1 to dim(_pas);&lt;BR /&gt;if _pas{PSYcondPast}&amp;gt;0 then output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in this case my output for that ID is&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PSYcondPast&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Conditions 3 - 9 - 14 and 15&amp;nbsp; had no date - but I need them in the file. It is common in this data set to have conditions with no dates.&lt;/P&gt;&lt;P&gt;The 2 dates you see above&amp;nbsp; would have to go to keys 6 and 12 here. And I am not sure how. Thank you again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Aug 2021 13:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759028#M239776</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-08-03T13:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759058#M239797</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/210474"&gt;@Mscarboncopy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The issue is when I merge my files.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What files do you merge? Can you show a small example of these and the code you use for "merging" them? Unlike the outlined solution in your initial post, my solution did not include a merge step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/210474"&gt;@Mscarboncopy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;For the condition VAR I am using an array and using the same timing variable past. As I used for the date past.&lt;/P&gt;
&lt;P&gt;array _pas {*} pas: ;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Neither a "condition VAR" nor a "timing variable past" occurred anywhere so far. In fact, there were no variables whose names would match the pattern &lt;FONT face="courier new,courier"&gt;pas:&lt;/FONT&gt;.&amp;nbsp; So, it appears that there's more going on than what we had in the beginning. But this is no problem. As a start, please modify the data lines&amp;nbsp; ("&lt;FONT face="courier new,courier"&gt;1 2017/06/21 ...&lt;/FONT&gt;") in the DATA steps below so that datasets HAVE and WANT illustrate your issue with the current solution. Also feel free to add new variables to them and/or define additional input datasets (e.g., HAVE2, HAVE3, ...) in the same way which introduce the new variables (like &lt;FONT face="courier new,courier"&gt;VAR&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;pas&lt;/STRONG&gt;&lt;EM&gt;xy&lt;/EM&gt;&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;pas&lt;/STRONG&gt;&lt;EM&gt;yz&lt;/EM&gt;&lt;/FONT&gt;, etc.) you mentioned in your most recent post.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID (date1-date6)(:yymmdd.) M1-M6 P1-P6;
format date1-date6 yymmdd10.;
cards;
1 2017/06/21 2020/06/08 2019/08/05 2017/06/11 . . 1 1 . . . . . . 1 1 . .
;

data want;
input ID (Mdate Pdate)(:yymmdd.);
format Mdate Pdate yymmdd10.;
cards;
1 2017/06/21 2019/08/05
1 2020/06/08 2017/06/11
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 15:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759058#M239797</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-08-03T15:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759088#M239810</link>
      <description>&lt;P&gt;Here is my entire code:&lt;/P&gt;&lt;P&gt;Data ConDates (keep = ID&amp;nbsp; Dtepast Dte);&lt;BR /&gt;Set have;&lt;BR /&gt;array d[0:16] date0-date16;&lt;BR /&gt;array &lt;STRONG&gt;pas&lt;/STRONG&gt;[16];&lt;BR /&gt;array dur[16];&lt;BR /&gt;*if ~n(of d[*]) then output; /* optional */&lt;BR /&gt;do i=1 to 16;&lt;BR /&gt;j=whichn(1, of &lt;STRONG&gt;pas&lt;/STRONG&gt;[*]);&lt;BR /&gt;k=whichn(1, of dur[*]);&lt;BR /&gt;if j then do;&lt;BR /&gt;Dtepast=d[j];&lt;BR /&gt;&lt;STRONG&gt;pas&lt;/STRONG&gt;[j]=.;&lt;BR /&gt;end;&lt;BR /&gt;if k then do;&lt;BR /&gt;Dte=d[k];&lt;BR /&gt;dur[k]=.;&lt;BR /&gt;end;&lt;BR /&gt;if n(Dtepast, Dte) then output;&lt;BR /&gt;call missing(Dtepast,Dte);&lt;BR /&gt;end;&lt;BR /&gt;format Dtepast Dte mmddyy10.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am using the same data file have here and I am giving the example for only Past condition I do the same for present (dur). note how pas is the same used above, pas is a timing variable they answer so if the condition is in the past they select it and then give dates or leave dates blank:&lt;/P&gt;&lt;P&gt;&amp;nbsp;This is the file I create with the keys for the conditions;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data pastcondition (keep= ID condPast);&lt;BR /&gt;Set have;&lt;BR /&gt;array _&lt;STRONG&gt;pas&lt;/STRONG&gt; {*} &lt;STRONG&gt;pas&lt;/STRONG&gt;: ;&lt;BR /&gt;do condPast=1 to dim(_&lt;STRONG&gt;pas&lt;/STRONG&gt;);&lt;BR /&gt;if _&lt;STRONG&gt;pas&lt;/STRONG&gt;{condPast}&amp;gt;0 then output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*&amp;nbsp; merging the two (date file and condition file) after proc sorting both by Id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data all;&lt;BR /&gt;Merge&amp;nbsp;ConDates&amp;nbsp;pastcondition ;&lt;BR /&gt;by ID;&lt;BR /&gt;output;&lt;BR /&gt;call missing(of _all_);&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is when I get all the conditions and the 2 dates (example I gave) but the dates are not lining up with the condition they belong to, due to the missing dates.&lt;/P&gt;&lt;P&gt;Thank you for your patience.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 16:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759088#M239810</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-08-03T16:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759126#M239825</link>
      <description>&lt;P&gt;Thanks for the clarification. So, the issue is that some of the dates &lt;FONT face="courier new,courier"&gt;date1-date16&lt;/FONT&gt; are missing, yet they are of interest because non-missing flags (like &lt;FONT face="courier new,courier"&gt;pas1&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;pas2&lt;/FONT&gt;, ... or &lt;FONT face="courier new,courier"&gt;dur1&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;dur2&lt;/FONT&gt;, ...) "point" to them. Your current approach is:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;retrieve the dates from dataset HAVE&lt;/LI&gt;
&lt;LI&gt;retrieve the conditions (i.e., the indices &lt;FONT face="courier new,courier"&gt;i&lt;/FONT&gt; for which the flags&amp;nbsp;&lt;FONT face="courier new,courier"&gt;pas[i]&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;dur[i]&lt;/FONT&gt; are set) from dataset HAVE&lt;/LI&gt;
&lt;LI&gt;merge the results from steps 1 and 2.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;However, the missing dates hamper step 3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would rather integrate steps 1 and 2 into the previous solution so that step 3 is no longer needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me first provide sample data including missing dates with corresponding non-missing flags.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID (date1-date16)(:yymmdd.) pas1-pas16 dur1-dur16;
format date1-date16 yymmdd10.;
cards;
1 . . . 2003/01/01 2003/02/02 . . 2004/11/11 . . . 2005/05/05 . . . . . 1 . . 1 . 1 . . . . 1 . . . 1 . . . 1 . . . 1 . 1 . . . . 1 .
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Modification of my previous solution to accommodate the new missing dates (and using the new variable names and array dimensions)&lt;FONT face="helvetica"&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ConDates (keep = ID  Dtepast Dte j k rename=(j=condPast k=condPres));
set have;
array d[0:16] date0-date16;
array pas[16];
array dur[16];
do i=1 to 16;
  j=whichn(1, of pas[*]);
  k=whichn(1, of dur[*]);
  if j then do;
    Dtepast=d[j];
    pas[j]=.;
  end;
  else j=.;
  if k then do;
    Dte=d[k];
    dur[k]=.;
  end;
  else k=.;
  if j | k then output;
  call missing(Dtepast,Dte);
end;
format Dtepast Dte mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="helvetica"&gt;Note that the OUTPUT statement has a new IF condition, now relying on the flags being set rather than the dates not being missing.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="helvetica"&gt;Result:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;             cond    cond
Obs    ID    Past    Pres       Dtepast           Dte

 1      1      2       4              .    01/01/2003
 2      1      5       8     02/02/2003    11/11/2004
 3      1      7      10              .             .
 4      1     12      15     05/05/2005             .
 5      1     16       .              .             .&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="helvetica"&gt;Now we can see from the first observation of dataset ConDates that &lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face="helvetica"&gt;flag &lt;FONT face="courier new,courier"&gt;pas[2]&lt;/FONT&gt; was set, but&amp;nbsp;&lt;FONT face="courier new,courier"&gt;date[2]&lt;/FONT&gt; was missing -- one of the "new" missing dates&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face="helvetica"&gt;flag &lt;FONT face="courier new,courier"&gt;dur[4]&lt;/FONT&gt; was set and &lt;FONT face="courier new,courier"&gt;date[4]&lt;/FONT&gt; was &lt;FONT face="courier new,courier"&gt;01/01/2003&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;FONT face="helvetica"&gt;Observations 2, 3 and 4 have analogous interpretations. Observation 5 is special (and different from obs. 3) in that the missing value of &lt;FONT face="courier new,courier"&gt;Dte&lt;/FONT&gt;&amp;nbsp;does&amp;nbsp;&lt;EM&gt;not&lt;/EM&gt;&amp;nbsp;reflect some missing &lt;FONT face="courier new,courier"&gt;date[&lt;EM&gt;i&lt;/EM&gt;]&lt;/FONT&gt;, but the fact that only four &lt;FONT face="courier new,courier"&gt;dur&lt;/FONT&gt; flags were set for ID=1. We can see the difference in the &lt;FONT face="courier new,courier"&gt;cond...&lt;/FONT&gt; variables:&amp;nbsp;&lt;FONT face="courier new,courier"&gt;condPres&lt;/FONT&gt;&amp;nbsp;is missing, whereas&amp;nbsp;&lt;FONT face="courier new,courier"&gt;condPast=&lt;STRONG&gt;16&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;corresponds to &lt;FONT face="courier new,courier"&gt;pas[&lt;STRONG&gt;16&lt;/STRONG&gt;]=1&lt;/FONT&gt;, while &lt;FONT face="courier new,courier"&gt;date[16]&lt;/FONT&gt; happened to be missing, as shown by the missing value of variable &lt;FONT face="courier new,courier"&gt;Dtepast&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 19:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759126#M239825</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-08-03T19:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759130#M239829</link>
      <description>&lt;P&gt;I don't know how to interpret your desired output.&lt;/P&gt;
&lt;PRE&gt;ID Mdate         Pdate
1   Mdate2       Pdate4
1   Mdate6      .
2   Mdate1      Pdate6
2   Mdate3          .&lt;/PRE&gt;
&lt;P&gt;Why are the value MDATE2 and PDATE4 on the same observation?&amp;nbsp; How are they related?&lt;/P&gt;
&lt;P&gt;Wouldn't it make more sense to have:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID DateNo Mdate  Pdate
1    2   Mdate2    .
1    4      .    Pdate4
1    6   Mdate6    .
2    1   Mdate1    .
2    3   Mdate3    .
2    6     .     Pdate6
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Aug 2021 20:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759130#M239829</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-03T20:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759293#M239925</link>
      <description>&lt;P&gt;Yes, that is exactly how I need to have it.... But I actually have 2 variables instead of only one that you called DateNo. I have a Pastcondition and a presentcondition and they match the pastdate and the dte, respectively. The first time I asked about it, I was only thinking about the dates (which I called Pdate and Mdate) and then realized it was giving me issues when I was merging with the condition variables that I had to create. I will try what was suggested above as far as my code today and see. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 12:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759293#M239925</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-08-04T12:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759307#M239936</link>
      <description>&lt;P&gt;Thank you so much! This has been a learning experience for sure. It is the solution. Thank you again.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 12:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759307#M239936</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-08-04T12:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759322#M239947</link>
      <description>&lt;P&gt;Does the index into the array have any meaning?&amp;nbsp; Perhaps the first set of variables are related to a specific condition and the second set a different type of condition?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so then perhaps the PAST/PRESENT CONDITION values should be one of the numbers from 1 to N.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;do index=1 to dim(dates);
   if p[index] then do;
       pastcondition=index;
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If not then just make them have to same binary true/false values you have the arrays.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;do index=1 to dim(dates);
    pastcondition=p[index];
...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Aug 2021 13:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759322#M239947</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-04T13:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Transpose and rename with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759383#M239982</link>
      <description>&lt;P&gt;The conditions are the same, I just need 2 specific variables to make analysis easier, separating them into past and present. I used FreelanceReinhard's suggestion and it worked really well. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 16:16:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transpose-and-rename-with-conditions/m-p/759383#M239982</guid>
      <dc:creator>Mscarboncopy</dc:creator>
      <dc:date>2021-08-04T16:16:48Z</dc:date>
    </item>
  </channel>
</rss>

