Hi, I am trying to calculate Dregress(ACOS(Value)) in SAS data step, Please let me know syntax by using PROC FEDSQL.
Hi @Coa_SAs,
I think there is no DEGREES function available in the data step (as opposed to FedSQL), but who would really need a function that multiplies its argument by a constant?
The ACOS function is named ARCOS in the data step.
So, in a data step the calculation could be done as follows:
data _null_;
c=sqrt(.5); /* example */
a=180*arcos(c)/constant('pi');
put a;
run; /* result: 45 */
[Edit: improved wording]
You say SAS data step but then FEDSQL, which one are you looking to do?
I'm assuming the function, as is, is not working in someway?
Hi @Coa_SAs,
I think there is no DEGREES function available in the data step (as opposed to FedSQL), but who would really need a function that multiplies its argument by a constant?
The ACOS function is named ARCOS in the data step.
So, in a data step the calculation could be done as follows:
data _null_;
c=sqrt(.5); /* example */
a=180*arcos(c)/constant('pi');
put a;
run; /* result: 45 */
[Edit: improved wording]
Hi FreelanceReinha
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.