<?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 to transpose when more than obs present in data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-transpose-when-more-than-obs-present-in-data/m-p/345563#M79505</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input id fn $ v$ atm $5. +1 btm $5.;
datalines;
1 s v1 10:00 2:00
2 s v1 10:30 3:00
2 s v1 10:00 2:00
3 s v1 10:30 3:00
;

data temp;
set one;
obs + 1;
run;
    
proc transpose data=temp out=two(drop=obs);
  var atm btm;
  by id fn v obs;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Mar 2017 22:13:06 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2017-03-29T22:13:06Z</dc:date>
    <item>
      <title>How to transpose when more than obs present in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-transpose-when-more-than-obs-present-in-data/m-p/345561#M79503</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question. When I run the program, for the ID=2 subject: I am getting atm and btm values in col1 and col2. Is there any better way that I can use to get both values in col1 in one step. I am doing two additional datasteps to get the output I need. &amp;nbsp;Thank you. Please suggest&amp;nbsp;&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;data one;
input id fn $ v$ atm $5. +1 btm $5.;
datalines;
1 s v1 10:00 2:00
2 s v1 10:30 3:00
2 s v1 10:00 2:00
3 s v1 10:30 3:00
;
	proc transpose data=one out=two;
  var atm btm;
  by id fn v;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Mar 2017 22:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-transpose-when-more-than-obs-present-in-data/m-p/345561#M79503</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2017-03-29T22:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to transpose when more than obs present in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-transpose-when-more-than-obs-present-in-data/m-p/345562#M79504</link>
      <description>&lt;P&gt;Post exactly what you want the output to look like please.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 22:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-transpose-when-more-than-obs-present-in-data/m-p/345562#M79504</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-29T22:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to transpose when more than obs present in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-transpose-when-more-than-obs-present-in-data/m-p/345563#M79505</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input id fn $ v$ atm $5. +1 btm $5.;
datalines;
1 s v1 10:00 2:00
2 s v1 10:30 3:00
2 s v1 10:00 2:00
3 s v1 10:30 3:00
;

data temp;
set one;
obs + 1;
run;
    
proc transpose data=temp out=two(drop=obs);
  var atm btm;
  by id fn v obs;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Mar 2017 22:13:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-transpose-when-more-than-obs-present-in-data/m-p/345563#M79505</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-29T22:13:06Z</dc:date>
    </item>
  </channel>
</rss>

