Page 1 of 1

question on PF10/11 behaviour

PostPosted: Thu Feb 09, 2012 10:38 pm
by ronners
Dear people
I call TBDISPL to display a table. The fixed area and the table area both have some scrollable fields. When the cursor is in one of the scrollable fields and I hit PF11 (say), the data in the fields scrolls right appropriately and control does not return from TBDISPL.

When the cursor is -not- in a scrollable field, I get msg ]"RIGHT " is not active.

Without losing the ability to scroll left/right when the cursor -is- in a scrollable field, is there any way I can get control to return to caller when the cursor is -not- in a scrollable field?

All kind suggestions appreciated
Ron Masters

Re: question on PF10/11 behaviour

PostPosted: Fri Feb 10, 2012 6:22 pm
by Schlabb
Hi Ron,

try to define an additional dynamic area on your panel. This actually needs no content, but assures that ISPF returns "UP" or "DOWN" in variable ZVERB when the according function keys have been used.
Just add this to your )ATTR section:
~ AREA(DYNAMIC)  EXTEND(ON)   SCROLL(ON)

Then position the field anywhere on your panel:
)BODY
Command ===>_Z     
~DUMMY~
)INIT
&DUMMY=&Z

In your REXX program you should read the variables immediately after the TBDISPL
"ISPEXEC VGET (ZVERB ZSCROLLA ZSCROLLN)"

ZVERB contains the scroll direction, ZSCROLLA the scroll amount, and ZSCROLLN the number of lines to scroll.

For further details read the corresponding manuals.

Re: question on PF10/11 behaviour

PostPosted: Fri Feb 10, 2012 8:51 pm
by ronners
Thanks for the suggeestion
I tried but it blew up on me
ZERRLM = "Scrollable" or "extendable" area not allowed in a table display panel.

Re: question on PF10/11 behaviour

PostPosted: Fri Feb 10, 2012 10:44 pm
by Pedro
I have a panel with a scrollable field in the static area and on the model line of the panel and it works as desired.

What worked for me was adding RIGHT and LEFT to the application command table, as PASSTHRU. Apparently, when the cursor is in a scrollable field, ISPF handles the scrolling without returning control to the application (without PASSTHRU). When the cursor is somewhere else, the PASSTHRU is honored and the application program sees RIGHT and LEFT. You have to add logic to check ZCMD and to do the horizontal scrolling. I do it by changing the panel name to see a different view of the table.

Use ISPF option 3.9 to create a command table. To use the application command table, you have to specify the NEWAPPL parm:
"SELECT CMD(%myexec) NEWAPPL(USR)"