BookmarkSubscribeRSS Feed
Fluorite | Level 6

SAS users have written thousands of macros, often to solve problems that were already solved by others. Is there any convenient and centralized way to share useful SAS macros and download those written by others?


R users share packages through CRAN. Stata users share new commands through SSC. What can SAS users do?

Diamond | Level 26 RW9
Diamond | Level 26

Whilst it sounds like a nice idea, I am always cautious of these types of code sharing places.  Its one thing showing some examples, but actually pushing code out which may be poorly coded, untested, etc. isn't a great idea, which is why I am very cautious when using third party code from the net.  I have seen several of these code libraries filed with code which follows no coding standard, or documented, or checked/validated, and I have also seen people using this code as if it was sent directly from the QC department at SAS.  To be honest a lot of the SAS provided code (and generated code) is quite bad e.g. heavily reliant on macro, no coding standards, and that gets copied into this forum as user's code.

Not saying there shouldn't be a repository, just asking who is going to police it, ensure standardisation, documentation (which is far more important than any coding, ever) and such like?

Super User

There was SAS community but that's been deprecated as of this year. has many user written papers from forums. 

This site has a 'library' component that users can contribute articles. 



Personally, I'm using GitHub and several others are for sure.


Super User

I strongly agree with @RW9. I know that my macros are designed to solve very specific repetitive tasks in a very specific environment and would be useless without my data and the conversions to work in a generic (such as developed by SAS Institute for inclusion with SAS products) are not worth my time or effort.

Opal | Level 21

While it's being eliminated, and most SAS users didn't take advantage of the opportunity while it was there, offered a way to address a number of @RW9's concerns. When you posted a code or article to the site, it not only made it accessible, but also gave anyone interested a centralized way to both comment on and/or improve the code or macro, whilst leaving the historical postings/code readily available.


I have, in the past, suggested that the site would have benefited from being maintained/supported by a paid staff comprised of experienced SAS-users/coders. While that option was never adopted (the site was overseen by an extremely well meaning group of volunteers), @ChrisHemedinger's department comes awfully close to what I was envisioning, but the forum doesn't have the various capabilities that the wiki ( had.


Hopefully, the baby won't be inadvertently thrown out with the bath water!


Art, CEO,


Community Manager

This question comes up often, mostly from people who have something they've built that they are keen to share.  That's a very important part of the collaboration model that has served SAS users for decades, and I've tried to provide some ideas within this blog post.


The other part of the collaborative code repository model are those who are looking for a solution that's already been built.  For QA tested approaches, you can look to the built-in functions and procedures that SAS provides.  For "here's an approach that worked for me", you can reference the many SAS conference papers, this community, (while it remains, as it will for a good while, I suspect), and a growing set of contributions on GitHub.  Most of these are shared as something you should study and adapt; some are perfect to use as-is for their stated purpose. 


For a crowd-sourced guide to the methods (wherever they come from) for solving a particular problem, this community is an excellent resource.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

Discussion stats
  • 5 replies
  • 6 in conversation