I'm trying to limit the number of rows that can be selected on an ISPF panel. I can add a panel edit, but do not have access to the underlying programming code.
The following will prevent more than 1 row from being selected, but I can't find a way to reset or ignore ZTDSELS automatically. If I manually clear the ABCDEF variable and also the selected rows and press 'enter', or exit the panel and re-enter, it works, but it's very clunky.
IF (&ABCDEF EQ Y)
IF (&ZTDSELS GT 1)
.MSG = ABC123
I'm sure this can be done easily in the program code, but does anyone know if this can be done only in the panel code?
Joined: 27 Oct 2009 Posts: 2446 Location: Netherlands, Amstelveen
ZTDTOP and ZTDSELS Variables
ZTDTOP and ZTDSELS are variables in the function pool. A command procedure
can access them directly. A program can access them through use of the VDEFINE
or VCOPY service. If a program function uses the VCOPY service to access the
variable, the value will be in character string format. It will not be in fixed binary
If the application user selected more than one row in a single interaction, the
variable ZTDSELS is 2 or greater, which indicates that selected rows remain to be
processed. These rows are called pending selected rows. A call to TBDISPL is
required to position the CRP to each pending selected row, retrieve the row from
the table, and store input fields from the corresponding model set. After the CRP is
positioned to each selected row, the function can process the row, for example, by
issuing a TBPUT request to update the table. For these calls, neither the
panel-name nor the message-id should be specified. The processing sequence for
each of these calls is as described above, except that the next selected row is
Whenever selected rows remain to be processed, the dialog can choose to ignore
them by calling TBDISPL with a specified (non-blank) panel name. This clears out
any remaining information about previous calls. If the dialog wants to display
another screen before processing pending selected rows from the first display, and
then resume processing of several selected rows from the first display, it must
invoke the CONTROL service to save and restore the display environment.