Community talk about communities.sas.com. Meta!

Sharing SAS macros

Reply
New Contributor
Posts: 4

Sharing SAS macros

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?

Super User
Super User
Posts: 9,427

Re: Sharing SAS macros

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
Posts: 23,311

Re: Sharing SAS macros

There was SAS community but that's been deprecated as of this year. 

Lexjansen.com 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. 

https://gist.github.com/statgeek

 

Super User
Posts: 13,333

Re: Sharing SAS macros

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.

PROC Star
Posts: 8,149

Re: Sharing SAS macros

While it's being eliminated, and most SAS users didn't take advantage of the opportunity while it was there, sasCommunity.org 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 (sasCommunity.org) had.

 

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

 

Art, CEO, AnalystFinder.com

 

Community Manager
Posts: 3,380

Re: Sharing SAS macros

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, sasCommunity.org (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.

Ask a Question
Discussion stats
  • 5 replies
  • 344 views
  • 7 likes
  • 6 in conversation