MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to know the line number a cursor is on in browse session

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Wed May 26, 2010 8:18 am    Post subject: How to know the line number a cursor is on in browse session Reply with quote

I would like to be able to determine the record number my cursor is on within a browse session.

Not the line number on the screen. The record number within a file. Is there any good algorithm to do this?

In edit or view mode, this is easy. With files that are too large and are in browse mode, I haven't found a consistent way to determine this.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed May 26, 2010 3:52 pm    Post subject: Reply with quote

jim haire,

Did you look at this?

CURSOR-BASED BROWSE MACRO - defined in ISPF ISPEXEC library as CB


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed May 26, 2010 10:57 pm    Post subject: Reply with quote

trying to get the line # will be tricky. You probably have to go against variables ZSCREENI and ZSCREENC but even that has idiosyncrasies that are hard to predict (things like split screen, PFSHOW ON/OFF, action bars, how the exec is started, etc).

Best bet is probably to create your own browse panel and vput line# at the top and the cursor offset to the profile pool. Then calculate the line # based on screen width (another effort plagued with odd idiosyncrasies, unfortunately)
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group