Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to disallow selection of more than 1 row on a panel.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
David Hadden

New User


Joined: 16 Mar 2010
Posts: 1
Location: Virginia

PostPosted: Mon Mar 22, 2010 7:09 pm    Post subject: How to disallow selection of more than 1 row on a panel.
Reply with quote

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.

Code:
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?
Back to top
View user's profile Send private message

Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Mon Mar 29, 2010 9:40 am    Post subject: Reply to: How to disallow selection of more than 1 row on a
Reply with quote

If only one row is to be selected from the panel, you can LIST the options in the panel and allow the user to select only one option from the LIST. Hope the below example helps.

)ATTR
? TYPE(NEF)
% TYPE(TEXT) INTENS(HIGH)
)BODY EXPAND($$) WINDOW(60,13)
%$-$SELECTION PANEL$-$
+
+ Select Option :?Z
+1.OPTION1
+2.OPTION2
+3.OPTION3
+4.OPTION4
+
+
)INIT
.ZVARS = '(SELECT)'
&SELECT = ''
)PROC
VER (&SELECT,LIST,1,2,3,4)
VER (&SELECT,NB)
)END
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 29, 2010 1:20 pm    Post subject:
Reply with quote

Ranjithkumar

What has your reply got to do with the original question. The original question is regarding the display and selection from ISPF tables.

Please explain to me where your solution deals with the ISPF table.

Dave, not sure if this will help, I can not try this as I'm not back in the office until Wednesday, but in the PROC section of the panel
Code:
)PROC
  IF (&ZTDSELS > 1)
   &ZTDSELS = 1

Might be worth a go. Or maybe looking at the execution of REXX within the panel to reset the count.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1247
Location: Israel

PostPosted: Mon Mar 29, 2010 1:57 pm    Post subject: Reply to: How to disallow selection of more than 1 row on a
Reply with quote

Good thinking, expat.
"&ZTDSELS = 1" worked well on the test case I built last week.
I tried a few other things before but couldn't find the solution.

Ranjithkumar, good thinking too, but you missed 2 things:
In addition to the table thing, one condition is:
David Hadden wrote:
I can add a panel edit, but do not have access to the underlying programming code
in that case, the data received by the program must remain unchanged.
And your proposition won't work! icon_sad.gif
Back to top
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Mon Mar 29, 2010 2:04 pm    Post subject:
Reply with quote

@expat & Marso

yep i missed that.. Thanks for pointing out icon_smile.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2442
Location: Netherlands, Amstelveen

PostPosted: Mon Mar 29, 2010 2:09 pm    Post subject:
Reply with quote

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
format.
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
processed.
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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Trace in CLIST PANEL cvnlynn CLIST & REXX 1 Thu Jun 22, 2017 11:06 pm
No new posts SCLM -- not installed -- panel ISRNOSLM dmitchell1105 IBM Tools 3 Fri Jun 09, 2017 10:41 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
No new posts Design of ISPF panel prino TSO/ISPF 2 Wed Jan 25, 2017 10:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us