<?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: Error: Variable CC has already been defined..CC is unknown or cannot be accessed in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218160#M53651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to accomplish by counting unique cc and put them in matrix form. I would like my result looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&amp;nbsp;&amp;nbsp; 177&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 125(100%)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25(20%)&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;177&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, how many have CC1 also have CC2..CC177 and individual percentage. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Apr 2015 13:32:49 GMT</pubDate>
    <dc:creator>KellyW1117</dc:creator>
    <dc:date>2015-04-10T13:32:49Z</dc:date>
    <item>
      <title>Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218155#M53646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data RESULT;&lt;/P&gt;&lt;P&gt;set ID_CC;&lt;/P&gt;&lt;P&gt;by ID;&lt;/P&gt;&lt;P&gt;retain CC1-CC177;&lt;/P&gt;&lt;P&gt;array CC(177) CC1-CC177;&lt;/P&gt;&lt;P&gt;array DD(177) $ DD1-DD177;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i=1 to 177;&lt;/P&gt;&lt;P&gt;&amp;nbsp; percent=CC(i)/CC(_n_);&lt;/P&gt;&lt;P&gt;&amp;nbsp; DD(i)=cats(CC(i),"(",put(percent, percent8.1),")");&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone let me know what's wrong with the code here? I keep getting messages like&lt;/P&gt;&lt;P&gt;ERROR 124-185: The variable CC has already been defined.&lt;/P&gt;&lt;P&gt;ERROR 68-185: The function CC is unknown, or cannot be accessed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 14:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218155#M53646</guid>
      <dc:creator>KellyW1117</dc:creator>
      <dc:date>2015-04-09T14:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218156#M53647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a variable named CC in your ID_CC dataset? Also make sure you have only 177 observations in your ID_CC dataset. &lt;/P&gt;&lt;P&gt;It's also easiest if you post the log from your code with the errors. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;data RESULT;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;set ID_CC;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;by ID;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;retain CC1-CC177;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;array CC_LIST(177) CC1-CC177;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;array DD_LIST(177) $ DD1-DD177;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;do i=1 to 177;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp; percent=CC_LIST(i)/CC_LIST(_n_);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp; DD(i)=cats(CC_LIST(i),"(",put(percent, percent8.1),")");&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;end;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 01:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218156#M53647</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-04-10T01:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218157#M53648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, I suggest to use curly brackets to adress individual array elements; this avoids the confusion with a possible function name.&lt;/P&gt;&lt;P&gt;Second, get a count of the observations in your dataset. Using _N_ as an array index is VERY dangerous.&lt;/P&gt;&lt;P&gt;Third, what in $DEITY's name do you want to achieve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also post the ouput of proc contents run on your ID_CC dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 05:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218157#M53648</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-04-10T05:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218158#M53649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the confusion. In my ID_CC dataset, I have two variables (ID and CC). The CC can be ranged from 1-177 but the observations are way more than 177 (approximately 80,000) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 13:25:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218158#M53649</guid>
      <dc:creator>KellyW1117</dc:creator>
      <dc:date>2015-04-10T13:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218159#M53650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;These are the exact codes I used. In this case, mhn is id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data RESULT_PRE;&lt;/P&gt;&lt;P&gt;set MEMBER_CC;&lt;/P&gt;&lt;P&gt;by mhn;&lt;/P&gt;&lt;P&gt;retain CC1-CC177;&lt;/P&gt;&lt;P&gt;array CC_LIST(177) CC1-CC177;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if first.mhn then do i=1 to 177;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CC_LIST(i)=0;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;CC_LIST(CC)=1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if last.mhn then output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data RESULT;&lt;/P&gt;&lt;P&gt;set RESULT_PRE;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;array CC_LIST(177) CC1-CC177;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;array HCC_LIST(177) $ HCC1-HCC177;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;do i=1 to 177;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; percent=CC_LIST(i)/CC_LIST(_n_); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; HCC_LIST(i)=cats(CC_LIST(i), "(", put(CC_LIST(i)/CC_LIST(_n_), percent8.1), ")");&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The log result is way too big, I'm attaching the key errors below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NOTE: Division by zero detected at line 22 column 22.&lt;/P&gt;&lt;P&gt;WARNING: Limit set by ERRORS= option reached.&amp;nbsp; Further errors of this type will not be printed.&lt;/P&gt;&lt;P&gt;ERROR: Array subscript out of range at line 22 column 23.&lt;/P&gt;&lt;P&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; missing values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Each place is given by: (Number of times) at (Line):(Column).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30798 at 22:22&amp;nbsp;&amp;nbsp; 30798 at 23:52&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 13:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218159#M53650</guid>
      <dc:creator>KellyW1117</dc:creator>
      <dc:date>2015-04-10T13:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218160#M53651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to accomplish by counting unique cc and put them in matrix form. I would like my result looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&amp;nbsp;&amp;nbsp; 177&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 125(100%)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25(20%)&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;177&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, how many have CC1 also have CC2..CC177 and individual percentage. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 13:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218160#M53651</guid>
      <dc:creator>KellyW1117</dc:creator>
      <dc:date>2015-04-10T13:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218161#M53652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, not totally clear on your logic, so hopefully this helps.&amp;nbsp; I would first categorise the data, i.e. so you know that an ID has the 1-2 match, then you can simple sum these and transpose the results, something like:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length id $2. cc 8;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id $ cc;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;a 1&lt;/P&gt;&lt;P&gt;a 2&lt;/P&gt;&lt;P&gt;a 3&lt;/P&gt;&lt;P&gt;b 1&lt;/P&gt;&lt;P&gt;b 2&lt;/P&gt;&lt;P&gt;c 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table INTER as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select&amp;nbsp; A.ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strip(put(A.CC,best.))||" to "||strip(put(B.CC,best.)) as RES&lt;/P&gt;&lt;P&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp; WORK.HAVE A&lt;/P&gt;&lt;P&gt;&amp;nbsp; left join WORK.HAVE B&lt;/P&gt;&lt;P&gt;&amp;nbsp; on&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A.ID=B.ID &lt;/P&gt;&lt;P&gt;&amp;nbsp; and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (B.CC = A.CC + 1 or (A.CC=1 and B.CC=1));&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table INTER2 as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select&amp;nbsp; RES,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(ID) as NUM&lt;/P&gt;&lt;P&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp; INTER&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by RES;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 14:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218161#M53652</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-04-10T14:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218162#M53653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This following code structure is invalid when the number of records exceeds the size of the array declared:&lt;/P&gt;&lt;P&gt;percent=CC_LIST(i)/CC_LIST(_n_);&lt;/P&gt;&lt;P&gt;That is why you get the "array out of bounds". As soon as you get to record 178 and _n_=178 there is no array element 178.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you might want to provide example of your input data with maybe 4 instead of 177 values and what you want the output to be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 14:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218162#M53653</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-04-10T14:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218163#M53654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That shouldn't happen, at worst you may have less than 177 because there wasn't a value present. The table comes from a proc corr output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original question was on SO and I suggested Kelly move it here as I think s/he requires more help than possible on SO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://stackoverflow.com/questions/29395680/two-way-transpose-sas-table" title="http://stackoverflow.com/questions/29395680/two-way-transpose-sas-table"&gt;proc - Two Way Transpose SAS Table - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;I am trying to create a two way transposed table. The original table I have looks like&lt;/P&gt;&lt;PRE style="margin: 0 0 1em; padding: 5px; background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #222222;"&gt;id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cc 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 55 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 130 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 177 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 55 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;I am trying to create a table that looks like&lt;/P&gt;&lt;PRE style="margin: 0 0 1em; padding: 5px; background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #222222;"&gt;CC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CC1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CC2…&amp;nbsp; …CC177 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 264&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 132&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6 … … 177&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 692&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;In other words, how many id have cc1 also have cc2..cc177..etc&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;The number under ID is not count; an ID could range from 3 digits to 5 digits ID or with numbers such as 122345ab78&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;Is it possible to have percentage display next to each other? &lt;/P&gt;&lt;PRE style="margin: 0 0 1em; padding: 5px; background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #222222;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&amp;nbsp; CC CC1 % CC2 %… …CC177 1 264 100% 5 1.9% 0 2 0 132 6 … … 177 2 1 692 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;If I want to change the CC1 CC2 to characters, how do I modify the arrays? Eventually, I would like my table looks like&lt;/P&gt;&lt;PRE style="margin: 0 0 1em; padding: 5px; background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: #222222;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;CC Dell Lenovo HP Sony Dell Lenovo HP Sony &lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 15px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;"&gt;The order of the names must match the CC number I provided above. CC1=Dell CC2=Lenovo, etc. I would also want to add percentage to the matrice. If Dell X Dell = 100 and Dell X Lenovo = 25, then Dell X Lenovo = 25%.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 14:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218163#M53654</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-04-10T14:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218164#M53655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That should be the answer then.&amp;nbsp; It's illegal to name an array using the same name as an existing variable.&amp;nbsp; Just change the array name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a similar note, if you name an array using the same name as a function, the function is disabled for the duration of the DATA step.&amp;nbsp; References to that name always refer to the array for the duration of the DATA step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 14:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218164#M53655</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-04-10T14:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Variable CC has already been defined..CC is unknown or cannot be accessed</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218165#M53656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for everyone's help. I have posted more detail on my code. The attached link is what I want my tables look like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="267229" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://communities.sas.com/" modifiedtitle="true" title="How to create two tables with actual data and percentage displayed in the same table?"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 14:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Error-Variable-CC-has-already-been-defined-CC-is-unknown-or/m-p/218165#M53656</guid>
      <dc:creator>KellyW1117</dc:creator>
      <dc:date>2015-04-10T14:42:47Z</dc:date>
    </item>
  </channel>
</rss>

