<?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 Long to wide in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790637#M253159</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way to create "want" data set from "Have data set"?&lt;/P&gt;
&lt;P&gt;(Long to wide)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
input Key CustomerID seq;
cards;
111 2345677 1
111 4356674 2
111 3467886 3
444 4456567 1
444 8837737 2
222 5575775 1
;
Run;

Data want;
input key  CustomerID1 CustomerID2 CustomerID3;
cards;
111 2345677 4356674 3467886
444 4456567 8837737 .
222 5575775 . .
;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 Jan 2022 08:06:39 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2022-01-18T08:06:39Z</dc:date>
    <item>
      <title>Long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790637#M253159</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way to create "want" data set from "Have data set"?&lt;/P&gt;
&lt;P&gt;(Long to wide)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
input Key CustomerID seq;
cards;
111 2345677 1
111 4356674 2
111 3467886 3
444 4456567 1
444 8837737 2
222 5575775 1
;
Run;

Data want;
input key  CustomerID1 CustomerID2 CustomerID3;
cards;
111 2345677 4356674 3467886
444 4456567 8837737 .
222 5575775 . .
;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jan 2022 08:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790637#M253159</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-01-18T08:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790638#M253160</link>
      <description>&lt;P&gt;Ok, Ronin this is the nth time you ask for transposing data, so: what have you tried? What is the problem?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 08:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790638#M253160</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-01-18T08:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790645#M253163</link>
      <description>&lt;P&gt;PROC TRANSPOSE with PREFIX option and seq as ID. Unless you sort first, you'll need a NOTSORTED option in the BY.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 09:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790645#M253163</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-01-18T09:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790653#M253164</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Fill in the blanks:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC ____ data=____;by ___ ___; RUN;
PROC _________ data=____ out=_____(drop=______) prefix=__________;
   by ___;
   var __________;
   id ___;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#FFFFFF"&gt;PROC SORT data=have;by key seq; RUN;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FFFFFF"&gt;PROC TRANSPOSE data=have out=trans(drop=_name_) prefix=CustomerID;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FFFFFF"&gt;by key;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FFFFFF"&gt;var customerID;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FFFFFF"&gt;id seq;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FFFFFF"&gt;RUN;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 10:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790653#M253164</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2022-01-18T10:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790699#M253174</link>
      <description>&lt;P&gt;If you don't want to learn how to code use the Tasks, point and click, which guide you through the process.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/webeditorcdc/v_003/webeditorref/n0an4t2gh0zmb3n13i9afkc7xqao.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/webeditorcdc/v_003/webeditorref/n0an4t2gh0zmb3n13i9afkc7xqao.htm&lt;/A&gt;&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/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;What is the way to create "want" data set from "Have data set"?&lt;/P&gt;
&lt;P&gt;(Long to wide)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data have;
input Key CustomerID seq;
cards;
111 2345677 1
111 4356674 2
111 3467886 3
444 4456567 1
444 8837737 2
222 5575775 1
;
Run;

Data want;
input key  CustomerID1 CustomerID2 CustomerID3;
cards;
111 2345677 4356674 3467886
444 4456567 8837737 .
222 5575775 . .
;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 15:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790699#M253174</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-18T15:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Long to wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790700#M253175</link>
      <description>Here's a similar example for you :&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750610" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/label-variables-during-proc-transpose-long-to-wide/m-p/750610&lt;/A&gt;</description>
      <pubDate>Tue, 18 Jan 2022 15:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Long-to-wide/m-p/790700#M253175</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-18T15:58:38Z</dc:date>
    </item>
  </channel>
</rss>

