<?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: sas programming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665271#M198889</link>
    <description>&lt;P&gt;Providing example data in usable form (self-contained data step) is also a MUST if you want quick answers with a valid solution.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jun 2020 08:07:21 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-06-26T08:07:21Z</dc:date>
    <item>
      <title>sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665252#M198882</link>
      <description>&lt;P&gt;Hello guys,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have below data set in which i want the values of reason in one record by subject &amp;amp; Visit description.&lt;/P&gt;
&lt;DIV id="tinyMceEditorSoham0707_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorSoham0707_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorSoham0707_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;TABLE width="950"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50"&gt;Subject&lt;/TD&gt;
&lt;TD width="90"&gt;Visit_description&lt;/TD&gt;
&lt;TD width="72"&gt;Start_date&lt;/TD&gt;
&lt;TD width="70"&gt;End_date&lt;/TD&gt;
&lt;TD width="268"&gt;Reason&lt;/TD&gt;
&lt;TD width="400"&gt;Other_Reason&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 1&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD width="268"&gt;CONVULSIONS&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 1&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD width="268"&gt;DEHYDRATION&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 1&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD width="268"&gt;FEEDING DIFFICULTY&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 1&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD width="268"&gt;OTHER&lt;/TD&gt;
&lt;TD&gt;iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 2&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD width="268"&gt;IRREGULAR OR PERIODIC RESPIRATION&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 2&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD width="268"&gt;IRRITABILITY OR AGITATION&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;Assessment 2&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD width="268"&gt;LETHARGY OR EXCESSIVE SLEEPINESS&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output should be like below table&lt;/P&gt;
&lt;TABLE width="950"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50"&gt;Subject&amp;nbsp;&lt;/TD&gt;
&lt;TD width="90"&gt;Visit_description&lt;/TD&gt;
&lt;TD width="72"&gt;Start_date&lt;/TD&gt;
&lt;TD width="70"&gt;End_date&lt;/TD&gt;
&lt;TD width="268"&gt;Reason&lt;/TD&gt;
&lt;TD width="400"&gt;Other_Reason&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 1&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD&gt;6/26/2020&lt;/TD&gt;
&lt;TD width="268"&gt;CONVULSIONS,DEHYDRATION,FEEDING DIFFICULTY,OTHER&lt;/TD&gt;
&lt;TD&gt;iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Assessment 2&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD&gt;6/27/2020&lt;/TD&gt;
&lt;TD width="268"&gt;IRREGULAR OR PERIODIC RESPIRATION,IRRITABILITY OR AGITATION,LETHARGY OR EXCESSIVE SLEEPINESS&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 06:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665252#M198882</guid>
      <dc:creator>Soham0707</dc:creator>
      <dc:date>2020-06-26T06:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665255#M198884</link>
      <description>&lt;P&gt;Try next code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
 set have(rename=(reason = _reason));
  by Sunject Visit_desription;
     retain reason;
	 length reason $100; /* adapt to max neaded */
	 
	 if first.Visit_desription then reason = ' ';
	 reason = catx(',',reason,_reason);
	 if last.Visit_desription then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jun 2020 07:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665255#M198884</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-06-26T07:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665268#M198887</link>
      <description>not working &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jun 2020 08:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665268#M198887</guid>
      <dc:creator>Soham0707</dc:creator>
      <dc:date>2020-06-26T08:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665270#M198888</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/263698"&gt;@Soham0707&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;not working &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Very bad answer, totally unhelpful.&lt;/P&gt;
&lt;P&gt;Please describe in detail what "did not work".&lt;/P&gt;
&lt;P&gt;Did you get ERRORs or WARNINGs? Or did the code run, but not produce the expected output?&lt;/P&gt;
&lt;P&gt;In all cases, post the log, using the &amp;lt;/&amp;gt; button. Point out the difference between expected and actual result.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 08:04:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665270#M198888</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-26T08:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665271#M198889</link>
      <description>&lt;P&gt;Providing example data in usable form (self-contained data step) is also a MUST if you want quick answers with a valid solution.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 08:07:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665271#M198889</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-26T08:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665276#M198893</link>
      <description>Sorry for that..&lt;BR /&gt;This warning i got and output is not matching..&lt;BR /&gt;&lt;BR /&gt;WARNING: In a call to the CATX function, the buffer allocated for the result was not long enough to contain the concatenation of all the arguments. The correct result would contain 5 &lt;BR /&gt;         characters, but the actual result might either be truncated to 1 character(s) or be completely blank, depending on the calling environment. The following note indicates the &lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;      real time           0.00 seconds&lt;BR /&gt;      cpu time            0.00 seconds&lt;BR /&gt;      &lt;BR /&gt;         left-most argument that caused truncation.&lt;BR /&gt;NOTE: Argument 3 to function CATX(',','            '[12 of 50 characters shown],'OTHER       '[12 of 160 characters shown]) at line 30431 column 14 is invalid.</description>
      <pubDate>Fri, 26 Jun 2020 08:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665276#M198893</guid>
      <dc:creator>Soham0707</dc:creator>
      <dc:date>2020-06-26T08:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665282#M198895</link>
      <description>&lt;P&gt;By "post the log" I meant to post the&amp;nbsp;&lt;EM&gt;whole&lt;/EM&gt; log of your step, including the complete code of the step and all follow-up messages. And, as requested, you must (&lt;STRONG&gt;MUST&lt;/STRONG&gt;) use the &amp;lt;/&amp;gt; button to keep the formatting of the log. This is important, as the horizontal position of ERROR markers helps in identifying the cause of an ERROR, and this positioning is destroyed by the main posting window.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 08:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665282#M198895</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-26T08:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665285#M198896</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/263698"&gt;@Soham0707&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Sorry for that..&lt;BR /&gt;This warning i got and output is not matching..&lt;BR /&gt;&lt;BR /&gt;WARNING: In a call to the CATX function, the buffer allocated for the result was not long enough to contain the concatenation of all the arguments. The correct result would contain 5 &lt;BR /&gt;characters, but the actual result might either be truncated to 1 character(s) or be completely blank, depending on the calling environment. The following note indicates the &lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;BR /&gt;&lt;BR /&gt;left-most argument that caused truncation.&lt;BR /&gt;NOTE: Argument 3 to function CATX(',',' '[12 of 50 characters shown],'OTHER '[12 of 160 characters shown]) at line 30431 column 14 is invalid.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you check the posted code it written explicitley:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length reason $100; /* adapt to max needed */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I cannot know what is the maximum number of reasons will be concatenated.&lt;/P&gt;
&lt;P&gt;You can change the length to 1000 up to 32000 but better evaluate it or just increase until there will be no more such warnings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you need or prefer sorting the concatenated reasons or leave them in order as they arrived? Can there be a reason more then once per subject?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 09:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/665285#M198896</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-06-26T09:01:37Z</dc:date>
    </item>
  </channel>
</rss>

