Progress bar in rpgle

420 pts.
Tags:
AS/400 jobs
AS400 Job Status
RPGLE
RPGLE Date Calculation
Hi i have created a progress bar in rpgle , i just want to know is there some way to calculate the completion % of the program . I want this as i want to show the status bar with the percentage completion .

My main program just runs 2-3 commands . So just want to know is there some way to calculate the % completion of the program at any point of time .

Progress bar will look like :

Processing(20%)..........



Software/Hardware used:
rpgle,as400
ASKED: March 14, 2011  5:24 PM
UPDATED: March 15, 2011  7:35 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You need to have a solid benchmark of how long it takes your program to ciomplete.
You may have 2 or 3 commands, but you need to know how long each takes. If the 2nd one takes an hour and the last one takes 2 minutes, that is information that must be know ahead of thime.
Next you need to know how long each piece takes and what you can use for a measurement. For instance, if you have an input file thqat has 100,000 records every 10,000 records woule be 10%, You may need to get the rcords count of the complete file and then have a counter in the program to know when you hit a milestone to adjust your progress bar.
SO I believe the simple answer is “It Depends”. You have to do your homework first and thne use that information to determine you progrress.
Hope that helps

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Teandy
    There is an example of a progress bar here: http://www.dbg400.net/foswiki/bin/view/DBG400/ProgressMeter
    5,860 pointsBadges:
    report
  • munduuu
    [...] 3. CharlieBrowne and Teandy gave some help to a member trying to create a progress bar in RPGLE. [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following