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

Adding FIND to ISPF Panel display of Table


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

New User


Joined: 27 Oct 2015
Posts: 33
Location: United States

PostPosted: Mon Oct 07, 2019 5:46 pm
Reply with quote

I've figured out how to use a panel/table to display and select a line.

The panel has a command line input as well.

Since my table has a 1000s of rows, I would like to add a "FIND" command which would search the table and position the display of he table to start on that row.

I'm thinking of ways to code it but maybe there is a standard set of macros or rexx that add browse commands to a panel view of a table?
Back to top
View user's profile Send private message
Harold Barnes

New User


Joined: 27 Oct 2015
Posts: 33
Location: United States

PostPosted: Mon Oct 07, 2019 6:03 pm
Reply with quote

After a bit more googling it looks like I ca use CURSOR and CSRROW to set the row number to display.

So if I can figure out how to find which row I want, I can just set the CSRROW?

Is there a table search function? Googling...
Back to top
View user's profile Send private message
Harold Barnes

New User


Joined: 27 Oct 2015
Posts: 33
Location: United States

PostPosted: Mon Oct 07, 2019 6:12 pm
Reply with quote

It looks like TBSCAN is the command that will search a table for a string and return the row.

Am I on the right track?
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 497
Location: Denmark

PostPosted: Mon Oct 07, 2019 9:06 pm
Reply with quote

Google is fine, but you really should look in the 'ISPF Services Guide' manual.

You can use TBSCAN if you know the entire or prefix value of the variable(s) you wish to position at, otherwise you must scan through the records using TKSKIP. Whether you use TBSCAN or TBSKIP, you save the position using the ROWID(name) parameter, and use TBSKIP ROW(name) to position the display afterwards. You may have to do a TBTOP before reposition, I can't remember offhand.

Alternate you can use TBSCAN or TBSKIP with the POSITION(crpname) parameter and the reposition using TBTOP + TBSKIP NUMBER('crpname'). I looked at some of my code and it looks like I prefer the latter. I seem to remember that the ROWID parameter may cause problems if you add or delete records.

You should also look up the built-in variable ZTSTOP for reposition after a user action.
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 create table with more than 32k recor... DB2 1
No new posts Multiple find/replace on the same dat... DFSORT/ICETOOL 4
No new posts Adding a header when change data DFSORT/ICETOOL 6
No new posts Finding a semi colon (;) in ISPF TSO/ISPF 5
This topic is locked: you cannot edit posts or make replies. COBOL-Common routine that contains al... COBOL Programming 4
Search our Forums:

Back to Top