View previous topic :: View next topic
|
Author |
Message |
geet16
New User
Joined: 22 Dec 2006 Posts: 24 Location: USA
|
|
|
|
Hi,
This is what our requirement is:
we have a panel for the following format:
SEL ID COMP STATE
----- ---- ----- ----
S___ 0001 XYZ NY
____ 0004 XYZ XX
When i enter 'S' and press enter, i am taken to another screen which in turn gives me the details. Here for selecting the details, I require the value of ID to extracted.
I tried searching the forum but didnot find any links, my apologies if this query has been posted earlier!!
Any pointers will be appreciated!! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Can we presume that the variables for SEL, ID, COMP and STATE are table rows and that the panel is being displayed via the TBDISPL service? |
|
Back to top |
|
|
geet16
New User
Joined: 22 Dec 2006 Posts: 24 Location: USA
|
|
|
|
Hi,
Thank you for quick response!!
Yes,Values for ID, COMP and STATE are are table rows and that the panel is being displayed via the TBDISPL service.
But value of SEL is entered by user to select a particular id. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
When you select a table row via the TBGET service, all of the variables defined to that row are returned to the function pool If the NOREAD parameter is not specified. |
|
Back to top |
|
|
geet16
New User
Joined: 22 Dec 2006 Posts: 24 Location: USA
|
|
|
|
Hi,
Thank you for the pointer regarding TBGET.
for the scenario mentioned above post
Using the following command:
IF WS-OSELECT = 'S'
CALL ISPLINK USING TBGET TBLRATE
WS-TBGET NOREAD
means values present in TBLRATE will be read into WS-TBGET.
kindly confirm my understanding. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You don't need anything if you select rows from a table displayed in a panel. The minute you SELECT a row, all the columns' values are populated in the equivalent ISPF variable (I believe ISPF issues an implicit TBGET), and you can refer them directly.
O. |
|
Back to top |
|
|
geet16
New User
Joined: 22 Dec 2006 Posts: 24 Location: USA
|
|
|
|
hi,
in our case, the value is present is the value retrieved during the last cursor operation.
Also, i checked when we 'S' the value remains the same i.e. the one retrieved during the last cursor operation.
Kindly advise!! |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Please read the ISPF Services Guide for more information about TBGET.
Code: |
CALL ISPLINK USING TBGET TBLRATE
WS-TBGET NOREAD |
I think your use of 'NOREAD' is contrary to your goal of reading from the table. |
|
Back to top |
|
|
geet16
New User
Joined: 22 Dec 2006 Posts: 24 Location: USA
|
|
|
|
Hi,
i tried without NOREAD but i still didnot get any value in WS-TBGET.
CALL SPF-ISPLINK USING SPF-TBGET TBLRATE
WS-TBGET
I am not sure what i am missing. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Sorry, I am not familiar with the format of the call... cobol?
Can you show how WS-TBGET is defined and how it is related to ID, COMP and STATE ? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Actually, I do not think you need to use TBGET.
Use TBDISPL with PANEL parm to display your table. Afterwards, your variables wlll be filled with values from the selected row.
Variable ZTDSELS tells how many rows were selected.
Use TBDISPL without PANEL parm to get additional selected rows. Call TBDISPL until ZTDSELS =0. |
|
Back to top |
|
|
geet16
New User
Joined: 22 Dec 2006 Posts: 24 Location: USA
|
|
|
|
Thank You for your help. I was able to get the results i wanted by following your suggestions regarding TBDISPL.
Thank You once again!!! |
|
Back to top |
|
|
|