guess this is like getting an abacus to calculate square roots.
(well how did the ancient greek and egyptian architects and engineers achieve so much without our technology? - I guess they knew how to use their own! )
A long time ago in school we calculated square roots with iterative long-division
Later at university "expansion of series" achieved the mathematical equivalent
Now it's just easier to use the simplest formula
as "an experienced sas programmer" I'm not sure why I should care !
I can see how it would be a good exercise for a new sas learner. It would help them figure out iterative processing, SAS functions, and the order of operations as well as teaching them how to deal with the situation of 1 square root being calculated vs having a file of numbers for which sq rts needed to be calculated.
My general policy on posting code is that if I have a sample program that can be easily changed to illustrate a point, I will post the code. I read the algorithm and I have a general idea of how to write the program.
But there's no benefit for me to write the program. Part of the learning process, in general is understanding the problem and solving it in concept. Then once you understand the solution in concept, if you have to go a step further and write code, then the best way to LEARN is to try something, try something else, make some progress, make some mistakes, read some documentation, try something and read some more documentation (gee, I need a way to break this number into "chunks" -- let me look at the list of SAS functions), and try something else.
At any rate, this question really is off topic for SAS and clinical trial questions and doesn't really belong in this forum.