<?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: while running the below code the output data in combined am getting is . in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848604#M37072</link>
    <description>&lt;P&gt;Many people here in this forum have lots of experience, they can suggest the best path forward. Often beginners start marching down the wrong path, a path that is difficult and inefficient, and they insist on going down that path. That's what you are doing, going down a difficult and inefficient path The experienced people will try to guide you to a better path, that's what I am trying to do.&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/430763"&gt;@animesh123&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;SPAN&gt;I am not gonna use this anywhere for now maybe at some point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I said earlier am just learning&lt;/SPAN&gt;&lt;BR /&gt;But surely please let me know if we can resolve in a easier way&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But since you refuse to explain what the purpose of doing this data manipulation is, we don't know what the better path is. And so you have gone down this difficult and inefficient path part of the way ... and we can't help you. You have learned to do things that are not recommended, difficult and inefficient.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2022 18:41:01 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-12-08T18:41:01Z</dc:date>
    <item>
      <title>while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848582#M37062</link>
      <description>&lt;P&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;SPAN&g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X(','&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;, OF NAME);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 17:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848582#M37062</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2022-12-08T17:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848586#M37063</link>
      <description>&lt;P&gt;The answer is simple, but before I give you the answer, I would like to point out that converting this type of long data set into a wide character string with commas separating the values almost always makes subsequent processing of this data more difficult. In my opinion, doing this is a bad idea, and I request that you tell us what the big picture is ... what are you going to do next after you have data set WIDE? Please let us know, because just about any subsequent processing will be easier on the long data set WANTA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, for simple debugging, please read the log. It is clearly telling you that the variable named NAME does not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fix to your problem is to add a colon, which then uses all variables whose name begins with the four letters NAME&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;COMBINED= CATX(',' , OF NAME:);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 17:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848586#M37063</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-08T17:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848593#M37066</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I am trying to do here is below is my input data&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;HAVE&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;INPUT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ID NAME$;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;DATALINES;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;1 Animesh&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;1 Mardi&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;1 abc&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;And the ouput data I required is :&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;1 Animesh Mardi ABC&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 18:06:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848593#M37066</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2022-12-08T18:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848595#M37067</link>
      <description>&lt;P&gt;No, that doesn't answer the question. I want to know what you are going to do with this data once you create it. What is the next step? A report, a table, more SAS code, what? I ask because whatever it is you are trying to do NEXT could probably be done much more easily with the original data set WANTA.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 18:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848595#M37067</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-08T18:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848600#M37070</link>
      <description>I am not gonna use this anywhere  for now maybe at some point. &lt;BR /&gt;As I said earlier am just  learning . I came across this question and just wanna see how to resolve it  &lt;BR /&gt;This is purely for my learning &lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; - Thank you very much for your support &lt;BR /&gt;</description>
      <pubDate>Thu, 08 Dec 2022 18:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848600#M37070</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2022-12-08T18:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848601#M37071</link>
      <description>But surely please let me know  if we can resolve in a easier way</description>
      <pubDate>Thu, 08 Dec 2022 18:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848601#M37071</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2022-12-08T18:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848604#M37072</link>
      <description>&lt;P&gt;Many people here in this forum have lots of experience, they can suggest the best path forward. Often beginners start marching down the wrong path, a path that is difficult and inefficient, and they insist on going down that path. That's what you are doing, going down a difficult and inefficient path The experienced people will try to guide you to a better path, that's what I am trying to do.&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/430763"&gt;@animesh123&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;SPAN&gt;I am not gonna use this anywhere for now maybe at some point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I said earlier am just learning&lt;/SPAN&gt;&lt;BR /&gt;But surely please let me know if we can resolve in a easier way&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But since you refuse to explain what the purpose of doing this data manipulation is, we don't know what the better path is. And so you have gone down this difficult and inefficient path part of the way ... and we can't help you. You have learned to do things that are not recommended, difficult and inefficient.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 18:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848604#M37072</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-08T18:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: while running the below code the output data in combined am getting is .</title>
      <link>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848618#M37073</link>
      <description>&lt;P&gt;You don't need to use PROC TRANSPOSE to do this as you can easily do it in a data step.&amp;nbsp; So if the intermediate dataset (the "wide" dataset) is not needed then don't bother to ever create it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input id name $;
datalines;
1 animesh
1 mardi
1 abc
;

data want;
  do until(last.id);
    set have;
    by id;
    length combined $100;
    combined=catx(' ',combined,name);
  end;
  keep id combined;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 19:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/while-running-the-below-code-the-output-data-in-combined-am/m-p/848618#M37073</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-08T19:25:40Z</dc:date>
    </item>
  </channel>
</rss>

