Recommended documentation tool for SAS code

Reply
Occasional Contributor
Posts: 15

Recommended documentation tool for SAS code

I'm starting a new project and I'd like to build the comment header of my macros in such a way that it can be imported into a documentation tool.

 

Does anyone have any recommendations?  My review so far has surfaced:

 

Regular Contributor
Posts: 226

Re: Recommended documentation tool for SAS code

Q.1: static or dynamic?

i.e. are you going to run this documentation-extraction program once,

or periodicly?

 

Q.2 output file type?

pdf? or html?

 or xml?

 

Q.2: what are your begin and end markers for documentation?

in my programs, that's a single slash asterisk comment.

 

 /*    name: ..\SAS-site\macros\calltext.sas

description: ...

    purpose: ...

....

****/

 

take a look through SAS example programs

and you'll see lots of /* ... */ on every single line of the header

 

"C:\Program Files\SASHome\SASFoundation\9.4\core\sasmacro\aarfm.sas"

 

/******************************************************************************/
/* Copyright (c) 2013 by SAS Institute Inc., Cary, NC USA 27513               */
/*                                                                            */
/* NAME: aaRFM                                                                */

 

take a look at Michael Fiendly's pages

 

http://www.math.yorku.ca/SCS/friendly.html

 

I also recommend LaTeX for *.pdf.

I use typesetting system in all my papers.

 

http://latex.org/forum/

 

and the package fancyvrb.

 

https://ctan.org/pkg/fancyvrb

 

Ron Fehd  doc maven

 

Occasional Contributor
Posts: 15

Re: Recommended documentation tool for SAS code

Hi Ron - thanks for following up!

 

In the end, I went with doxygen

 

Example code is available in our open source github library here:  https://github.com/macropeople/macrocore

 

Example (generated) documentation is here:  https://rawsas.github.io/coredoc/files.html

 

/Allan

Super User
Super User
Posts: 6,843

Re: Recommended documentation tool for SAS code


AllanBowe wrote:

Hi Ron - thanks for following up!

 

In the end, I went with doxygen

 

Example code is available in our open source github library here:  https://github.com/macropeople/macrocore

 

Example (generated) documentation is here:  https://rawsas.github.io/coredoc/files.html

 

/Allan


Looks cool.

 

Could the doxygen header be AFTER the %MACRO statement?  I don't like having source code for autocall macros that contain text that is not part of the macro.

 

 

Occasional Contributor
Posts: 15

Re: Recommended documentation tool for SAS code

Yes of course.  There is extensive documentation on the documentation - http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html

 

It's the best I've found for working with SAS, and credit for the idea should go to Rocco Cannizzaro (it's used to autogenerate documentation in the SAS IRM solution)

Ask a Question
Discussion stats
  • 4 replies
  • 261 views
  • 0 likes
  • 3 in conversation