Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

iSeries / AS400 FAQ : Programming : RPG : How can I show a progress bar for a long running process?

0
Posted

iSeries / AS400 FAQ : Programming : RPG : How can I show a progress bar for a long running process?

0

Q. I want to display a progress bar (or “Working…” window) for a long-running interactive process. What I’m doing: SETON indicator for “CALCULATING” to display WRITE subfile control record (should display at this point) DO LOOP Nothing displays! A. John Carr submitted this in Jul 1997: I believe that if you have a display file which is DFRWRT(*NO) then whenever you do a WRITE to a format (maybe something like; WRITE HEADING WRITE CMDS WRITE MSGSFL EXFMT SFLCNTRL OS/400 will do each I/O IMMEDIATELY when the WRITE is encountered. Your program goes into a WAIT STATE (while still in an activity slot) each time this happens. VERY EXPENSIVE. (Especially remotely attached) It’s like taking the groceries out of the car into the house by carrying each item separately one at a time. If you do the same thing with the display file DFRWRT(*YES), OS/400 will “bundle up or buffer up” all the writes UNTIL it sees an Input/Output operation like a READ or EXFMT.

0

Q. I want to display a progress bar (or “Working…” window) for a long-running interactive process. What I’m doing: SETON indicator for “CALCULATING” to display WRITE subfile control record (should display at this point) DO LOOP Nothing displays! A. John Carr submitted this in Jul 1997: I believe that if you have a display file which is DFRWRT(*NO) then whenever you do a WRITE to a format (maybe something like; WRITE HEADING WRITE CMDS WRITE MSGSFL EXFMT SFLCNTRL OS/400 will do each I/O IMMEDIATELY when the WRITE is encountered. Your program goes into a WAIT STATE (while still in an activity slot) each time this happens. VERY EXPENSIVE. (Especially remotely attached) It’s like taking the groceries out of the car into the house by carrying each item separately one at a time. If you do the same thing with the display file DFRWRT(*YES), OS/400 will “bundle up or buffer up” all the writes UNTIL it sees an Input/Output operation like a READ or EXFMT. When it encounters that opcode it write

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.