tags:

views:

80

answers:

3

I copy the code from a paper that i found on internet.

proc fcmp outlib=work.funcs.Test; 
     function whatAmI(); 
        return(42);
     endsub;
quit;

options cmplib=work.funcs;

data _null_;
    rci = whatAmI();
    put rci=; /* should be 42 */
run;

When I execute the code, it show the message: ERROR 68-185: The function WHATAMI is unknown, or cannot be accessed.

I tried other functions and always show this message. I change the libname, but nothing work. What´s wrong?

+1  A: 

I too have a similar problem. Have not been able to get an answer to it yet. Maybe using SAS 9.2 might be a solution. I am currently using SAS 9.1.3.

Can anyone help???

Aditya
A: 

I agree with Aditya.

Seems like 9.2 has the ability to actually use functions, while 9.1.3 only has the ability to more or less create them.

Check out THIS THREAD for more info.

adam
A: 

Looks like a problem with the version. Make sure you are using SAS 9.2, since previous versions have a limited support of PROC FCMP.

Willy