33 %MACRO _reportLogHTML(i_log     =
 
   50    %LET l_macname=&sysmacroname;
 
   52    %LET l_html = &o_html;
 
   60                      ,i_warning  = &g_warning.
 
   61                      ,r_errors   = l_error_count
 
   62                      ,r_warnings = l_warning_count
 
   65    %IF %_handleError(&l_macname
 
   68                     ,Fehler beim Zugriff auf den Log
 
   69                     ,i_verbose=&g_verbose.
 
   76    %LET l_sIgnoreLogMessage01 = %STR(ERROR: Errors printed on page);
 
   80       INFILE 
"&l_log" END=eof TRUNCOVER;
 
   82       INPUT logline $char255.;
 
   85          _errorPatternId      LENGTH = 8
 
   86          _ignoreErrPatternId  LENGTH = 8
 
   87          _warningPatternId    LENGTH = 8
 
   88          error_count          LENGTH = 8
 
   89          warning_count        LENGTH = 8
 
  101          _errorPatternId = prxparse(
"/^%UPCASE(&g_error.)[: ]/");
 
  102          _warningPatternId = prxparse(
"/^%UPCASE(&g_warning.)[: ]/");
 
  103          _ignoreErrPatternId  = prxparse(
"/^&l_sIgnoreLogMessage01./");
 
  108          PUT 
'<meta http-equiv="Content-Language" content="de">';
 
  109          PUT 
'<meta name="GENERATOR" content="SAS &sysver">';
 
  110          PUT 
'<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">';
 
  111          PUT 
"<title>&i_title</title>";
 
  116          PUT 
'<p style="background-color:#EAEAEA; font-family:Fixedsys,Courier,monospace">';
 
  117          PUT 
"&g_nls_reportLog_001: &l_error_count. ";
 
  118          %DO l_curError = 1 %TO &l_error_count.;
 
  119             IF &l_curError=1 THEN PUT 
'==>';
 
  120             PUT 
'<a href="#error' "%sysfunc(putn(&l_curError,z3.))" '">' "&l_curError." '</a>';
 
  123          PUT 
"&g_nls_reportLog_002: &l_warning_count. ";
 
  124          %DO l_curWarning = 1 %TO &l_warning_count.;
 
  125             IF &l_curWarning=1 THEN PUT 
'==>';
 
  126             PUT 
'<a href="#warning' "%sysfunc(putn(&l_curWarning,z3.))" '">' "&l_curWarning." '</a>';
 
  134       IF prxmatch (_errorPatternId, logline) 
 
  135          AND (NOT prxmatch (_ignoreErrPatternId, logline)) THEN DO;
 
  137          PUT '<span style="color:
#FF0000">' @; 
  138          PUT 
'<a name="error' error_count z3. 
'">' @;
 
  140          PUT logline $varying255. l @;
 
  144       ELSE IF prxmatch (_warningPatternId, logline) THEN DO;
 
  146          PUT '<span style="color:
#FF8040">' @; 
  147          PUT 
'<a name="warning' warning_count z3. 
'">' @;
 
  149          PUT logline $varying255. l @;
 
  155          DO WHILE (index(logline, 
'<') > 0);
 
  156             textpos = index(logline, 
'<');
 
  158                newlogline = substr(logline, 1, (textpos - 1)) ||
'<'||substr(logline, (textpos +length(
'<')));
 
  160                newlogline = 
'<'||substr(logline, (textpos + length(
'<')));
 
  161             logline = newlogline;
 
  164          DO WHILE (index(logline, 
'>') > 0);
 
  165             textpos = index(logline, 
'>');
 
  167                newlogline = substr(logline, 1, (textpos - 1)) ||
'>'||substr(logline, (textpos +length(
'>')));
 
  169                newlogline = 
'>'||substr(logline, (textpos + length(
'>')));
 
  170             logline = newlogline;
 
  174          PUT logline $varying255. l;
 
  184    %IF %_handleError(&l_macname
 
  187                     ,Fehler beim Schreiben der HTML-Datei
 
  188                     ,i_verbose=&g_verbose.
 
  192    %IF &l_error_count > 0 %THEN %LET &r_rc = 2;
 
  193    %ELSE %IF &l_warning_count > 0 %THEN %LET &r_rc = 1;
 
  199 %MEND _reportLogHTML;