<?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 Re: SAS parser to step through a SAS log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715091#M220846</link>
    <description>I have written prayers for SAS logs&lt;BR /&gt; They weren't short or simple. They (probably) wouldn't help with custom message for each "iteration" .. but we are all sas programmers... &lt;BR /&gt;If these iterations are in one data step,  the step should give the step elapse time in log. &lt;BR /&gt;So please let us see the messages you want totalled. &lt;BR /&gt;For the next time?, recommend liberal use of&lt;BR /&gt; %put INFO: at %put %sysfunc( now(), datetime17.2)  ;</description>
    <pubDate>Thu, 28 Jan 2021 19:49:19 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2021-01-28T19:49:19Z</dc:date>
    <item>
      <title>SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715076#M220843</link>
      <description>&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;Hi All,&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;A quick question,&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;Has&amp;nbsp;anyone ever used a SAS parser to step through a SAS log?. The problem I am having is I want to calculate the run time for each loop&amp;nbsp;of a program&amp;nbsp;written by a colleague.&amp;nbsp;&amp;nbsp;Because I don't have access to the data yet&amp;nbsp;I can't add statements to the macro to print to the log. The log I have prints the run time for each iteration. So what I want to do is find out the total run time for this dataset. There has to be a more efficient way than having to add up each iteration manually?&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;Your help would be much appreciated as it is a long log.&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV style="text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 14px; font-style: normal; font-weight: 400; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; font-variant-ligatures: normal; font-variant-caps: normal;"&gt;Thank you&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Jan 2021 18:34:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715076#M220843</guid>
      <dc:creator>Question</dc:creator>
      <dc:date>2021-01-28T18:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715082#M220845</link>
      <description>&lt;P&gt;You declared: "&lt;STRONG&gt;&lt;SPAN&gt;The log I have prints the run time for each iteration."&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Did you "print" it into a file? what kind of file? Can you post a sample of that file ?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 18:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715082#M220845</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-01-28T18:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715091#M220846</link>
      <description>I have written prayers for SAS logs&lt;BR /&gt; They weren't short or simple. They (probably) wouldn't help with custom message for each "iteration" .. but we are all sas programmers... &lt;BR /&gt;If these iterations are in one data step,  the step should give the step elapse time in log. &lt;BR /&gt;So please let us see the messages you want totalled. &lt;BR /&gt;For the next time?, recommend liberal use of&lt;BR /&gt; %put INFO: at %put %sysfunc( now(), datetime17.2)  ;</description>
      <pubDate>Thu, 28 Jan 2021 19:49:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715091#M220846</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2021-01-28T19:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715093#M220848</link>
      <description>when did parsers become prayers!&lt;BR /&gt; &lt;BR /&gt;Thanks autocorrect</description>
      <pubDate>Thu, 28 Jan 2021 19:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715093#M220848</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2021-01-28T19:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715114#M220852</link>
      <description>&lt;P&gt;Are you aware of PROC PRINTTO?&amp;nbsp; You didn't mention if you were able to send your log to a file yet.&amp;nbsp; Well if you already know, this should help the person using this article in the furture.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=n1oardywxmmut7n1pol0zkj5u1ok.htm&amp;amp;locale=en"&gt;SAS Help Center: Routing to External Files&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 20:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715114#M220852</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-01-28T20:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715118#M220854</link>
      <description>&lt;P&gt;I usually scan for lines that with MPRINT(... so I can see what macro is running.&lt;/P&gt;
&lt;P&gt;If you are asking for the timing from data steps or proc steps then I normally also scan for DATA ... or PROC ... and remember.&lt;/P&gt;
&lt;P&gt;Or scan for the NOTE: lines that say how many observations and variables were written.&lt;/P&gt;
&lt;P&gt;You can use RETAIN to keep the dataset name or macro name and then search for and read the lines with the timing information. I seem to remember you need to use STIMER informat to read the times. Or perhaps count the numbers colons and prefix the string with enough extra '00:' so the seconds don't become hours.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In terms of counting the loops if there is not a distinct dataset name for each loop then look for some distinct line in the log you can use to detect when a new loop starts and increment a counter.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715118#M220854</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-28T21:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715120#M220855</link>
      <description>&lt;P&gt;May want option Fullstimer with Stimer set when creating the log.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715120#M220855</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-28T21:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS parser to step through a SAS log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715129#M220860</link>
      <description>&lt;P&gt;I suggest you check out&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=n05aazp6jtoup0n1qjee3h7jto24.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC SCAPROC&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-parser-to-step-through-a-SAS-log/m-p/715129#M220860</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-01-28T21:50:39Z</dc:date>
    </item>
  </channel>
</rss>

