Google SAS Search

Add to Google

Tuesday, March 27, 2012

Version Control

Two things that make me nuts when I work with SAS:
no here documents
no string interpolation

Ok, now that I got that out of the way. I am thinking of putting together a talk on version control for SAS programmers. Do you currently use version control for your SAS programs? Yes, no, which one, why?

I use git for nearly everything. Not sure how I ever got by without it.

7 comments:

  1. I have my own manual version control that I implement, via several custom macros I've created.

    ReplyDelete
  2. At SAS, we use a variety of source control technologies for different projects, including CVS (and recently, Git). Personally, I end up in CVS for most projects. I rely on TortoiseCVS for file system integration with Windows, which gives me easy access to histories, differencing tools, annotated changes, and more.

    I do use SAS Enterprise Guide for virtually all of my SAS programming, and while that doesn't offer integration with a version control system, the file-system integration is workable.

    ReplyDelete
  3. How would string interpolation be different than using SAS macro variables? Seems like you could get it to work in a very similar fashion.

    ReplyDelete
  4. Yes, macro variables allow pretty straightforward string interpolation. But macro is compile time, and usually by the time I am writing things out to a file I am in execution time.

    ReplyDelete
  5. We use SVN through TortoiseSVN on Windows, integrates quick and seamless.

    ReplyDelete
  6. I have used IBM Rational ClearCase since 2003 and designed/developed a Unix / Windows SAS GxP environment at Novartis. It still runs today and suports ca 3500 make runs a day and 800 online users.

    There is a paper about the architecture of the system and possibilites of ClearCase here: http://www.lexjansen.com/phuse/2005/as/as09.pdf

    I could not work on a system without it anymore. Using make is another vital step towards peace of mind.

    If I was doing it today I would probably use a distributed system like Mercurial or Git. This scales well for small teams and is easier to sync geographically separated teams (than ClearCase).

    DaveG

    ReplyDelete
  7. I agree about string interpolation - when I started Korn shell I looked for the character functions like substr() and couldn't find any. I nearly freaked out. But string interpolations work better do all you need and dont require a dictionary of 200 character functions. :-)

    SAS does have here documents : datalines in an embedded data step!

    I would add associative arrays like awk has had since 1977 - but they have now arrived as the hash object. I would like record structured macro variables, macro vectors and matrices and hash objects that persist in memory between data steps.

    A way to make the PDV a matrix would be nice (eg hold a whole by group at a time).

    DaveG

    ReplyDelete