Recommended documentation tool for SAS code

Reply
Contributor
Posts: 35

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:

 

/Allan
Think you know SAS? Take the sasensei challenge..
Regular Contributor
Posts: 227

Re: Recommended documentation tool for SAS code

Posted in reply to AllanBowe

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

 

Contributor
Posts: 35

Re: Recommended documentation tool for SAS code

Posted in reply to Ron_Fehd_macro_maven

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

/Allan
Think you know SAS? Take the sasensei challenge..
Super User
Super User
Posts: 7,393

Re: Recommended documentation tool for SAS code

Posted in reply to AllanBowe

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.

 

 

Contributor
Posts: 35

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)

/Allan
Think you know SAS? Take the sasensei challenge..
Ask a Question
Discussion stats
  • 4 replies
  • 315 views
  • 0 likes
  • 3 in conversation