Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rexx coding for Scrollable Dynamic panels

Status
Not open for further replies.

Bartym

Programmer
Jan 22, 2007
9
GB
I'm trying to write a rexx application to display variable output. I was hoping that defining a panel with a dynamic area,which was scrollable, would allow the panel to navigate up and down without returning to rexx. However, when using PF8(down) & PF7(UP) control is returned to the rexx application. Is my understanding of dynamic areas incorrect, must the rexx application control the scrolling ?

Regards

Barry

test rexx program :-
/*REXX*/
Lines = 50
GRDYN = COPIES(' ',80*Lines)
count = 0
DO WHILE count < Lines
count = count + 1
sPos = ((Count - 1)*80) + 1
ePos = count * 80
GRDYN = overlay('1',GRDYN,sPos)
GRDYN = overlay('2',GRDYN,ePos)
END
/**************************************
"ISPEXEC display PANEL(DYNAM)"
"ispexec vget (zcursor zcsroff zscreenw)"
/**************************************
SAY FDCSRFLD
SAY FDCSRPOS
say FDLINES
EXIT

Panel

)ATTR DEFAULT(%+!)
¦ AREA(DYNAMIC) extend(on) SCROLL(ON)
)BODY EXPAND(//) WIDTH(&ZSCREENW)
%----- Relationship Display -/-/--------------
%Command ===>!zcmd +/ / %SCROLL ===>!SC +
¦GRDYN / / ¦
)INIT
)PROC
&FDCSRFLD = .CURSOR
&FDCSRPOS = .CSRPOS
&FDLINES = LVLINE(GRDYN)
)END
 
Something's badly broken. UP and DOWN are handled by ISPF. REXX shouldn't be involved until END or ENTER returns control to it.

Is it possible you're dealing with a profile where PF7 and PF8 have different meanings?

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Checked KEYS - PF7 set to UP & PF8 set to DOWN.

Number of PF Keys . . . 24

PF1 . . . HELP
PF2 . . . SPLIT
PF3 . . . END
PF4 . . . END
PF5 . . . find
PF6 . . . RCHANGE
PF7 . . . up
PF8 . . . down
PF9 . . . SWAP
PF10 . . LEFT
PF11 . . RIGHT
PF12 . . RETRIEVE
 
It's trace-time....

Start TRACE by
Code:
===> tso executil ts
(trace start). End it by
Code:
===> tso executil te
(trace end).

Find out what RC is being set by PF7/8 and what (if anything) is coming back to the program.

I hope you have also done
Code:
address ISPEXEC "CONTROL ERRORS RETURN"

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
RC after panel display is 0 for PF7/PF8 and 8 from PF3.

Using PF8 placing cursor in the dynamic area sets the following

.CURSOR is set to GRDYN (the dynamic variable)
.CSRPOS is set to 175 (relative position)
LVLINE(GRDYN)is set to 30

The variables are as expected

I took the SCROLL(ON) EXPAND(ON) off the AREA(DYNAMIC) statement and got the same behaviour.
 
I'm stumped. I've never seen this behavior before.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Checked the IBM manuals. It implies that the scrolling is handled by the REXX application not the Panel. The SCROLL(ON) appears to allow scrolling info to be passed back to the rexx to then control the scrolling.

I had originally thought that if the variable was greater than the screen definition then scrolling would take place within the panel, the same as a TBDISPL.

Does anyone have a working example of a DYANMIC(AREA) with scrolling control ?

I have a link to the IBM manual which I'll post tomorrow when I get back to work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top