Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 subfiles - determine which is 'active'

Status
Not open for further replies.

GAORR

Programmer
Nov 22, 2001
48
CA
Suppose I have 2 subfiles on a screen. I need to determine which subfile the cursor is on (active) when a key is pressed by the user. Can this be done ?
Thanks in advance for you help.
 
I know this can be done, I have seen it in the past. Unfortunatly, I don't have an example or remember how to do it myself. Look in the IBM manuals, that should help you figure it out.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Code:
 FMyFileFm  cf   e             workstn sfile(sfl02:wkrrn) 
F                                     infds(InfDs)       
DInfDs            ds                                     
D CCur                  370    371b 0    
...
C     CCur          div       256           crow              4 0 
C                   mvr                     ccol              4 0
"crow" contains the line # where the cursor is and "ccol" the column #.
You could also use the DDS kwd RTNCSRLOC(&CSRRCD &CSRFLD) but IMHO this "old method" is the easiest way to rapidly get what you want.
hth -- Philippe --




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top