BlackF6 Beginner
Joined: 10 Jun 2004 Posts: 1 Topics: 1
|
Posted: Thu Jun 10, 2004 9:33 am Post subject: TBDISPL with AUTOSEL(YES) |
|
|
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:
Code: |
"TBCREATE MYTAB NAMES(TENTRY) NOWRITE"
TENTRY = "ENTRY 1"
"TBADD MYTAB"
TENTRY = "ENTRY 2"
"TBADD MYTAB"
TENTRY = " "
"TBADD MYTAB"
TENTRY = " "
"TBADD MYTAB"
|
then displayed:
Code: |
"TBDISPL MYTAB PANEL(PAN1) CSRROW(1) AUTOSEL(YES)"
|
The panel is displayed and I see:
Code: |
Command ===>
table follows:
===> ENTRY 1
===> ENTRY 2
===>
===>
|
If I then enter a value in the 2 blank rows, like:
Code: |
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"
Code: | "TBDISPL MYTAB CSRROW(2) AUTOSEL(YES)" | returns rc 4 and row "xyz".
Code: | "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:)
Code: |
)Body
% Command ===>!ZCMD
% table follows:
)Model
% ===> !TENTRY
)Init
.AUTOSEL = YES
)Reinit
.AUTOSEL = YES
)Proc
)End
|
|
|