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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TBDISPL with AUTOSEL(YES)

Status
Not open for further replies.

BlackF6

Programmer
Jun 10, 2004
4
US
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
 
That's spooky! Another good reason for not using AUTOSEL...

I've been writing dialogs for about 18 yrs (12 yrs where I got paid specifically for doing that) and I have not yet found a need for AUTOSEL. What is it, at a high level, you're trying to do?


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Spooky indeed -- did you try it?

I have 2 values that I'm getting from another source.
I have represented these as 'entry 1' and 'entry 2'.
I want to present to the user a screen that has these 2 values and 2 blank line.
They can type over these 2 pre-supplied values, or leave them as is. They can also put data into those 2 blank lines.

I want to then get these 1-4 lines; 2 pre-supplied (whether the user modified them or not) + the data the user put in the blank lines.

Got a better way to share with me?

Thanks!
 
I should add that I do want these 4 values to be in a table, as 4 is just the number for now. As I develop this, I expect this will be a scrollable, very long table -- with the first 1 or 2 or 10 values pre-filled-in by my program.
 
What happens if you change the values in one of the pre-set entries?

I'll tell you what I'm driving at: You may have seen one of the pre-sets only because your cursor was sitting on that line; there would be no reason for table processing to identify the line for handling otherwise.

Regardless, those two pre-set lines (actually, al four) are already in the table. If any of them comes in from table processing, just TBMOD it to the table whether it changed or not.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
rexxhead,

Thanks for your help. I gave up. Since I always wanted all rows to be selected, and I'm handling errors in a unique way, I skipped the whole TBDISP approach and went with TBSKIP.

Working fine now....

Thanks again!
 
Don't call it "giving up"; call it "finding the solution".


Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top