23 %MACRO _reportScnHTML (i_repdata =
31 %local l_title l_footnote;
33 DATA work._scenario_report;
37 LENGTH abs_path scn_pgm $256
38 LinkColumn1 LinkTitle1 LinkColumn2 LinkTitle2 LinkColumn3 LinkTitle3 $1000
40 descriptionColumn $1000
46 label idColumn=
"&g_nls_reportScn_003."
47 descriptionColumn=
"&g_nls_reportScn_004."
48 programColumn=
"&g_nls_reportScn_005."
49 last_runColumn=
"&g_nls_reportScn_006."
50 durationColumn=
"&g_nls_reportScn_007."
51 resultColumn=
"&g_nls_reportScn_008."
54 abs_path = resolve (
'%_abspath(&g_root,' !! trim(scn_path) !!
')');
55 scn_pgm = resolve (
'%_stdpath(&g_root./saspgm/test,' !! trim(abs_path) !!
')');
56 duration = put (scn_end - scn_start, ??&g_nls_reportScn_013.) !!
" s";
57 c_scnid = put (scn_id, z3.);
60 %_render_IdColumn (i_sourceColumn=scn_id
62 ,o_targetColumn=idColumn
64 %_render_DataColumn (i_sourceColumn=duration
65 ,o_targetColumn=durationColumn
67 %_render_IconColumn (i_sourceColumn=scn_res
69 ,o_targetColumn=resultColumn
72 *** Any destination that renders links shares
this if-clause ***;
73 %
if (&o_html. OR &o_pdf. OR &o_rtf.) %then %
do;
74 LinkTitle1 =
"&g_nls_reportScn_009 " !! c_scnid;
75 LinkTitle2 =
"&g_nls_reportScn_010" !! byte(13) !! abs_path;
76 LinkTitle3 =
"&g_nls_reportScn_011";
77 *** HTML-links are destinations specific ***;
78 %
if (&o_html.) %then %
do;
79 LinkColumn1 = catt (
"cas_overview.html#SCN", c_scnid,
"_");
80 LinkColumn2 =
"file:///" !! abs_path;
81 LinkColumn3 = c_scnid !!
"_log.html";
83 *** PDF- and RTF-links are not destination specific ***;
84 %
if (&o_pdf. OR &o_rtf.) %then %
do;
85 LinkColumn1 = catt (
"SCN", c_scnid,
"_");
86 LinkColumn2 =
"pgm_" !! scn_pgm !!
"_";
87 LinkColumn3 = c_scnid !!
"_log";
89 %_render_DataColumn (i_sourceColumn=scn_desc
90 ,i_linkColumn=LinkColumn1
91 ,i_linkTitle=LinkTitle1
92 ,o_targetColumn=descriptionColumn
94 %_render_DataColumn (i_sourceColumn=scn_path
95 ,i_linkColumn=LinkColumn2
96 ,i_linkTitle=LinkTitle2
97 ,o_targetColumn=programColumn
99 %_render_DataColumn (i_sourceColumn=scn_start
100 ,i_format=&g_nls_reportScn_012.
101 ,i_linkColumn=LinkColumn3
102 ,i_linkTitle=LinkTitle3
103 ,o_targetColumn=last_runColumn
109 %let l_title=%str(&g_nls_reportScn_001 | &g_project - &g_nls_reportScn_002);
110 title j=c
"&l_title.";
112 %_reportFooter(o_html=&o_html);
116 %
if (&o_html.) %then %
do;
117 ods html4 file=
"&o_path./&o_file..html"
119 headtext=
'<link href="tabs.css" rel="stylesheet" type="text/css"/><link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />'
120 metatext=
"http-equiv=""Content-Style-Type"" content=""text/css"" /><meta http-equiv=""Content-Language"" content=""&i_language."" /"
121 style=styles.SASUnit stylesheet=(URL=
"SAS_SASUnit.css");
127 %
if (&o_pdf.) %then %
do;
128 ods pdf file=
"&o_path./&o_file..pdf" style=styles.SASUnit cssstyle=
"&g_target./SAS_SASUnit.css";
130 %
if (&o_rtf.) %then %
do;
131 ods rtf file=
"&o_path./&o_file..rtf" style=styles.SASUnit cssstyle=
"&g_target./html/SAS_SASUnit.css";
134 proc print data=work._scenario_report noobs label;
135 var idColumn / style(column)=rowheader;
136 var descriptionColumn
139 var durationColumn / style(column)=[just=right];
140 var resultColumn / style(column)=[background=white];
142 %
if (&o_html.) %then %
do;
145 %
if (&o_pdf.) %then %
do;
148 %
if (&o_rtf.) %then %
do;
152 %*** Reset title and footnotes ***;
158 PROC DATASETS NOWARN NOLIST LIB=work;
159 DELETE _scenario_report;
161 %MEND _reportScnHTML;