<?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 proc fcmp confusion in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-fcmp-confusion/m-p/62334#M17733</link>
    <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I should disclaim all of this by saying that I'm fairly new to SAS programming, so I could be missing something obvious, but I'm having a strange problem with proc fcmp on my SAS 9.1.3 SP 4 server. I'm trying to run the following program:&lt;BR /&gt;
&lt;BR /&gt;
proc fcmp outlib=work.funcs.comn;&lt;BR /&gt;
	function adw (Theo, Actual, Days);&lt;BR /&gt;
		if Actual &amp;gt; (Theo*0.4) then&lt;BR /&gt;
			return(Actual/Days);&lt;BR /&gt;
		else&lt;BR /&gt;
			return((Theo*0.4)/Days);&lt;BR /&gt;
	endsub;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
options cmplib=work.funcs;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	OutAdw = adw(100, 75, 10);&lt;BR /&gt;
	put OutAdw=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
However, I get the error "The function ADW is unknown, or cannot be accessed. From what I read, I thought the options cmplib=work.funcs; would solve that. Can anyone tell me what I'm doing wrong? Here's the full log, just for good measure...&lt;BR /&gt;
&lt;BR /&gt;
1    proc fcmp outlib=work.funcs.comn;&lt;BR /&gt;
2        function adw (Theo, Actual, Days);&lt;BR /&gt;
3            if Actual &amp;gt; (Theo*0.4) then&lt;BR /&gt;
4                return(Actual/Days);&lt;BR /&gt;
5            else&lt;BR /&gt;
6                return((Theo*0.4)/Days);&lt;BR /&gt;
7        endsub;&lt;BR /&gt;
8    quit;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Function adw saved to catalog work.funcs.comn.&lt;BR /&gt;
NOTE: PROCEDURE FCMP used (Total process time):&lt;BR /&gt;
      real time           0.26 seconds&lt;BR /&gt;
      cpu time            0.21 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
9&lt;BR /&gt;
10   options cmplib=work.funcs;&lt;BR /&gt;
11&lt;BR /&gt;
12   data _null_;&lt;BR /&gt;
13       OutAdw = adw(100, 75, 10);&lt;BR /&gt;
                  ---&lt;BR /&gt;
                  68&lt;BR /&gt;
ERROR 68-185: The function ADW is unknown, or cannot be accessed.&lt;BR /&gt;
&lt;BR /&gt;
14&lt;BR /&gt;
15       put OutAdw=;&lt;BR /&gt;
16   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&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</description>
    <pubDate>Thu, 06 Aug 2009 22:45:49 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-08-06T22:45:49Z</dc:date>
    <item>
      <title>proc fcmp confusion</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-fcmp-confusion/m-p/62334#M17733</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I should disclaim all of this by saying that I'm fairly new to SAS programming, so I could be missing something obvious, but I'm having a strange problem with proc fcmp on my SAS 9.1.3 SP 4 server. I'm trying to run the following program:&lt;BR /&gt;
&lt;BR /&gt;
proc fcmp outlib=work.funcs.comn;&lt;BR /&gt;
	function adw (Theo, Actual, Days);&lt;BR /&gt;
		if Actual &amp;gt; (Theo*0.4) then&lt;BR /&gt;
			return(Actual/Days);&lt;BR /&gt;
		else&lt;BR /&gt;
			return((Theo*0.4)/Days);&lt;BR /&gt;
	endsub;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
options cmplib=work.funcs;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	OutAdw = adw(100, 75, 10);&lt;BR /&gt;
	put OutAdw=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
However, I get the error "The function ADW is unknown, or cannot be accessed. From what I read, I thought the options cmplib=work.funcs; would solve that. Can anyone tell me what I'm doing wrong? Here's the full log, just for good measure...&lt;BR /&gt;
&lt;BR /&gt;
1    proc fcmp outlib=work.funcs.comn;&lt;BR /&gt;
2        function adw (Theo, Actual, Days);&lt;BR /&gt;
3            if Actual &amp;gt; (Theo*0.4) then&lt;BR /&gt;
4                return(Actual/Days);&lt;BR /&gt;
5            else&lt;BR /&gt;
6                return((Theo*0.4)/Days);&lt;BR /&gt;
7        endsub;&lt;BR /&gt;
8    quit;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Function adw saved to catalog work.funcs.comn.&lt;BR /&gt;
NOTE: PROCEDURE FCMP used (Total process time):&lt;BR /&gt;
      real time           0.26 seconds&lt;BR /&gt;
      cpu time            0.21 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
9&lt;BR /&gt;
10   options cmplib=work.funcs;&lt;BR /&gt;
11&lt;BR /&gt;
12   data _null_;&lt;BR /&gt;
13       OutAdw = adw(100, 75, 10);&lt;BR /&gt;
                  ---&lt;BR /&gt;
                  68&lt;BR /&gt;
ERROR 68-185: The function ADW is unknown, or cannot be accessed.&lt;BR /&gt;
&lt;BR /&gt;
14&lt;BR /&gt;
15       put OutAdw=;&lt;BR /&gt;
16   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&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</description>
      <pubDate>Thu, 06 Aug 2009 22:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-fcmp-confusion/m-p/62334#M17733</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-06T22:45:49Z</dc:date>
    </item>
    <item>
      <title>upgrade time!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-fcmp-confusion/m-p/62335#M17734</link>
      <description>The SAS Function Compiler (FCMP) Procedure allows users to create, test, and store SAS functions and subroutines for use by other SAS procedures.&lt;BR /&gt;
The following SAS procedures allow the use of the functions and subroutines created by FCMP:&lt;BR /&gt;
• CALIS&lt;BR /&gt;
• COMPILE&lt;BR /&gt;
• DISTANCE&lt;BR /&gt;
• GA&lt;BR /&gt;
• GENMOD&lt;BR /&gt;
• MODEL&lt;BR /&gt;
• NLIN&lt;BR /&gt;
• NLMIXED&lt;BR /&gt;
• NLP&lt;BR /&gt;
• PHREG&lt;BR /&gt;
• RISK DIMENSIONS&lt;BR /&gt;
• ROBUSTREG&lt;BR /&gt;
• SIMILAR&lt;BR /&gt;
• SYLK&lt;BR /&gt;
&lt;BR /&gt;
In SAS 9.2, FCMP routines can be called from the DATA step like any other SAS function.</description>
      <pubDate>Thu, 06 Aug 2009 23:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-fcmp-confusion/m-p/62335#M17734</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-08-06T23:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: upgrade time!</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-fcmp-confusion/m-p/62336#M17735</link>
      <description>D'oh! I'd seen some stuff saying that FCMP worked in SAS 9.2, but nothing that explicitly said it wouldn't work in 9.1.3. And since it took the proc without complaining, I figured I was doing something wrong in the code. &lt;BR /&gt;
&lt;BR /&gt;
That makes more sense. Thanks for shedding some light on that for me!</description>
      <pubDate>Thu, 06 Aug 2009 23:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-fcmp-confusion/m-p/62336#M17735</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-06T23:51:24Z</dc:date>
    </item>
  </channel>
</rss>

