<?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: Reshape data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584261#M166362</link>
    <description>Hi KurtBremser&lt;BR /&gt;Thanks for the replay&lt;BR /&gt;i think it will work thanks very much for the help&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;Rohit</description>
    <pubDate>Tue, 27 Aug 2019 14:43:42 GMT</pubDate>
    <dc:creator>rohitkrishna</dc:creator>
    <dc:date>2019-08-27T14:43:42Z</dc:date>
    <item>
      <title>Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584184#M166320</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have data issue while making reshape of the below data, kindly someone help me out for this scenario&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;data _nu;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;infile datalines;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;input num1&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;datalines;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;1 2 3 4 5 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;my expecting results should be&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;num1&lt;/P&gt;&lt;P&gt;&amp;nbsp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;2&lt;/P&gt;&lt;P&gt;&amp;nbsp;3&lt;/P&gt;&lt;P&gt;&amp;nbsp;4&lt;/P&gt;&lt;P&gt;&amp;nbsp;5&lt;/P&gt;&lt;P&gt;I want to reshape horizontal to vertical&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Rohit&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;</description>
      <pubDate>Tue, 27 Aug 2019 11:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584184#M166320</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T11:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584187#M166321</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wide;
input num1-num5;
datalines;
1 2 3 4 5
;

proc transpose data=wide out=long(rename=COL1=num drop=_NAME_);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2019 11:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584187#M166321</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-27T11:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584188#M166322</link>
      <description>&lt;P&gt;Please supply a WORKING step with datalines.&lt;/P&gt;
&lt;P&gt;Is num1 thought to be a string with all the digits, or do you rather have 5 numerical values in one observation?&lt;/P&gt;
&lt;P&gt;Or do you want to read a text file that has all the numbers on one line?&lt;/P&gt;
&lt;P&gt;That would be very easy with a "double hold":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _nu;
infile datalines;
input num1 @@;
datalines;
1 2 3 4 5
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2019 11:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584188#M166322</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-27T11:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584194#M166325</link>
      <description>&lt;P&gt;Adding some fun&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _nu;
infile datalines;
array num(5);
input num(*);
do _n_= 1 to 5;
 numbers=num(_n_);
 output;
