Progress Meter - pseudo-graphical display of progress for 5250 screens.

Details for DBG202R4

This simple program generates something to look at while your routine makes its way through a file. Maybe you have a subfile load that takes quite a while, and your users don't know if it's still processing or has hung. Adding a progress meter shows something is still happening, and gives a reasonable indication of how quickly it is going.

The program sends *STATUS messages for interactive jobs, and *INFO messages to the job log for batch jobs. That way you can easily see how a long running background job is getting on. As there is just a single program (no display file required) with just three parameters, it's very easy to add to your routines. A sample RPGIV source member is included to show one way of using the program, calculating the progress through the main file read loop, and invoking the progress meter every time another one percent of records has been completed. A simple CL program, TESTPRGMTR, has also been included, so you can see the effect straight away. You can also just call the program at fixed points during your routine, passing an relative percentage value at each stage (20, 40, 60, etc).

DBG202R4 Parameters

  • Percentage (3P 0) - a value between 0 & 100
  • Text (20A) - a bit of text to put at the start of the message
  • Marker (1A) - Either a character to use in the progress bar (# is a good one to use) or a reverse image attribute to set the colour of a solid progress bar. See the sample code (METEREXMPL) for the colours you can use.



Using the demo program to simulate part way through a file in an interactive session


Almost last wink


Choose from a wide range of colours for a solid progress bar - well, green, white, turquoise, yellow, red, pink and blue anyway. The latter three colours may blink on a mono display, so yellow might be a good compromise (in that it doesn't blink in mono - not that you'll get yellow in monochrome wink


Looking at the job log of a batch routine, to see how it's getting on

download Download

zip (13k)

This tool is packed in the CMD.xml format that my more recent utilities are packaged in. Unzip the download package and follow the XML installation instructions, also included at the start of the progress.xml file. If you already have Craig Rutledge's XML extract routine installed (or the XMLPREVIEW routine), then you should be familiar with the process.
Topic revision: r4 - 30 Aug 2011 - 18:41:13 - MartinRowe
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DBG/400? Send feedback