I have an ISPF Panel that is displayed using TBDISPL. I then retrieve rows from a )Model table using TBDISPL without a panel name. I am programmatically adding rows to the table before the display. I want the user to be able to just press enter to signal that I am to process these rows.
For instance:
the table is set up as:
"TBCREATE MYTAB NAMES(TENTRY) NOWRITE"
TENTRY = "ENTRY 1"
"TBADD MYTAB"
TENTRY = "ENTRY 2"
"TBADD MYTAB"
TENTRY = " "
"TBADD MYTAB"
TENTRY = " "
"TBADD MYTAB"
then displayed:
"TBDISPL MYTAB PANEL(PAN1) CSRROW(1) AUTOSEL(YES)"
The panel is displayed and I see:
Command ===>
table follows:
===> ENTRY 1
===> ENTRY 2
===>
===>
If I then enter a value in the 2 blank rows, like:
Command ===>
table follows:
===> ENTRY 1
===> ENTRY 2
===> xyz
===> 123
and press enter
I get RC 4 from the TBDISPL, and ZTDELS is 3. I expected ZTDSELS to be 4. The returned row is "ENTRY 1"
"TBDISPL MYTAB CSRROW(2) AUTOSEL(YES)" returns rc 4 and row "xyz".
"TBDISPL MYTAB CSRROW(3) AUTOSEL(YES)" returns rc 0 and row "123".
Why is the first "ENTRY 1" returned, but "ENTRY 2" is not?
(The panel def is
)Body
% Command ===>!ZCMD
% table follows:
)Model
% ===> !TENTRY
)Init
.AUTOSEL = YES
)Reinit
.AUTOSEL = YES
)Proc
)End
For instance:
the table is set up as:
"TBCREATE MYTAB NAMES(TENTRY) NOWRITE"
TENTRY = "ENTRY 1"
"TBADD MYTAB"
TENTRY = "ENTRY 2"
"TBADD MYTAB"
TENTRY = " "
"TBADD MYTAB"
TENTRY = " "
"TBADD MYTAB"
then displayed:
"TBDISPL MYTAB PANEL(PAN1) CSRROW(1) AUTOSEL(YES)"
The panel is displayed and I see:
Command ===>
table follows:
===> ENTRY 1
===> ENTRY 2
===>
===>
If I then enter a value in the 2 blank rows, like:
Command ===>
table follows:
===> ENTRY 1
===> ENTRY 2
===> xyz
===> 123
and press enter
I get RC 4 from the TBDISPL, and ZTDELS is 3. I expected ZTDSELS to be 4. The returned row is "ENTRY 1"
"TBDISPL MYTAB CSRROW(2) AUTOSEL(YES)" returns rc 4 and row "xyz".
"TBDISPL MYTAB CSRROW(3) AUTOSEL(YES)" returns rc 0 and row "123".
Why is the first "ENTRY 1" returned, but "ENTRY 2" is not?
(The panel def is
)Body
% Command ===>!ZCMD
% table follows:
)Model
% ===> !TENTRY
)Init
.AUTOSEL = YES
)Reinit
.AUTOSEL = YES
)Proc
)End