end;
keep numbers;
datalines;
1 2 3 4 5 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2019 12:01:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584194#M166325</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-27T12:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584202#M166327</link>
      <description>HI KurtBremser, novinosrin&lt;BR /&gt;Thanks for the quick replay&lt;BR /&gt;I just asked for example how it works for reshaping horizontal to vertical for my existing SAS code so kindly share the solution for real sas code&lt;BR /&gt;{&lt;BR /&gt;data _null_;&lt;BR /&gt;infile ssassdt missover;&lt;BR /&gt;INPUT &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/153152"&gt;@17&lt;/a&gt; Inamlin1 $Char28.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/227252"&gt;@45&lt;/a&gt; Inamlin2 $Char28.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/201745"&gt;@79&lt;/a&gt; Idtype $Char7. @@;&lt;BR /&gt;&lt;BR /&gt;PUT &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/153152"&gt;@17&lt;/a&gt; Inamlin1 $Char28.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/227252"&gt;@45&lt;/a&gt; Inamlin2 $Char28.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/201745"&gt;@79&lt;/a&gt; Idtype $Char7. ;&lt;BR /&gt;return;}&lt;BR /&gt;but it going in loop while removing the missover&lt;BR /&gt;if missover is there it throughs error code 8.&lt;BR /&gt;kindly give some suggestion for this problem&lt;BR /&gt;Thanks &amp;amp; regards;&lt;BR /&gt;rohit&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Aug 2019 12:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584202#M166327</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T12:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584208#M166329</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259823"&gt;@rohitkrishna&lt;/a&gt;&amp;nbsp; &amp;nbsp;Can you post a sample of the data you have and your expected output that you want plz?&amp;nbsp; Makes it easier to code it for you&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584208#M166329</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-27T13:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584211#M166331</link>
      <description>Hi novinosrin&lt;BR /&gt;Thanks for the response&lt;BR /&gt;please find below mention data&lt;BR /&gt;{&lt;BR /&gt;R M********N T**B&lt;BR /&gt;D N******E T**B&lt;BR /&gt;L H**********N T**B&lt;BR /&gt;R S***********N T**B&lt;BR /&gt;K *******L T**B&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;rohit</description>
      <pubDate>Tue, 27 Aug 2019 13:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584211#M166331</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T13:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584212#M166332</link>
      <description>&lt;P&gt;Okay and what is the output you want from that?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584212#M166332</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-27T13:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584214#M166333</link>
      <description>Ya novinosrin,&lt;BR /&gt;i want the rec into vertical&lt;BR /&gt;like&lt;BR /&gt;R M********N&lt;BR /&gt;T**B&lt;BR /&gt;like above one after another&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584214#M166333</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T13:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584216#M166334</link>
      <description>&lt;P&gt;So you have three strings in one input line, and you want the third string to go into a new observation?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259823"&gt;@rohitkrishna&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi novinosrin&lt;BR /&gt;Thanks for the response&lt;BR /&gt;please find below mention data&lt;BR /&gt;{&lt;BR /&gt;R M********N T**B&lt;BR /&gt;D N******E T**B&lt;BR /&gt;L H**********N T**B&lt;BR /&gt;R S***********N T**B&lt;BR /&gt;K *******L T**B&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584216#M166334</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-27T13:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584217#M166335</link>
      <description>Hi KurtBremser,&lt;BR /&gt;ya i have three fields in one line and i want it to be one after the other like Horizontal to vertical&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;Rohit</description>
      <pubDate>Tue, 27 Aug 2019 13:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584217#M166335</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T13:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584220#M166336</link>
      <description>&lt;P&gt;But your previous post showed two strings in the first observation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259823"&gt;@rohitkrishna&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Ya novinosrin,&lt;BR /&gt;i want the rec into vertical&lt;BR /&gt;like&lt;BR /&gt;R M********N&lt;BR /&gt;T**B&lt;BR /&gt;like above one after another&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;rohit&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584220#M166336</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-27T13:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584227#M166342</link>
      <description>Hi&lt;BR /&gt;try to provide some solution for the above issue&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;Rohit</description>
      <pubDate>Tue, 27 Aug 2019 13:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584227#M166342</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T13:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584228#M166343</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259823"&gt;@rohitkrishna&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi&lt;BR /&gt;try to provide some solution for the above issue&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;Rohit&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since your rule does not match your expected output, I can't do that.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584228#M166343</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-27T13:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584234#M166348</link>
      <description>Hi KurtBremser,&lt;BR /&gt;ya sorry for the trouble i will explain in a simpley way&lt;BR /&gt;please find below the code&lt;BR /&gt;{&lt;BR /&gt;data _null_;&lt;BR /&gt;infile insfdt missover;&lt;BR /&gt;put @1 name $char26.&lt;BR /&gt;@28 sex $char1.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/75109"&gt;@30&lt;/a&gt; surname @char28. @;&lt;BR /&gt;return;&lt;BR /&gt;put @1 name $char26.&lt;BR /&gt;@28 sex $char1.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/75109"&gt;@30&lt;/a&gt; surname @char28.;&lt;BR /&gt;run;&lt;BR /&gt;and the output looks&lt;BR /&gt;("carline f karei") that is the output in a single line&lt;BR /&gt;but my req is&lt;BR /&gt;{ carline&lt;BR /&gt;f&lt;BR /&gt;karei}&lt;BR /&gt;like above one&lt;BR /&gt;Thanks &amp;amp; regards&lt;BR /&gt;Rohit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584234#M166348</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T13:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584237#M166351</link>
      <description>&lt;P&gt;Easy with a character array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
array vars {*} _character_;
length var $30; /* make sufficient */
do i = 1 to dim(vars);
  var = vars{i};
  output;
end;
keep var;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2019 13:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584237#M166351</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-27T13:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584261#M166362</link>
      <description>Hi KurtBremser&lt;BR /&gt;Thanks for the replay&lt;BR /&gt;i think it will work thanks very much for the help&lt;BR /&gt;thanks &amp;amp; regards&lt;BR /&gt;Rohit</description>
      <pubDate>Tue, 27 Aug 2019 14:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584261#M166362</guid>
      <dc:creator>rohitkrishna</dc:creator>
      <dc:date>2019-08-27T14:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reshape data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584282#M166374</link>
      <description>Please mark the relevant answer as the solution.</description>
      <pubDate>Tue, 27 Aug 2019 15:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reshape-data/m-p/584282#M166374</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-27T15:58:31Z</dc:date>
    </item>
  </channel>
</rss>

