IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reading a value from a panel


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
geet16

New User


Joined: 22 Dec 2006
Posts: 24
Location: USA

PostPosted: Wed Jul 09, 2008 6:01 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jul 09, 2008 6:06 pm
Reply with quote

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
View user's profile Send private message
geet16

New User


Joined: 22 Dec 2006
Posts: 24
Location: USA

PostPosted: Wed Jul 09, 2008 6:09 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jul 09, 2008 6:15 pm
Reply with quote

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
View user's profile Send private message
geet16

New User


Joined: 22 Dec 2006
Posts: 24
Location: USA

PostPosted: Thu Jul 10, 2008 11:32 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jul 10, 2008 11:43 am
Reply with quote

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
View user's profile Send private message
geet16

New User


Joined: 22 Dec 2006
Posts: 24
Location: USA

PostPosted: Thu Jul 10, 2008 12:19 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Jul 10, 2008 9:41 pm
Reply with quote

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
View user's profile Send private message
geet16

New User


Joined: 22 Dec 2006
Posts: 24
Location: USA

PostPosted: Fri Jul 11, 2008 2:51 pm
Reply with quote

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. icon_sad.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sat Jul 12, 2008 10:41 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sat Jul 12, 2008 9:15 pm
Reply with quote

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
View user's profile Send private message
geet16

New User


Joined: 22 Dec 2006
Posts: 24
Location: USA

PostPosted: Mon Jul 14, 2008 7:18 pm
Reply with quote

Thank You for your help. I was able to get the results i wanted by following your suggestions regarding TBDISPL. icon_smile.gif

Thank You once again!!!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Call program, directly from panel CLIST & REXX 9
No new posts Rexx program reading a DSN then write... CLIST & REXX 4
Search our Forums:

Back to Top