Progress Message Bar Display -- for Those "Long" Program Executions

Progress Message Bar Display -- for Those "Long" Program Executions

This script writes to the bottom line of the workspace a progress message, including
[title][percentage complete][graphical bar].

Ideal when you have scripts that wade through large databases and take several minutes to complete. The output looks something like this ... Writing to file... [65%] [|||||||||| ] <age> <graphical> (The graphics are actually divided into 40 segments) A useful enhancement ! <BR>Sub ProgressBar(Message As String,TotalCount As Integer,ActualCount As Integer) <P> 'Divide the total into 40 equal segments and display<BR> Divisions=Round(TotalCount/40,0)<BR> NoSegments=Round(ActualCount/Divisions,0)+1 <P> 'Create the number of boxes<BR> OutputBoxes=""<BR> For i=1 To NoSegments<BR> OutputBoxes=OutputBoxes+Chr(7)<BR> Next<BR> For i=NoSegments To 40<BR> OutputBoxes=OutputBoxes+" "<BR> Next <P> 'Display Percentage<BR> Percentage=Trim(Str(Round((ActualCount/TotalCount*100),0)))<BR> If Len(Percentage)=1 Then Percentage="[ "+Percentage+"%]"<BR> If Len(Percentage)=2 Then Percentage="[ "+Percentage+"%]"<BR> If Len(Percentage)=3 Then Percentage="["+Percentage+"%]" <P> 'Create Output Display<BR> If ActualCount >= TotalCount Then<BR> Print "" 'This clears the message at the end of the run<BR> Else<BR> Print Message+" "+Percentage+" ["+OutputBoxes+"]"<BR> End If<BR> End Sub<BR> </p><!-- BEGIN: inline registration form --> <div id="inlineRegistration"> <ul> <style> .inlineReg_new form input {width:250px;} .inlineReg_new .inlineRegHeader h4 {font-size:19px} </style> <div class="inlineReg_new"> <div class="inlineRegHeader"> <h4>Requires Free Membership to View</h4> <div class="callToAction"> <nobr><a href="http://users.techtarget.com/registration/searchdomino/LoginRegister">Login</a></nobr> </div> </div> <div class="inlineRegBody"> <style> .inlineReg_new .inlineRegSplashQuote {background-color:#fffff0;border:1px solid #ffeb9b;float:left;margin-top:5px;padding:5px 10px;position:relative;height:100%;width:70%; -moz-border-radius: 2px 2px 2px 2px;} .inlineReg_new .inlineRegSplashQuote p {color:#666;font-size:12px;font-weight:bold;line-height:1.2em;margin-bottom:0;padding:0;} </style> <div class="inlineRegSplash"> <div class="inlineRegSplashQuote"> <div class="quoteArrow"></div> <p>Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.</p> </div> </div> <form action="http://users.techtarget.com/registration/searchdomino/InlineRegisterActivate.page" name="inlineregform" method="post"> <fieldset> <ul><li > <label for="dgUser#email">E-mail Address: </label> <input type="text" maxlength="100" size="25" value="" name="dgUser#email" id="Email"/> </li> <input type="hidden" name="general_permission" id="GeneralPermission" value="485173, 906539, 430905, 430898" /> <input type="hidden" name="appCD" id="AppCode" value="55" /> <input type="hidden" name="fromURL" id="FromURL" value="http://searchdomino.techtarget.com/tip/Progress-Message-Bar-Display-for-Those-Long-Program-Executions" /> <input type="hidden" name="guideContentId" id="ContentId" value="" /> <input type="hidden" name="ad_id" id="AdId" value="500536" /> <input type="hidden" name="type" id="Page-Type" value="inlineregister" /> <input type="hidden" name="pageNumber" id="Page-Number" value="1" /> <input type="hidden" name="general_permission_global" id="GeneralPermissionGlobal" value="1078335, 975515, 457097, 430809, 1151303" /> <input type="hidden" name="dgUser#country" id="Country" value="" /> <input type="hidden" name="dgUser#province" id="State/Province" value="" /> <input type="hidden" name="dgUser#city" id="City" value="" /> </ul><input type="submit" value="Become a Member" class="submit primaryButton"onclick='var errorText=""; if (this.form.elements["dgUser#email"].value=="") { alert("Please enter your Email Address"); return false; } else { return true; }' /> </fieldset> </form><div class="inlineRegFormFooter"> <p>By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our <a href="http://www.techtarget.com/html/privacy_policy.html" target="_blank">Privacy Policy</a> which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our <a href="http://searchdomino.techtarget.com/about/copyright" target="_blank">Terms of Use</a>. You may contact us at <a href="mailto:webmaster@techtarget.com">webmaster@TechTarget.com</a>.</p> </div> </div> </div></ul> </div> <!-- END: inline registration form --> <div id="adPsl" class="splash adSplash on"> <div id="vendorOffer"> <!-- vendor offer place holder --> </div> </div> <img src="http://cdn.ttgtmedia.com/rms/ux/digitalguide/images/spacer.gif" width="1" height="900" /> <p><p></p><!-- Begin Dig Deeper: this is above the inline-reg split --> <!-- TMP-RightColTop, searchdomino.techtarget.com, generated at 00:28:28 Mon May 21, 2012 , by vappma12.techtarget.com --> <!-- ItemRegion, searchdomino.techtarget.com, generated at 00:28:29 Mon May 21, 2012 , by vappma12.techtarget.com --> <div id="relatedContent"> <h4>Dig Deeper</h4> <div id="relatedContentShow"> <div class="articleColumns"> <ul class="columnCount2"> <li> <div class="splash columnSplash" id="alsoRead"> <h4>People who read this also read...</h4><ul class="listTypeBullet"> <li> <a baynote_req="PeopleWhoReadAlsoRead" baynote_bnrank="3" baynote_guide="RecentPopular" href="http://searchsecurity.techtarget.com/tip/Identity-management-compliance-How-IAM-systems-support-compliance"> Identity management compliance: How IAM systems support compliance</a> </li> <li> <a baynote_req="PeopleWhoReadAlsoRead" baynote_bnrank="5" baynote_guide="RecentPopular" href="http://searchstorage.techtarget.com/definition/Kilo-mega-giga-tera-peta-and-all-that"> What is Kilo, mega, giga, tera, peta, and all that? - Definition from Whatis.com</a> </li> <li> <a baynote_req="PeopleWhoReadAlsoRead" baynote_bnrank="1" baynote_guide="RecentPopular" href="http://searchsap.techtarget.com/definition/SAP"> What is SAP? - Definition from WhatIs.com</a> </li> <li> <a baynote_req="PeopleWhoReadAlsoRead" baynote_bnrank="4" baynote_guide="RecentPopular" href="http://searchnetworking.techtarget.com/definition/TCP-IP"> What is TCP/IP (Transmission Control Protocol/Internet Protocol)? - Definition from WhatIs.com</a> </li> <li> <a baynote_req="PeopleWhoReadAlsoRead" baynote_bnrank="2" baynote_guide="RecentPopular" href="http://searchcloudcomputing.techtarget.com/definition/cloud-computing"> What is cloud computing? - Definition from Whatis.com</a> </li> </ul> </div> </li> </ul> </div> </div> <div id="relatedContentHide"> </div> <div class="showMoreButton" id="showMoreRelatedContent"> <a href="#" data-close="Close"><span></span>Show me more</a> </div></div> <!-- End Dig Deeper: this is below the inline-reg split --> <div id="dateline"><p>This was first published in November 2000</p></div> <!-- End of body --> </div> <div id="articleFooter"> </div> <!-- Column FIFA start --> <div> </div><!-- end of Column FIFA --> <div id="disclaimer"> <p><strong>Disclaimer:</strong> Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk. </p> </div> <div class="pageNav"> <a href="#content" class="backToTop">Back to top</a> </div> </div> <div id="sidebar"> <div><div><!-- TMP-RightColTop, searchdomino.techtarget.com, generated at 05:29:14 Wed May 23, 2012 , by vappma12.techtarget.com --> <div id="relatedContentTechnical" class="splash editorialSplash relatedContentSplash"> <div class="splashHeader"><h4>You May Also Be Interested In...</h4></div> <div class="splashBody"> <h5>More Details</h5> <ul class="listTypeTooltip"> <li><span class="tooltipText" title="This tip describes how to view all databases in the catalog."></span><a href="http://searchdomino.techtarget.com/tip/Viewing-all-databases-in-the-catalog"> Viewing all databases in the catalog</a> </li> <li><a href="http://searchdomino.techtarget.com/answer/What-is-causing-my-XLST-servlet-problem"> What is causing my XLST servlet problem?</a> </li> </ul> </div> </div> </div> </div> <!-- null, searchdomino.techtarget.com, generated at 05:29:14 Wed May 23, 2012 , by vappma12.techtarget.com --> <!-- TMP-RightCol, searchdomino.techtarget.com, generated at 05:29:14 Wed May 23, 2012 , by vappma12.techtarget.com --> <div id="bigAd1"></div> <div id="cltAd"></div> <div id="bigAd2"></div> <div class="splash seoSplash" id="seoLinks"> </div> <div> </div><div><div></div> </div></div> <div><div><!-- TTBC-TMP-ContentFooter, searchdomino.techtarget.com, generated at 00:28:29 Mon May 21, 2012 , by vappma12.techtarget.com --> <div id="footerAdsPlacement"> <script type="text/javascript"> var cl_exclusive = "N"; function ss(w){window.status=w;return true;} function cs(){window.status='';} function ga(o,e){ if (document.getElementById){ a=o.id.substring(1); p=""; g=e.target; if(g){ t=g.id;f=g.parentNode; if(f)p=f.id; } else{t=e.srcElement.id;} if(t==a||p==a) return; location.href=document.getElementById(a).href; } } function google_ad_request_done(google_ads) { if (google_ads.length > 0) { document.write(['<a name="marketplace_top"></a>', '<div id="adGoogleFooter" class="splash adSplash on">', '<div class="adSplashContent">', '<h4><a href="https://www.google.com/adsense/support/bin/request.py?contact=abg_afc">Ads by Google</a></h4>', '<ul>', (function (ads) { var arr = []; for (var i = 0; i < ads.length; i++) { arr.push(['<li>', '<a href="' + ads[i].url + '" class="openInNewWindow">' + ads[i].line1 + '</a>', ads[i].line2 + '<br/>', ads[i].line3, '<a href="' + ads[i].url + '" class="agtUrl openInNewWindow">' + ads[i].visible_url + '</a>', '</li>' ].join("")); } return arr.join("\n"); })(google_ads), '</ul>', '</div>', '</div>' ].join("\n") ); } } if (cl_exclusive != "Y") { var google_max_num_ads = 4; document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></\script>'); } </script> </div> </div> </div></div> </div> <div id="footer"> <div><div><!-- TMP-Footer, searchdomino.techtarget.com, generated at 10:57:52 Sat May 19, 2012 , by vappma12.techtarget.com --> <div id="footerNavigation"> <div id="footerNavigationCompress"> <div class="megaMenu"> <script type="text/javascript"> (function ($) { var mm = $("#headerNavigation .megaMenu"); if (mm.length > 0) { $("#footerNavigation .megaMenu").html(mm.html()); } else { $(document).ready(function ($) { $("#footerNavigation .megaMenu").html($("#headerNavigation .megaMenu").html()); }); } })(jQuery); </script> </div> <div id="footerNavigationSearch" class="navigationSearch"> <form action="/search/query" method="get" id="footerNavigationSearchForm"> <fieldset> <label for="footerNavigationSearchTextbox" class="navigationSearchLabel">Search this site</label> <input type="hidden" name="start" value="0" /> <input type="hidden" name="filter" value="1" /> <input type="text" name="q" id="footerNavigationSearchTextbox" class="navigationSearchBox" /> <input type="submit" value="Search" id="footerNavigationSearchSubmit" class="navigationSearchSubmitButton" /> </fieldset> </form> </div> </div> </div> <div id="footerCompress"> <div id="relatedSites"> <h5>More from Related TechTarget Sites</h5> <ul id="relatedSitesNav" class="listTypeTab"> <li> <a href="#rsh-tab0">Windows IT</a> </li> <li> <a href="#rsh-tab1">AS/400</a> </li> <li> <a href="#rsh-tab2">Enterprise Linux</a> </li> <li> <a href="#rsh-tab3">Virtual Data Centre</a> </li> </ul> <ul id="relatedSitesHeadlines" class="listTypeTabContent"> <li id="rsh-tab0"> <div class="rshLogo"> <a class="searchwinit" href="http://searchwinit.techtarget.com">Windows IT</a> </div> <ul class="rshCols"> <li > <h6> <a href="http://searchwinit.techtarget.com/news/2240150383/Windows-words-of-the-week-Tired-and-retired"> Windows words of the week: Tired and retired</a> </h6> <p> Windows is dead. Long live Windows! This week, industry experts grappled with the future of Microsoft's venerable operating system, one quote at a time.</p> </li> <li > <h6> <a href="http://searchwinit.techtarget.com/tip/Understanding-management-gets-your-IT-department-what-it-needs"> Understanding management gets your IT department what it needs</a> </h6> <p> Crafting the perfect pitch can be difficult in a budget-conscious workplace. Knowing how management will react to proposals can help.</p> </li> <li > <h6> <a href="http://searchwinit.techtarget.com/news/2240149995/Whats-in-a-name-Azure-branding-confusion-and-the-meaning-of-badware"> What's in a name? Azure branding confusion and the meaning of 'badware'</a> </h6> <p> Find out why Microsoft had some questioning its mental health and what mosquitos have to do with the ongoing malware fight.</p> </li> </ul> </li> <li id="rsh-tab1"> <div class="rshLogo"> <a class="search400" href="http://search400.techtarget.com">AS/400</a> </div> <ul class="rshCols"> <li > <h6> <a href="http://search400.techtarget.com/answer/Running-AS-400-query-to-find-records-based-on-date"> Running AS/400 query to find records based on date</a> </h6> <p> Learn about a quick way of running an AS/400 query to select records based on current sysdate.</p> </li> <li > <h6> <a href="http://search400.techtarget.com/tutorial/iSeries-tutorials"> iSeries tutorials</a> </h6> <p> Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about, including i5/OS, iSeries applications, iSeries 400 basics, and OS/400-i5/OS security.</p> </li> <li > <h6> <a href="http://search400.techtarget.com/answer/Consolidation-across-multiple-LPARs-using-BRMS"> Consolidation across multiple LPARs using BRMS</a> </h6> <p> The BRMS Network feature allows a BRMS system to connect to other BRMS systems via a network, and enables a user to consolidate media such as backup tapes.</p> </li> </ul> </li> <li id="rsh-tab2"> <div class="rshLogo"> <a class="searchenterpriselinux" href="http://searchenterpriselinux.techtarget.com">Enterprise Linux</a> </div> <ul class="rshCols"> <li > <h6> <a href="http://searchenterpriselinux.techtarget.com/news/2240150452/Bug-report-reveals-Mozilla-Marketplace-wont-support-Linux-at-launch"> Bug report reveals Mozilla Marketplace won't support Linux at launch</a> </h6> <p> Mozilla Marketplace won't support Linux on release. New stable Linux kernel, version 3.4, finalized soon, says Torvalds. RHEL 7 slated for 2013.</p> </li> <li > <h6> <a href="http://searchenterpriselinux.techtarget.com/news/2240150158/Red-Hats-OpenShift-cloud-platform-gets-new-strategy"> Red Hat's OpenShift cloud platform gets new strategy</a> </h6> <p> Red Hat's OpenShift PaaS offers new strategy for the enterprise. Dell's OEM program adds Red Hat to roster.</p> </li> <li > <h6> <a href="http://searchenterpriselinux.techtarget.com/tip/Resource-allocation-with-Linux-cgroups-helps-optimize-performance"> Resource allocation with Linux cgroups helps optimize performance</a> </h6> <p> The Linux cgroups feature lets you make a profile to manage resources to keep your system under control.</p> </li> </ul> </li> <li id="rsh-tab3"> <div class="rshLogo"> <a class="searchvirtualdatacentreuk" href="http://searchvirtualdatacentre.techtarget.co.uk">Virtual Data Centre</a> </div> <ul class="rshCols"> <li > <h6> <a href="http://searchvirtualdatacentre.techtarget.co.uk/tip/VMware-vSphere-5-storage-features-Part-two"> VMware vSphere 5 storage features: Part two</a> </h6> <p> VMware vSphere 5 storage features include Storage DRS, VSA and data store clusters. IT pros can learn what these features bring to their infrastructure and how best to use them.</p> </li> <li > <h6> <a href="http://searchvirtualdatacentre.techtarget.co.uk/news/2240150439/VMware-updates-vFabric-Suite-for-cloud-automation-News-roundup"> VMware updates vFabric Suite for cloud automation: News roundup</a> </h6> <p> VMware ‘s launch of vFabric Suite 5.1 for cloud automation, Equinix’s acquisition of a colo service provider and UK SMEs’ cloud adoption are this week’s highlights.</p> </li> <li > <h6> <a href="http://searchvirtualdatacentre.techtarget.co.uk/news/2240150116/SEPA-reaps-cost-savings-running-Oracle-on-VMware"> SEPA reaps cost savings running Oracle on VMware</a> </h6> <p> SEPA’s IT team was warned of the complexities of virtualising Oracle database and apps. But strategic design and testing helped it run Oracle on VMware vSphere and reap benefits.</p> </li> </ul> </li> </ul> <span id="footerTechtargetLogo"></span> </div> </div> <div id="footerMiscLinks"> <div id="footerMiscLinksCompress"> <div id="footerCopyright"> All Rights Reserved, <a href="/about/copyright">Copyright 1999 - 2012</a>, TechTarget </div> <ul> <li><a href="/about">About us</a></li> <li><a href="/about/contact">Contact us</a></li> <li><a href="/about/index">Site index</a></li> <li><a href="http://www.techtarget.com/html/privacy_policy.html">Privacy policy</a></li> <li><a href="/about/advertising">Advertisers</a></li> <li><a href="/about/partners">Business partners</a></li> <li><a href="/events">Events</a></li> <li><a href="http://www.techtarget.com/mediakit/">Media kit</a></li> <li><a href="http://www.techtarget.com/">TechTarget corporate site</a></li> <li><a href="http://reprints.ygsgroup.com/m/techtarget">Reprints</a></li> <li><a href="/sitemap">Site map</a></li> </ul> </div> </div><div id="adjInterstitial"></div> <script type="text/javascript"> if (typeof jQuery == "function") jQuery(document).trigger("onclosebody"); </script></div> </div></div> <script> var date = new Date(); date.setTime(date.getTime()+(5*365*24*60*60*1000)); var expires = "expires="+date.toGMTString(); var name = 'cc'; var count = 'searchDomino-1'; document.cookie = name+"="+count+ ";" + expires +"; path=/"; </script><!-- Region/Component Load time =============== TMP-Head=1 TMP-LoginBand=2 TMP-Header=1 TMP-ContentHeader=2 itemRegion:eocTip=10 TTJC-TMP-Comments=2 TMP-RightColTop=35 TMP-HotTopics=3 TMP-RightCol=1 TMP-ContentFooter=2 TMP-Footer=1 End-Of-Page=0 TOTAL PAGE LOAD TIME=60 --> <!-- Request Serving Server : vappma12.techtarget.com--> <script type="text/javascript">if (!NREUMQ.f) { NREUMQ.f=function() {NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script");e.type="text/javascript";e.src=(("http:"===document.location.protocol)?"http:":"https:") + "//" + "d1ros97qkrwjf5.cloudfront.net/13/eum/rum.js";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push(["nrfj","beacon-1.newrelic.com","1068cf12f6",313780,"ZQMAYxdYXUBSAkFbClxJLFgXVFJfWhtQVjBAD00dSk1aQxxPHw==",0,126,new Date().getTime(),"","","","",""]);</script></body> </html>