What's so bad about these procedures that you can't use them?
Why do you need to reinvent the wheel? What is inadequate about the existing wheel?
Then you have to use PROC IML .
Calling @Rick_SAS
This is an older answer that may get you started.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.