<?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: What does &amp;quot;CAT&amp;quot; means? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70364#M20244</link>
    <description>Hi.&lt;BR /&gt;
cat() function is identical with ' || ' ,except that length of concatenated result is 200, and ' || ' has not this limit.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
    <pubDate>Thu, 17 Feb 2011 08:20:35 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-02-17T08:20:35Z</dc:date>
    <item>
      <title>What does "CAT" means?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70362#M20242</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I was wondering if someone could explain to me what "CAT" means in this code?&lt;BR /&gt;
Also what did the author tried to do?&lt;BR /&gt;
Thank you in advance&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
code:&lt;BR /&gt;
DATA kernel; LENGTH scorepattern $10 attpattern $&amp;amp;numatt.; SET kernel; &lt;BR /&gt;
	scorepattern = CAT(OF item scoreatt1-scoreatt&amp;amp;numatt.);&lt;BR /&gt;
	attpattern = CAT(OF scoreatt1-scoreatt&amp;amp;numatt.); &lt;BR /&gt;
RUN;</description>
      <pubDate>Tue, 08 Feb 2011 22:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70362#M20242</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-02-08T22:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: What does "CAT" means?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70363#M20243</link>
      <description>Hi:&lt;BR /&gt;
  The CAT function concatenates text strings or text variable values without removing leading or trailing blanks.&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002257060.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002257060.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
For more information on the use of the &amp;amp;MACVAR reference (in your code, &amp;amp;NUMATT), this paper provides a good introduction:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/056-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/056-28.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
Without knowing how &amp;amp;NUMATT is being created (%LET or CALL SYMPUT) or what the whole rest of the program is doing, it looks like &amp;amp;NUMATT is going to supply a value for the LENGTH and the other statements. For example, if &amp;amp;NUMATT is 4, then the compiler would receive this "resolved" code:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
DATA kernel; &lt;BR /&gt;
  LENGTH scorepattern $10 attpattern $4; &lt;BR /&gt;
  SET kernel; &lt;BR /&gt;
  scorepattern = CAT(OF item scoreatt1-scoreatt4);&lt;BR /&gt;
  attpattern = CAT(OF scoreatt1-scoreatt4); &lt;BR /&gt;
RUN; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
                             &lt;BR /&gt;
and if the macro variable &amp;amp;NUMATT had been assigned a value of 6, then this would be the "resolved" code that was sent to the compiler:&lt;BR /&gt;
[pre]&lt;BR /&gt;
DATA kernel; &lt;BR /&gt;
  LENGTH scorepattern $10 attpattern $6; &lt;BR /&gt;
  SET kernel; &lt;BR /&gt;
  scorepattern = CAT(OF item scoreatt1-scoreatt6);&lt;BR /&gt;
  attpattern = CAT(OF scoreatt1-scoreatt6); &lt;BR /&gt;
RUN; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                          &lt;BR /&gt;
You are dealing with the WORK.KERNEL data -- how does it get created?? If you do a PROC CONTENTS on WORK.KERNEL, how do the SCOREATT1-SCOREATTn variables get created??? How many numbered variables are there? Can the number of "SCOREATT" variables change and if so, based on what condition??&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 08 Feb 2011 23:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70363#M20243</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-02-08T23:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: What does "CAT" means?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70364#M20244</link>
      <description>Hi.&lt;BR /&gt;
cat() function is identical with ' || ' ,except that length of concatenated result is 200, and ' || ' has not this limit.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 17 Feb 2011 08:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70364#M20244</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-02-17T08:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: What does "CAT" means?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70365#M20245</link>
      <description>&amp;gt; cat() function is identical with ' || ' ,except that&lt;BR /&gt;
&amp;gt; length of concatenated result is 200, and ' || ' has&lt;BR /&gt;
&amp;gt; not this limit.&lt;BR /&gt;
&lt;BR /&gt;
RTM&lt;BR /&gt;
&lt;BR /&gt;
In a DATA step, if the CAT function returns a value to a variable that has &lt;B&gt;not previously been assigned a length&lt;/B&gt;, then that variable is given a length of 200 bytes. If the concatenation operator (||) returns a value to a variable that has not previously been assigned a length, then that variable is given a length that is the sum of the lengths of the values which are being concatenated.</description>
      <pubDate>Thu, 17 Feb 2011 12:57:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70365#M20245</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-02-17T12:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: What does "CAT" means?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70366#M20246</link>
      <description>Hi. data _null_;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
That is what I mean.But I forgetted to mention the 'length ' statement.&lt;BR /&gt;
Thanks for adding it.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards&lt;BR /&gt;
Ksharp.</description>
      <pubDate>Fri, 18 Feb 2011 06:22:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-does-quot-CAT-quot-means/m-p/70366#M20246</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-02-18T06:22:57Z</dc:date>
    </item>
  </channel>
</rss>

