<?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 on calling subroutines out of FCMP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64481#M14010</link>
    <description>Maybe I'm on thin ice here, since I haven't done any coding (yet) with FCMP.&lt;BR /&gt;
But looking into some examples in the online doc, maybe I could suggest something anyway...&lt;BR /&gt;
&lt;BR /&gt;
It seems that if you are going to use the return() function, I think you are supposed to use the function name as argument, and also using the function name in the assignment statement as well. see:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002890491.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002890491.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
In your case, this would be:&lt;BR /&gt;
&lt;BR /&gt;
proc fcmp outlib = sasuser.FCMP_Cat.fcns; &lt;BR /&gt;
function SUMM(x,y);&lt;BR /&gt;
summ = x + y ;&lt;BR /&gt;
return(summ);&lt;BR /&gt;
endsub;&lt;BR /&gt;
quit; &lt;BR /&gt;
&lt;BR /&gt;
Hope this helps...&lt;BR /&gt;
&lt;BR /&gt;
Linus</description>
    <pubDate>Thu, 04 Dec 2008 16:11:20 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2008-12-04T16:11:20Z</dc:date>
    <item>
      <title>error on calling subroutines out of FCMP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64480#M14009</link>
      <description>hi guys,&lt;BR /&gt;
this keeps giving me an error:&lt;BR /&gt;
&lt;BR /&gt;
PGM:&lt;BR /&gt;
proc fcmp outlib = sasuser.FCMP_Cat.fcns; &lt;BR /&gt;
  function SUMM(x,y);&lt;BR /&gt;
    z = x + y  ;&lt;BR /&gt;
    return(z);&lt;BR /&gt;
  endsub;&lt;BR /&gt;
quit; &lt;BR /&gt;
&lt;BR /&gt;
options cmplib=(sasuser.FCMP_Cat);&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
  som = SUMM(6,4);&lt;BR /&gt;
run; &lt;BR /&gt;
&lt;BR /&gt;
LOG:&lt;BR /&gt;
6    proc fcmp outlib = sasuser.FCMP_Cat.fcns;&lt;BR /&gt;
7      function SUMM(x,y);&lt;BR /&gt;
8        z = x + y  ;&lt;BR /&gt;
9        return(z);&lt;BR /&gt;
10     endsub;&lt;BR /&gt;
11   quit;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Function SUMM saved to catalog sasuser.FCMP_Cat.fcns.&lt;BR /&gt;
NOTE: PROCEDURE FCMP used (Total process time):&lt;BR /&gt;
      real time           0.28 seconds&lt;BR /&gt;
      cpu time            0.01 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
12&lt;BR /&gt;
13   options cmplib=(sasuser.FCMP_Cat);&lt;BR /&gt;
14&lt;BR /&gt;
15   data test;&lt;BR /&gt;
16     som = SUMM(6,4);&lt;BR /&gt;
             ----&lt;BR /&gt;
             68&lt;BR /&gt;
ERROR 68-185: The function SUMM is unknown, or cannot be accessed.&lt;BR /&gt;
&lt;BR /&gt;
17   run;</description>
      <pubDate>Thu, 04 Dec 2008 15:39:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64480#M14009</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-04T15:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: error on calling subroutines out of FCMP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64481#M14010</link>
      <description>Maybe I'm on thin ice here, since I haven't done any coding (yet) with FCMP.&lt;BR /&gt;
But looking into some examples in the online doc, maybe I could suggest something anyway...&lt;BR /&gt;
&lt;BR /&gt;
It seems that if you are going to use the return() function, I think you are supposed to use the function name as argument, and also using the function name in the assignment statement as well. see:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002890491.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002890491.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
In your case, this would be:&lt;BR /&gt;
&lt;BR /&gt;
proc fcmp outlib = sasuser.FCMP_Cat.fcns; &lt;BR /&gt;
function SUMM(x,y);&lt;BR /&gt;
summ = x + y ;&lt;BR /&gt;
return(summ);&lt;BR /&gt;
endsub;&lt;BR /&gt;
quit; &lt;BR /&gt;
&lt;BR /&gt;
Hope this helps...&lt;BR /&gt;
&lt;BR /&gt;
Linus</description>
      <pubDate>Thu, 04 Dec 2008 16:11:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64481#M14010</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-12-04T16:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: error on calling subroutines out of FCMP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64482#M14011</link>
      <description>another example copied out of a white paper that gives the same error:&lt;BR /&gt;
&lt;BR /&gt;
proc fcmp outlib=sasuser.funcs.trial;&lt;BR /&gt;
function study_day(intervention_date, event_date);&lt;BR /&gt;
if event_date &amp;lt; intervention_date then&lt;BR /&gt;
return(event_date - intervention_date);&lt;BR /&gt;
else&lt;BR /&gt;
return(event_date - intervention_date + 1);&lt;BR /&gt;
endsub;&lt;BR /&gt;
RUN;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
options cmplib=sasuser.funcs;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
start = '15Feb2006'd;&lt;BR /&gt;
today = '27Mar2006'd;&lt;BR /&gt;
sd = study_day(start, today);&lt;BR /&gt;
put sd=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Herman</description>
      <pubDate>Thu, 04 Dec 2008 16:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64482#M14011</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-04T16:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: error on calling subroutines out of FCMP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64483#M14012</link>
      <description>If this is from an official SAS paper, I think It would be legitimate to open a track on SAS support.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Thu, 04 Dec 2008 20:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64483#M14012</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-12-04T20:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: error on calling subroutines out of FCMP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64484#M14013</link>
      <description>What version of SAS are you using?  With 9.1.3 the PROC FCMP works but the function cannot be call from a data step.  I think you need 9.2 for that.</description>
      <pubDate>Mon, 08 Dec 2008 16:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-on-calling-subroutines-out-of-FCMP/m-p/64484#M14013</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2008-12-08T16:10:04Z</dc:date>
    </item>
  </channel>
</rss>

