<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I make Automated Documentation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60742#M13178</link>
    <description>Hi:&lt;BR /&gt;
  I'm not sure what you mean by "SAS codes" -- do you mean the SAS programs themselves, the SAS logs??  Or producing information about the dataset size, number of obs, variable names, labels, formats, etc?&lt;BR /&gt;
&lt;BR /&gt;
  With or without a SAS macro program, you can easily get dataset and variable information from the various DICTIONARY.xxx files or their equivalent SASHELP.yyy files. For more information, look at some of these resources:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/59727/HTML/default/a001385596.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/59727/HTML/default/a001385596.htm&lt;/A&gt; &lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/118-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/118-28.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/235-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/235-2007.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi29/237-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/237-29.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/25/436.html" target="_blank"&gt;http://support.sas.com/kb/25/436.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/103-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/103-2007.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
    <pubDate>Tue, 11 Nov 2008 12:44:27 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2008-11-11T12:44:27Z</dc:date>
    <item>
      <title>How do I make Automated Documentation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60741#M13177</link>
      <description>Not sure whether I'm at right spot, I wanted to know if I can make documentation of SAS codes automated. I heard it can be done using Macros. Please suggest on this.&lt;BR /&gt;
&lt;BR /&gt;
Also, if this isn't the right place to ask questions like this, please let me know.. Thanks!</description>
      <pubDate>Tue, 11 Nov 2008 09:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60741#M13177</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-11-11T09:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make Automated Documentation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60742#M13178</link>
      <description>Hi:&lt;BR /&gt;
  I'm not sure what you mean by "SAS codes" -- do you mean the SAS programs themselves, the SAS logs??  Or producing information about the dataset size, number of obs, variable names, labels, formats, etc?&lt;BR /&gt;
&lt;BR /&gt;
  With or without a SAS macro program, you can easily get dataset and variable information from the various DICTIONARY.xxx files or their equivalent SASHELP.yyy files. For more information, look at some of these resources:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/59727/HTML/default/a001385596.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/59727/HTML/default/a001385596.htm&lt;/A&gt; &lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/118-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/118-28.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/235-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/235-2007.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi29/237-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/237-29.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/25/436.html" target="_blank"&gt;http://support.sas.com/kb/25/436.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/103-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/103-2007.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 11 Nov 2008 12:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60742#M13178</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-11-11T12:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make Automated Documentation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60743#M13179</link>
      <description>Hi GP&lt;BR /&gt;
&lt;BR /&gt;
What do you want documented from your SAS code ? &lt;BR /&gt;
&lt;BR /&gt;
If you want to document your input and output data, its not that simple - because you will have to build your own parser because of the many many ways sas data can be referenced in the SAS code (i.e. datasets, proc's etc and macro var. ref.).&lt;BR /&gt;
&lt;BR /&gt;
If you want to have basic metadata about your program, like who developed it, when, description, status etc. you can do this by using a standard header in all your programs (at the top). You will need to infile all your sas files in a datastep, and read your header information into a SAS dataset. &lt;BR /&gt;
&lt;BR /&gt;
Its not necessary to write a macro, a normal SAS program can do the job just fine.&lt;BR /&gt;
&lt;BR /&gt;
i.e try this mock-up (has to be refined before use - not tested)&lt;BR /&gt;
[pre]&lt;BR /&gt;
Filename dirlist pipe 'dir p:\*.sas /B'; &lt;BR /&gt;
data fnames(keep=filename);&lt;BR /&gt;
  infile dirlist pad missover;&lt;BR /&gt;
  input @1 filename $62.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data sascode;&lt;BR /&gt;
  retain file;&lt;BR /&gt;
  length string $120;  &lt;BR /&gt;
  set fnames(keep=filename obs=10);&lt;BR /&gt;
  infile dummy filevar=filename end=done dsd; &lt;BR /&gt;
  file=filename;&lt;BR /&gt;
  do while(not done);&lt;BR /&gt;
    input string :$120.;&lt;BR /&gt;
    output;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
You will have to do some IF testing using substr(), index() etc. when reading your standard header.&lt;BR /&gt;
&lt;BR /&gt;
See the following papers for ideas&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi25/25/cc/25p074.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi25/25/cc/25p074.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi27/p208-27.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi27/p208-27.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi29/258-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/258-29.pdf&lt;/A&gt;</description>
      <pubDate>Tue, 11 Nov 2008 12:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60743#M13179</guid>
      <dc:creator>GertNissen</dc:creator>
      <dc:date>2008-11-11T12:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make Automated Documentation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60744#M13180</link>
      <description>Well - the latest issue of the "&lt;B&gt;SAS® Tech Report - november 2008&lt;/B&gt;" has this hint.....&lt;BR /&gt;
&lt;BR /&gt;
Great Forum Paper Series, Continued: Publishing SAS® Code Documentation »&lt;BR /&gt;
This paper introduces DocItOut - a free, open source tool specifically developed to traverse messy directories and generate properly formatted Web documentation in HTML format, based on the comments and statements in the SAS code.&lt;BR /&gt;
&lt;B&gt;DocItOut: Publishing SAS® Code Documentation on the Web&lt;/B&gt;http://www2.sas.com/proceedings/forum2008/232-2008.pdf</description>
      <pubDate>Wed, 12 Nov 2008 10:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-make-Automated-Documentation/m-p/60744#M13180</guid>
      <dc:creator>GertNissen</dc:creator>
      <dc:date>2008-11-12T10:05:03Z</dc:date>
    </item>
  </channel>
</rss>

