Hi All,
I am trying to calculate Angle by using Degrees(ARCOS) functions in SAS, But Data step getting an errror.Please advice
26 Degrees=DEGREES(ARCOS(Theta/(Len_A+Len_B)));
_______
68
ERROR 68-185: The function DEGREES is unknown, or cannot be accessed.
I am on SAS 9.4_M1 and SAS EG 6.1
Define your own function, callable from data steps and SQL:
proc fcmp outlib=sasuser.fcmp.math;
function degrees(radians);
if missing(radians) then return(.);
r = mod(radians, 2*constant("PI"));
return (r*360/(2*constant("PI")));
endsub;
run;
options cmplib=sasuser.fcmp;
data _null_;
do x = -2 to 2 by 0.125;
r = x*2*constant("PI");
d = degrees(r);
put r= d=;
end;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.