View previous topic :: View next topic
|
Author |
Message |
packerm
New User
Joined: 15 Jan 2016 Posts: 7 Location: uk
|
|
|
|
Hi
There are various topics about ISPF screens that auto update and how to use ATTN to "break in" to the screen.
We have a panel that is invoked from REXX and we are trying to introduce an auto update function. Two main questions we're struggling with
Is the ATTN key the only way of breaking the loop. I'm assuming the answer to this is yes as there doesn't seem to be a way to allow the user to key a keyword that can then be picked up in the code, e.g. "quit"?
If we have to use the ATTN key how do we supress the "HI TO END..." message that comes out? I assume this must be possible as SDSF manages it OK but maybe that's not using REXX??
We have tried playing with "signal on halt" to try and capture the ATTN but you still get the HI TO END message.
Extract from code is case it helps
do i = 1 to cycle
TC = i
cyclem = 'In auto update mode. Updating every' interval,
'seconds. Cycle' i 'of' cycle
"CONTROL DISPLAY LOCK"
"DISPLAY PANEL(MAGTAC1)"
"VGET (ZCMD) PROFILE"
if zcmd = 'Q' then signal redisp
LOITER = Opswait(interval)
call GetAllSum
timen = TIME()
end
Please use the code tags when presenting code/data/anything requiring fixed format. I have done it for you this time (below). Note the differences.
Code: |
do i = 1 to cycle
TC = i
cyclem = 'In auto update mode. Updating every' interval,
'seconds. Cycle' i 'of' cycle
"CONTROL DISPLAY LOCK"
"DISPLAY PANEL(MAGTAC1)"
"VGET (ZCMD) PROFILE"
if zcmd = 'Q' then signal redisp
LOITER = Opswait(interval)
call GetAllSum
timen = TIME()
end |
|
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
Not in REXX, or at least not without writing an attention routine. But CLIST can handle attentions, so the following works for me:
REXX code
Code: |
address tso "%ZZXW2" /* call timer clist */
if rc<>0 then leave /* get out of loop */ |
CLIST ZZXW2
Code: |
PROC 0
CONTROL NOPROMPT FLUSH
ATTN EXIT CODE(1)
WAIT 2
EXIT CODE(0) |
This is one of the very few situations where I find that CLIST still has it's use. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
I should perhaps mention that the WAIT program is a local program, but most sites will have a similar one. |
|
Back to top |
|
|
|