<?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 ERROR: Cannot find a library containing subroutine... in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458200#M23894</link>
    <description>&lt;P&gt;Hello, all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a cox proportional hazard model and trying to add a time-dependent variable into the model, as suggested by &lt;A href="http://ms.uky.edu/~mai/sta635/Cox%20model.pdf" target="_self"&gt;http://ms.uky.edu/~mai/sta635/Cox%20model.pdf&lt;/A&gt;&amp;nbsp;(p. 28).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep facing the error message below:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: Cannot find a library containing subroutine SYMPTOTAL_.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What seems to be the problem? I would greatly appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc phreg data = perm.habc_cox9; 
	class gender	site	race; 
	model time_event*censor(0)= gender	site	race	CV15Q1AGE	burden_td ; 
	array symptotal_(*) symptotal_1-symptotal_12; 
		  burden_td = symptotal_(time_event); 
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Apr 2018 17:50:33 GMT</pubDate>
    <dc:creator>ejay0503</dc:creator>
    <dc:date>2018-04-27T17:50:33Z</dc:date>
    <item>
      <title>ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458200#M23894</link>
      <description>&lt;P&gt;Hello, all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a cox proportional hazard model and trying to add a time-dependent variable into the model, as suggested by &lt;A href="http://ms.uky.edu/~mai/sta635/Cox%20model.pdf" target="_self"&gt;http://ms.uky.edu/~mai/sta635/Cox%20model.pdf&lt;/A&gt;&amp;nbsp;(p. 28).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep facing the error message below:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: Cannot find a library containing subroutine SYMPTOTAL_.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What seems to be the problem? I would greatly appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc phreg data = perm.habc_cox9; 
	class gender	site	race; 
	model time_event*censor(0)= gender	site	race	CV15Q1AGE	burden_td ; 
	array symptotal_(*) symptotal_1-symptotal_12; 
		  burden_td = symptotal_(time_event); 
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 17:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458200#M23894</guid>
      <dc:creator>ejay0503</dc:creator>
      <dc:date>2018-04-27T17:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458215#M23897</link>
      <description>&lt;P&gt;To access elements of a SAS array in the DATA step or supported procedures, you can use square brackets:&lt;/P&gt;
&lt;PRE&gt;burden_td = symptotal_[time_event]; &lt;/PRE&gt;
&lt;P&gt;You are using rounded parentheses, which mean "make a function call," but SAS doesn't know what function you are trying to call. It looked in every 'library' of functions and didn't find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 18:45:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458215#M23897</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-27T18:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458221#M23901</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;To access elements of a SAS array in the DATA step or supported procedures, you can use square brackets:&lt;/P&gt;
&lt;PRE&gt;burden_td = symptotal_[time_event]; &lt;/PRE&gt;
&lt;P&gt;You are using rounded parentheses, which mean "make a function call," but SAS doesn't know what function you are trying to call. It looked in every 'library' of functions and didn't find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS has used parenthesis for array indexing for decades.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; 73         data _null_;
 74           array symptotal_ (4) ;
 75           do time_event=1 to dim(symptotal_);
 76             burden_td + symptotal_(time_event);
 77           end;
 78         run;
 
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds&lt;/PRE&gt;
&lt;P&gt;I suspect that the real problem is that you cannot use ARRAY and assignment statements in PROC step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 19:24:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458221#M23901</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-27T19:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458223#M23902</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;PROC PHREG does support &lt;A href="http://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax19.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;Programming Statements&lt;/A&gt; including array declarations. In the docs it does indicate the square brackets. I wonder if this is one of the few cases where it does matter...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 19:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458223#M23902</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-27T19:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458224#M23903</link>
      <description>&lt;P&gt;Sorry that I was unclear. Tom is correct that &lt;STRONG&gt;IN THE DATA STEP&amp;nbsp;&lt;/STRONG&gt;it is legal (for historical reasons) to use rounded brackets for indices. But you should train yourself to use square brackets because those are the operators that are supported in both the&amp;nbsp;DATA step and SAS procedures. Some people use curly braces for indexing, but those are not universally supported in all procedures (for example, SAS/IML only supports square brackets.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compare the following PROC PHREG steps and notice that the first gives the "Cannot find a library " error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
array x(3) x1-x3;
do i = 1 to 3;
   x(i) = i;
end;
t = 1;
run;

proc phreg data=Have;
array x(3) x1-x3;
y = x(i);
run;

proc phreg data=Have;
array x(3) x1-x3;
y = x[i];
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Apr 2018 19:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458224#M23903</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-27T19:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458240#M23906</link>
      <description>&lt;P&gt;So how do we get SAS to fix the PHREG compiler so it supports normal SAS syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I gave using goofy characters when I switched from using APL to using SAS thirty years ago.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 20:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458240#M23906</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-27T20:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458337#M23911</link>
      <description>&lt;P&gt;This syntax is documented and has been around for many years, so I assume it is unlikely to change. &lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_mcmc_syntax02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;The SAS/STAT documentation states&lt;/A&gt; that procedures and PROC FCMP use an "ARRAY statement [that] is similar to, but not the same as, the ARRAY statement in the DATA step." In particular, "You can index array elements by enclosing a subscript in braces (&lt;STRONG&gt;{ }&lt;/STRONG&gt;)&amp;nbsp;or brackets (&lt;STRONG&gt;[ ]&lt;/STRONG&gt;), but not in parentheses (&lt;STRONG&gt;( )&lt;/STRONG&gt;). The parentheses are reserved for function calls only."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other differences between the ARRAY statement in procedures and in the DATA step.The most comprehensive discussion of the difference is documented in &lt;A href="http://go.documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p048tu5gixqaxin1ej7b7yuyhn86.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;the doc for PROC FCMP&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Apr 2018 11:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458337#M23911</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-04-28T11:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458382#M23914</link>
      <description>&lt;P&gt;Does this limitation mean that you can use an array name that conflicts with a SAS or user defined function name?&amp;nbsp; And reference both in the same PROC step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That would be a benefit of forcing users to use strange characters in their code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Apr 2018 18:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/458382#M23914</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-28T18:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Cannot find a library containing subroutine...</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/460258#M24034</link>
      <description>&lt;P&gt;Rick, I wanted to say your suggestion did solve the problem! No more error message and the Cox model did run correctly. I super really appreciate your help!!&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 17:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/ERROR-Cannot-find-a-library-containing-subroutine/m-p/460258#M24034</guid>
      <dc:creator>ejay0503</dc:creator>
      <dc:date>2018-05-05T17:35:44Z</dc:date>
    </item>
  </channel>
</rss>

