thinking data BI Roadmap Series
"ThotWave builds tools
designed to solve your
problems."
corporate newseventscareerscontactsearch  
Email this page to a friend Email this page
Sign up for our e-newsletter

Log In

Codedoc

Have you ever wished there was a tool that could automatically create documentation for your SAS® source code?

Perhaps you've seen how the javadoc tool turns structured header comments inside Java source into HTML API documentation, and wished for something similar for SAS.

If so, the codedoc may be the tool for you. Codedoc is able to read a directory of SAS code source files and extract documentation from header comments that follow simple formatting conventions. The best way to see how this works is by example. Here's a very short SAS macro with a codedoc header comment. Codedoc is not limited to macro programming, but this is a good place to start:

/* ----------------------------------------------------------------
 * codedoc will start paying attention after the next line...
 * <doc>
 * @purpose Performs some function as a macro.
 * @param DEPT - Department name (required)
 * @param SUMMARY - Y/N flag to control whether this macro 
 *  performs a summary function.  Defaults to Y.
 * @return none
 * </doc>
 * codedoc will ignore the remainder of this file...
 * ---------------------------------------------------------------- */

%macro macro1(DEPT=,SUMMARY=Y);
    /* do something here */
%mend macro1;

 

 

Codedoc builds an XML document containing the information in your codedoc header comments. If the above file is the only source file that codedoc reads, the XML will be:

<?xml version='1.0'?>
<code>
    <file>
        <name>macro1.sas</name>
        <purpose>Performs some function as a macro.</purpose>
        <param>DEPT - Department name (required)</param>
        <param>SUMMARY - Y/N flag to control whether this macro 
         performs a summary function.  Defaults to Y.</param>
        <return>none</return>
    </file>
</code>

 

 

This XML can also be associated with an XSL stylesheet, so that it can be viewed in a friendly way in a web browser:

Sample codedoc HTML output

 

Codedoc is available now for free CodeDoc (Zip file)(registration required) under the Eclipse Public License. The distribution includes the codedoc.pl perl script and a sample XSL style sheet for formatting extracted documentation as HTML.

 

 

Copyright © 2010 ThotWave Technologies LLC

thinking data® BI Roadmap Series

At ThotWave, we have been focused on delivering business intelligence (BI) capabilities for more than a decade. We've delivered solutions to customers in Life Sciences, Healthcare, Financial Services and other industries. ThotWave consultants have contributed our THOT leadership by having written hundreds of white papers and articles, and given presentations at industry conferences throughout North America and Europe. Our unique thinking data® methodology is redefining how you make your data more predictive, simple to access, easy to use and understand.

We think it's time for users of Business Intelligence technology to be able to think differently about how to get more value from their data. Coming soon, you'll see a brand new web site that helps you understand what you need to know about business intelligence, data integration and analytics - regardless of where you are on the road to better business intelligence.

More on thinking data® coming soon! In the meantime, if you have any questions, comments or just want to share your perspective on BI, drop us a line!

Your Name

Your Email

Friend's Name

Friend's Email

Message

Your email has been sent