04-17-2015 10:54 AM
I am unable to access the functions degrees() and acos() within the datastep. When I try to run them the following error message appears:
ERROR 68-185: The function DEGREES is unknown, or cannot be accessed.
ERROR 68-185: The function ACOS is unknown, or cannot be accessed.
Here is the code I used:
04-17-2015 11:00 AM
I suspect you are looking for arcos instead of acos. What is the function Degrees supposed to do? There is no such function in SAS, which is what the error message is saying.
04-17-2015 01:18 PM
The degrees function should return the number of degrees for an angle in radians; here is a link describing it:
I tried arcos and it worked, though, so maybe I'm just not getting functions from the right place... Here is the link that I found describing the acos function:
04-17-2015 01:25 PM
You're looking at the FEDSQL SAS 9.4 documentation for first link and the second is SAS 7 documentation I think.
What version of SAS are you on?
04-17-2015 01:44 PM
SAS (r) Proprietary Software 9.3 (TS1M0)
I had noticed the SAS (r) Proprietary Software 9.3 (TS1M0) mentioned, but I thought the functions would have the same names across procedures...
04-17-2015 01:50 PM
For PROC SQL they do, though some of the summary functions such as mean, min, max, sum, and median operate differently.
FEDSQL is almost a different language introduced in SAS 9.4. Also, each version will have new functions.
I like how the 9.2 documentation is laid out personally, but the 9.3 documentation is here
You're looking for BASE SAS functions.
SAS 9.2 documentation
04-17-2015 02:01 PM
Thanks for that clarification. Unfortunately, there appears to be no equivalent to the degrees function I was looking for in the SAS datastep (based on the functions in the 'trigonometric' category). I should be able to get it elsewhere though. Thanks!
Need further help from the community? Please ask a new question.