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.
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 --
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.