View previous topic :: View next topic
|
Author |
Message |
KeshavKunal
New User
Joined: 21 Jul 2020 Posts: 4 Location: India
|
|
|
|
Hi All,
Scroll is not working in the Panel.
As soon as I press PF7 or PF8, the panel is disappearing and next piece of code is executing.
Please help in making the scroll work.
Below is the REXX
ftblname declaration
Code: |
ftblname = 'SETFLD01'
address ispexec 'tbcreate ' ftblname ' keys(field) ' ,
' names(type len stpos)' replace |
REXX Code displaying panel and processing data entered in panel
Code: |
ztdsels = 0
cursor_loc = "CSRROW(1) CURSOR(C)"
ADDRESS ISPEXEC
"TBTOP " ftblname
"TBSKIP " ftblname
"TBDISPL " ftblname "PANEL(filtdisp) AUTOSEL(NO)" cursor_loc
do while ztdsels > 0
<<<<<codes for further processing>>>>>
ztdsels = ztdsels - 1
if ztdsels > 0 then "TBDISPL " ftblname
end |
FILTDISP PANEL
Code: |
)attr
* area(scrl) extend(on)
$ type(input) hilite(uscore) color(green) caps(on)
+ type(text) intens(high) color(turq) skip(on)
# type(text) intens(high) color(blue) skip(on)
% type(output) intens(high) color(blue)
)body
+ COMMAND===> $ZCMD / /+SCROLL ===> $AMT+
+
+-----------------------------------------------------------
!Option Fieldname Operator(Default - OR)
+-----------------------------------------------------------
)MODEL ROWS(&rowscan)
$c# %field $op #
)init
&amt = csr
)proc
&keypress = .PFKEY
)end |
|
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
A quick test worked for me. Are you sure that pf7 and pf8 are set correctly? Try the UP and DOWN commands instead.
You are missing the EXPAND(//) parameter in the BODY statement, an attribute definition for '!' and a title line, but that is not the cause for the problem. |
|
Back to top |
|
|
KeshavKunal
New User
Joined: 21 Jul 2020 Posts: 4 Location: India
|
|
|
|
PF7 or PF8 (or UP/DOWN) is working fine when nothing is typed in the fields (Option & Opeartor)
As soon as data is entered and PF7/PF8 is pressed, screen is disappearing
Willy Jensen wrote: |
A quick test worked for me. Are you sure that pf7 and pf8 are set correctly? Try the UP and DOWN commands instead.
You are missing the EXPAND(//) parameter in the BODY statement, an attribute definition for '!' and a title line, but that is not the cause for the problem. |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2545 Location: Silicon Valley
|
|
|
|
Quote: |
As soon as something is typed and PF7/PF8 is pressed, screen is disappearing |
When you touch one of the rows, that causes your ztdsels loop to be executed so that you can process the information.
You need your first TBDISPL to be inside another DO WHILE loop so that the panel is displayed again after the rows are processed. Do while RC=0, I think. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Quote: |
As soon as data is entered |
You did not mention that in your original post. As Pedro says, that is why the TBDISPL terminates. UP or DOWN alone do not terminate TBDISPL. Pedro's solution is the correct one. |
|
Back to top |
|
|
|