SASUnit Examples  Version 1.2.1
_sasunit_reportscnhtml.sas
Go to the documentation of this file.
1 
20 /* change log
21  19.08.2008 AM national language support
22 */
23 
24 %MACRO _sasunit_reportScnHTML (
25  i_repdata =
26  ,o_html =
27 );
28 
29 DATA _null_;
30  SET &i_repdata END=eof;
31  BY scn_id;
32 
33  FILE "&o_html";
34 
35  IF _n_=1 THEN DO;
36 
37  %_sasunit_reportPageTopHTML(
38  i_title = %str(&g_nls_reportScn_001 | &g_project - &g_nls_reportScn_002)
39  ,i_current = 2
40  )
41 
42  PUT '<table>';
43 
44  PUT '<tr>';
45  PUT ' <td class="tabheader">' "&g_nls_reportScn_003</td>";
46  PUT ' <td class="tabheader">' "&g_nls_reportScn_004</td>";
47  PUT ' <td class="tabheader">' "&g_nls_reportScn_005</td>";
48  PUT ' <td class="tabheader">' "&g_nls_reportScn_006</td>";
49  PUT ' <td class="tabheader">' "&g_nls_reportScn_007</td>";
50  PUT ' <td class="tabheader">' "&g_nls_reportScn_008</td>";
51  PUT '</tr>';
52  END;
53 
54  LENGTH abs_path $256;
55 
56  IF first.scn_id THEN DO;
57  PUT '<tr>';
58  PUT ' <td class="idcolumn"><a class="lightlink" title="' "&g_nls_reportScn_009 " scn_id z3. '" href="cas_overview.html#scn' scn_id z3. '">' scn_id z3. '</a></td>';
59  PUT ' <td class="datacolumn"><a class="lightlink" title="' "&g_nls_reportScn_009 " scn_id z3. '" href="cas_overview.html#scn' scn_id z3. '">' scn_desc +(-1) '</a></td>';
60  abs_path = resolve ('%_sasunit_abspath(&g_root,' !! trim(scn_path) !! ')');
61  PUT ' <td class="datacolumn"><a class="lightlink" title="' "&g_nls_reportScn_010 " '&#x0D;' abs_path +(-1) '" href="' abs_path +(-1) '">' scn_path +(-1) '</a></td>';
62  PUT ' <td class="datacolumn"><a class="lightlink" title="' "&g_nls_reportScn_011" '" href="' scn_id z3. '_log.html">' scn_start &g_nls_reportScn_012 '</a></td>';
63  duration = scn_end - scn_start;
64  PUT ' <td class="datacolumn">' duration &g_nls_reportScn_013 's</td>';
65  PUT ' <td class="iconcolumn"><img src=' @;
66  SELECT (scn_res);
67  WHEN (0) PUT '"ok.png" alt="OK"' @;
68  WHEN (1) PUT '"error.png" alt="' "&g_nls_reportScn_014" '"' @;
69  WHEN (2) PUT '"manual.png" alt="' "&g_nls_reportScn_015" '"' @;
70  OTHERWISE PUT '"?????" alt="' "&g_nls_reportScn_016" '"' @;
71  END;
72  PUT '></img></td>';
73  PUT '<tr>';
74  END;
75 
76  IF eof THEN DO;
77  PUT '</table>';
78  %_sasunit_reportFooterHTML()
79  END;
80 
81 RUN;
82 
83 %MEND _sasunit_reportScnHTML;