6 %macro _reportpgmdoc (i_language=);
8 %local l_anzMacros i l_Path l_outputPath l_macroName;
10 %
if (%sysfunc(exist (WORK._bugdoc))) %then %
do;
11 proc
delete data=WORK._bugdoc;
14 %
if (%sysfunc(exist (WORK._testdoc))) %then %
do;
15 proc
delete data=WORK._testdoc;
18 %
if (%sysfunc(exist (WORK._tododoc))) %then %
do;
19 proc
delete data=WORK._tododoc;
27 "\brief" =
"Ausführliche Beschreibung"
28 "\details" =
"Ausführliche Beschreibung"
33 "\test" =
"Austehende Tests"
34 "\todo" =
"Austehende Aufgaben"
35 "\version" =
"Version"
36 "\param" =
"Parameter"
37 "\return" =
"Rückgabe"
38 "\ret_val" =
"Rückgabewert"
39 "\remark" =
"Kommentar"
40 "\copyright" =
"Copyright"
41 "_label_todolist_" =
"Austehende Aufgaben"
42 "_label_testlist_" =
"Austehende Tests"
43 "_label_buglist_" =
"Fehlerliste"
46 "\brief" =
"Detailed Description"
47 "\details" =
"Detailed Description"
54 "\version" =
"Version"
55 "\param" =
"Parameters"
57 "\ret_val" =
"Return value"
59 "\copyright" =
"Copyright"
60 "_label_todolist_" =
"To Do list"
61 "_label_testlist_" =
"Test list"
62 "_label_buglist_" =
"Bug list"
82 %*** Get all macros to be documented ***;
91 pgm_path=
"&g_sasunit.";
94 %
if (
"&&g_sasautos&i." ne
"") %then %
do;
96 i_path=&&g_sasautos&i.
101 length pgm_path $400;
103 pgm_path=
"&&g_sasautos&i.";
110 %
if (
"%cmpres(&&g_sasautos&i.)" ne
"") %then %
do;
115 MacroName = resolve (
'%_stdpath(' !! trim(pgm_path) !!
',' !! trim(filename) !!
')');
119 select count (*) into :l_anzMacros from work.macros;
122 %do i=1 %to &l_anzMacros.;
123 %local l_macroPath&i. l_macroName&i.;
127 select pgm_path into :l_macroPath1-:l_macroPath%cmpres(&l_anzMacros.) from work.macros;
128 select MacroName into :l_macroName1-:l_macroName%cmpres(&l_anzMacros.) from work.macros;
133 %let l_outputPath = %_abspath(&g_root.,&g_target.)/rep;
135 %do i=1 %to &l_anzMacros;
137 %_scanHeader (MacroName = &&l_macroName&i..
138 ,FilePath = &&l_macroPath&i..
140 ,DataOutDoc = _Pgm&i.
141 ,i_language = &i_language.
144 data work._pgmsrc&i.;
145 length Text $400 CommentOpen idxCommentOpen idxCommentClose 8;
146 retain CommentOpen 0;
147 infile "&&l_macroPath&i../&&l_macroName&i..";
150 idxCommentOpen=index (Text, '');
159 if (idxCommentClose > 0) then do;
165 title j=c "Program Documentation for Macro &&l_macroName&i..";
167 ods html4 file="&l_outputPath./pgm_%scan(&&l_macroName&i..,1,%str(.)).html" style=styles.sasunit stylesheet=(url="css/SAS_SASUnit.css");
168 %_reportPgmHeader (i_lib=WORK, i_data=_Pgm&i., i_language=&i_language.);
170 title j=c "Source Code Documentation for Macro &&l_macroName&i..";
172 proc report data=work._pgmsrc&i. nowd missing
173 style(report)=blindTable
174 style(column)=blindFixedFontData
175 style(header)=blindHeader
176 style(lines)=blindCaption [textalign=left]
188 ods html4 file="&l_outputPath./__PgmDoc_Lists.html" style=styles.sasunit stylesheet=(url="css/SAS_SASUnit.css");
190 %PrintDocList(lib=WORK, data=_ToDoDoc, title=%sysfunc (putc (_label_todolist_, $Headertext_&i_language..)));
191 %PrintDocList(lib=WORK, data=_TestDoc, title=%sysfunc (putc (_label_testlist_, $Headertext_&i_language..)));
192 %PrintDocList(lib=WORK, data=_BugDoc, title=%sysfunc (putc (_label_buglist_, $Headertext_&i_language..)));
199 %macro PrintDocList (lib=, data=, title=);
200 title "Listen für das Reporting";
202 proc sort data=&lib..&data.;
203 by macroname obs_sort;
205 proc report data=&lib..&data. nowd missing
206 style(header)=blindHeader
207 style(lines)=blindCaption [textalign=left]
210 column macroname dummy obs_sort new_description;
212 define macroname / group noprint;
213 define obs_sort / group noprint;
214 define dummy / display style(column)=blinddata;
215 define new_description / display;
217 compute before macroname;
220 compute after macroname;