<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to present log scanning results from Stored Process in Developers</title>
    <link>https://communities.sas.com/t5/Developers/How-to-present-log-scanning-results-from-Stored-Process/m-p/102914#M3767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I'm writing a stored process that will be invoked from stored process web app.&amp;nbsp; The SP generates a report (html/pdf/rtf).&amp;nbsp; After the report is produced, I'd like to parse the log to look for any bad messages, and present them to the user.&amp;nbsp; How best to do the presentation part?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I will use proc printto to redirect the log, and I have a log parser macro that will create a dataset of bad log messages, but how should I present this info to the user?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking of using javascript alert to pop up an alert: "Bad stuff in log", but you can't present a lot of text in an alert box. And of course any of these alerts would be shown only AFTER the report has been generated (and displayed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which makes me think maybe the best approach would be something like:&lt;/P&gt;&lt;P&gt;1. Run the report but write it to a temp location somewhere&lt;/P&gt;&lt;P&gt;2. Scan log for bad messages&lt;/P&gt;&lt;P&gt;3. If bad messages found, display them to user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else display report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'm just getting started with stored processes, was hoping to get feedback from others on how you approach log scanning and returning the results to the user.&amp;nbsp; It was all so simple in DMS/batch SAS....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize if there is a "fatal" error the user will realize it.&amp;nbsp; But I want to catch other errors (uninitialized variables, missing data, etc) that only show up as notes or warnings when (undocumented) note2err is not set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2012 17:16:36 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2012-05-03T17:16:36Z</dc:date>
    <item>
      <title>How to present log scanning results from Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/How-to-present-log-scanning-results-from-Stored-Process/m-p/102914#M3767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I'm writing a stored process that will be invoked from stored process web app.&amp;nbsp; The SP generates a report (html/pdf/rtf).&amp;nbsp; After the report is produced, I'd like to parse the log to look for any bad messages, and present them to the user.&amp;nbsp; How best to do the presentation part?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I will use proc printto to redirect the log, and I have a log parser macro that will create a dataset of bad log messages, but how should I present this info to the user?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking of using javascript alert to pop up an alert: "Bad stuff in log", but you can't present a lot of text in an alert box. And of course any of these alerts would be shown only AFTER the report has been generated (and displayed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which makes me think maybe the best approach would be something like:&lt;/P&gt;&lt;P&gt;1. Run the report but write it to a temp location somewhere&lt;/P&gt;&lt;P&gt;2. Scan log for bad messages&lt;/P&gt;&lt;P&gt;3. If bad messages found, display them to user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else display report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'm just getting started with stored processes, was hoping to get feedback from others on how you approach log scanning and returning the results to the user.&amp;nbsp; It was all so simple in DMS/batch SAS....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize if there is a "fatal" error the user will realize it.&amp;nbsp; But I want to catch other errors (uninitialized variables, missing data, etc) that only show up as notes or warnings when (undocumented) note2err is not set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 17:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-present-log-scanning-results-from-Stored-Process/m-p/102914#M3767</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2012-05-03T17:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to present log scanning results from Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/How-to-present-log-scanning-results-from-Stored-Process/m-p/102915#M3768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not too sure that you can show your warnings in the same output itself.&lt;/P&gt;&lt;P&gt;However if you are giving a html output then you can look at adding a button to your _webout output --- SHOW ALL WARNINGS .&lt;/P&gt;&lt;P&gt;And link it to execute either a second stored process to provide the output of your log or replay the same STP and use the current session itself to show the messages in the LOG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 18:30:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/How-to-present-log-scanning-results-from-Stored-Process/m-p/102915#M3768</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2012-05-03T18:30:06Z</dc:date>
    </item>
  </channel>
</rss>

