<?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 Showing Datastep Progress in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55530#M11819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried ﻿﻿﻿write=immediate?&lt;/P&gt;&lt;P&gt;You might want combine it with an altlog specification.&lt;/P&gt;&lt;P&gt;/Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Sep 2011 14:39:14 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2011-09-02T14:39:14Z</dc:date>
    <item>
      <title>Showing Datastep Progress</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55529#M11818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very long running process, due to inconsistent server load determining when the process will complete is difficult based on wall time alone.&amp;nbsp; The process runs in batch mode on a unix server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible Solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the functionality I would like to replicate (code below is perl).&amp;nbsp; Put a note in the log each time a given number of records has been processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while (&amp;lt;INFILE&amp;gt;) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; $counter++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ($counter%500000 == 0) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; print "Working... $counter \n";&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; #Do Stuff;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print "All Done... $counter \n";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above will read a file and each time it reaches an increment of 500,000 records will print a status msg while the program is working to let the user know the progress of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I want to replicate in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I add -logparm "write=immediate" to my config file, does this actually print immediately while still processing a datastep?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not currently able to test but I know in my current enviornment the following will not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H6&gt;Curent Enviornment: LOGPARM=WRITE=BUFFERED ROLLOVER=NONE OPEN=REPLACE&lt;/H6&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 10000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call ranuni(1234);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if mod(i,50000)=0 then putlog i=;&lt;/P&gt;&lt;P&gt; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the write=immediate option doesn't resolve the issue my next thought is to call sysexec and cat a note onto the end of the logfile (if I even can incase there is a lock on the file held by sas while using write=buffered?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone tried something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have any other ideas to implement a similar function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 20:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55529#M11818</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-08-26T20:42:29Z</dc:date>
    </item>
    <item>
      <title>Showing Datastep Progress</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55530#M11819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried ﻿﻿﻿write=immediate?&lt;/P&gt;&lt;P&gt;You might want combine it with an altlog specification.&lt;/P&gt;&lt;P&gt;/Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 14:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55530#M11819</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2011-09-02T14:39:14Z</dc:date>
    </item>
    <item>
      <title>Showing Datastep Progress</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55531#M11820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You also might want to post your question over on SAS-L (&lt;A href="http://www.listserv.uga.edu/cgi-bin/wa?A0=sas-l&amp;amp;D=1&amp;amp;H=0&amp;amp;O=D&amp;amp;T=1"&gt;http://www.listserv.uga.edu/cgi-bin/wa?A0=sas-l&amp;amp;D=1&amp;amp;H=0&amp;amp;O=D&amp;amp;T=1&lt;/A&gt;) as Michael Raithel looks there, but not here, and he is a whiz at coming up with such solutions.&amp;nbsp; Just a thought.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 23:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55531#M11820</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-09-03T23:01:31Z</dc:date>
    </item>
    <item>
      <title>Showing Datastep Progress</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55532#M11821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally had a chance to go back and test this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was downloading a very large dataset (10 billion rows, 500GB) across a slow WAN connection from an Oracle database &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&amp;nbsp; I knew it would take many hours to complete (12 to be exact) and I wanted to have an additional way to make sure observations were getting written other than logging into the file system and checking file sizes and network traffic etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data das.segment_broadcast_fact;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if not mod(_n_,500000000) then put _n_=;&lt;/P&gt;&lt;P&gt; set oradb2.web_session_fact&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( keep = dt &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; client_nbr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_session_id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; broadcast_seg_type_cd &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbsliceparm = (ALL,10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where=(month(dt)=10)&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with this code I get a note immeditaely to my log every 500 millionth iteration in the datastep. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 21:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-Datastep-Progress/m-p/55532#M11821</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-11-29T21:37:21Z</dc:date>
    </item>
  </channel>
</rss>

