Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reading a value from a panel

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Reading a value from a panel
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

Moderator Team Head


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

PostPosted: Wed Jul 09, 2008 6:06 pm    Post subject: Reply to: Reading a value from a panel
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    Post subject: Reply to: Reading a value from a panel
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

Moderator Team Head


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

PostPosted: Wed Jul 09, 2008 6:15 pm    Post subject: Reply to: Reading a value from a panel
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    Post subject: Reply to: Reading a value from a panel
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: 2360
Location: Israel

PostPosted: Thu Jul 10, 2008 11:43 am    Post subject:
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    Post subject: Reply to: Reading a value from a panel
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

Senior Member


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

PostPosted: Thu Jul 10, 2008 9:41 pm    Post subject: Reply to: Reading a value from a panel
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    Post subject: Reply to: Reading a value from a panel
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

Senior Member


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

PostPosted: Sat Jul 12, 2008 10:41 am    Post subject: Reply to: Reading a value from a panel
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

Senior Member


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

PostPosted: Sat Jul 12, 2008 9:15 pm    Post subject: Reply to: Reading a value from a panel
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    Post subject: Reply to: Reading a value from a panel
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    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 Need help in reading and validating a... ABINAYATHULASI COBOL Programming 8 Tue Apr 18, 2017 11:42 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us