24 %MACRO _reportScnHTML (i_repdata =
32 %local l_title l_footnote;
34 DATA work._scenario_report;
38 LENGTH abs_path scn_pgm $256
39 LinkColumn1 LinkTitle1 LinkColumn2 LinkTitle2 LinkColumn3 LinkTitle3 $1000
41 descriptionColumn $1000
47 label idColumn=
"&g_nls_reportScn_003."
48 descriptionColumn=
"&g_nls_reportScn_004."
49 programColumn=
"&g_nls_reportScn_005."
50 last_runColumn=
"&g_nls_reportScn_006."
51 durationColumn=
"&g_nls_reportScn_007."
52 resultColumn=
"&g_nls_reportScn_008."
55 abs_path = resolve (
'%_abspath(&g_root,' !! trim(scn_path) !!
')');
56 scn_pgm = resolve (
'%_stdpath(&g_root./saspgm/test,' !! trim(abs_path) !!
')');
57 duration = put (scn_end - scn_start, ??&g_nls_reportScn_013.) !!
" s";
58 c_scnid = put (scn_id, z3.);
61 %_render_IdColumn (i_sourceColumn=scn_id
63 ,o_targetColumn=idColumn
65 %_render_DataColumn (i_sourceColumn=duration
66 ,o_targetColumn=durationColumn
68 %_render_IconColumn (i_sourceColumn=scn_res
70 ,o_targetColumn=resultColumn
73 *** Any destination that renders links shares
this if-clause ***;
74 %
if (&o_html. OR &o_pdf. OR &o_rtf.) %then %
do;
75 LinkTitle1 =
"&g_nls_reportScn_009 " !! c_scnid;
76 LinkTitle2 =
"&g_nls_reportScn_010" !! byte(13) !! abs_path;
77 LinkTitle3 =
"&g_nls_reportScn_011";
78 *** HTML-links are destinations specific ***;
79 %
if (&o_html.) %then %
do;
80 LinkColumn1 = catt (
"cas_overview.html#SCN", c_scnid,
"_");
81 LinkColumn2 =
"file:///" !! abs_path;
82 LinkColumn3 = c_scnid !!
"_log.html";
84 *** PDF- and RTF-links are not destination specific ***;
85 %
if (&o_pdf. OR &o_rtf.) %then %
do;
86 LinkColumn1 = catt (
"SCN", c_scnid,
"_");
87 LinkColumn2 =
"pgm_" !! scn_pgm !!
"_";
88 LinkColumn3 = c_scnid !!
"_log";
90 %_render_DataColumn (i_sourceColumn=scn_desc
91 ,i_linkColumn=LinkColumn1
92 ,i_linkTitle=LinkTitle1
93 ,o_targetColumn=descriptionColumn
95 %_render_DataColumn (i_sourceColumn=scn_path
96 ,i_linkColumn=LinkColumn2
97 ,i_linkTitle=LinkTitle2
98 ,o_targetColumn=programColumn
100 %_render_DataColumn (i_sourceColumn=scn_start
101 ,i_format=&g_nls_reportScn_012.
102 ,i_linkColumn=LinkColumn3
103 ,i_linkTitle=LinkTitle3
104 ,o_targetColumn=last_runColumn
110 %let l_title=%str(&g_nls_reportScn_001 | &g_project - &g_nls_reportScn_002);
111 title j=c
"&l_title.";
113 %_reportFooter(o_html=&o_html);
117 %
if (&o_html.) %then %
do;
118 ods html4 file=
"&o_path./&o_file..html"
121 headtext=
'<script src="js/jquery.min.and.tablesorter.min.js"></script><link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />'
122 metatext=
"http-equiv=""Content-Style-Type"" content=""text/css"" /><meta http-equiv=""Content-Language"" content=""&i_language."" /"
123 style=styles.SASUnit stylesheet=(URL=
"css/SAS_SASUnit.css")
124 encoding=
"&g_rep_encoding.";
130 %
if (&o_pdf.) %then %
do;
131 ods pdf file=
"&o_path./&o_file..pdf" style=styles.SASUnit cssstyle=
"&g_target./SAS_SASUnit.css";
133 %
if (&o_rtf.) %then %
do;
134 ods rtf file=
"&o_path./&o_file..rtf" style=styles.SASUnit cssstyle=
"&g_target./SAS_SASUnit.css";
137 proc print data=work._scenario_report noobs label;
138 var idColumn / style(column)=rowheader;
139 var descriptionColumn
142 var durationColumn / style(column)=[just=right];
143 var resultColumn / style(column)=[background=white];
146 %
if (&o_html.) %then %
do;
149 %
if (&o_pdf.) %then %
do;
152 %
if (&o_rtf.) %then %
do;
156 %*** Reset title and footnotes ***;
162 PROC DATASETS NOWARN NOLIST LIB=work;
163 DELETE _scenario_report;
165 %MEND _reportScnHTML;