Page 1 of 1

Progress Bar while running a program under ISPF

PostPosted: Sat Dec 13, 2008 12:41 am
by Gilles
Is it possible, while running a program under ISPF to display a panel that would appear as a progress bar like we see in so many windows applications ?

Re: Progress Bar

PostPosted: Sat Dec 13, 2008 1:08 am
by MrSpock
Sure, why not. I've seen that done with some third-party products.

Re: Progress Bar while running a program under ISPF

PostPosted: Sat Dec 13, 2008 2:08 am
by Gilles
I'd be interested to know how it's done at the panel level to see if I can code one. Would anybody have such an example by any chance ?

Re: Progress Bar while running a program under ISPF

PostPosted: Mon Dec 15, 2008 8:24 pm
by Bill Dennis
I don't have an example but I believe it's done by updating a variable and redisplaying the panel in "input locked" mode so the user can't enter new commands. Perhaps the ISPF Dialog Developers Guide has some examples.

Re: Progress Bar while running a program under ISPF

PostPosted: Tue Dec 16, 2008 12:13 am
by MrSpock

Re: Progress Bar while running a program under ISPF

PostPosted: Tue Dec 16, 2008 1:26 am
by Gilles
Thanks for your input. I've managed to make a very crude progress bar with a dynamic area inside a panel. It obviously could use some improvement but I can live with that for my small project. I just put it out here in case it can help somebody or if a better way can be found starting from what I've done.

The Panel DYNAREA

)ATTR
# AREA(DYNAMIC)
/ TYPE(CHAR) INTENS(HIGH) COLOR(GREEN) HILITE(REVERSE)
)BODY WINDOW(50,1)
#SAREA,SHADOW -----------------------------------#
)END

The REXX DYNAREA

/* REXX */

SAREA = ' '
SHADOW = ''

ADDRESS 'ISPEXEC'
"ADDPOP ROW(05) COLUMN(10)"

DO K=1 TO 50
SHADOW = SHADOW || '/'
"CONTROL DISPLAY LOCK"
"DISPLAY PANEL(DYNAREA)"
DO L=1 TO 20000
END
END

"REMPOP"

EXIT