The code as posted had a typo (SFLBB overlaid SFLAA). I added the little bit of glue to make it compile and ran it on IBM i 7.1. My machine is current with PTFs. Runs as expected. Here is the complete code:
DDS:
A DSPSIZ(24 80 *DS3)
A MOUBTN(*ULP CF06)
A R SFLAA SFL
A RRN1 4Y 0O 4 11EDTCDE(Z)
A R CTLAA SFLCTL(SFLAA)
A SFLSIZ(9999)
A SFLPAG(0003)
A CF03(03)
A OVERLAY
A SFLCSRRRN(&ARRN)
A 10 SFLDSP
A SFLDSPCTL
A N10 SFLCLR
A 11 SFLEND(*MORE)
A ARRN 5S 0H
A 3 2'SFLAA'
A R SFLBB SFL
A RRN2 4Y 0O 9 11EDTCDE(Z)
A R CTLBB SFLCTL(SFLBB)
A SFLSIZ(9999)
A SFLPAG(0003)
A OVERLAY
A* Doesn't work
A SFLCSRRRN(&BRRN)
A 15 SFLDSP
A SFLDSPCTL
A N15 SFLCLR
A 16 SFLEND(*MORE)
A BRRN 5S 0H
A* Doesn't work BRRN2 5S 0H SFLSCROLL
A 8 2'SFLBB'
And RPG:
fsotest cf e workstn sfile(sflaa: rrn1)
f sfile(sflbb: rrn2)
f infds(cusloc)
dcusloc ds
d rowcol 370 371b 0
drow# s 10i 0 inz(0)
dcol# s 10i 0 inz(0)
c/free
*in10 = *off; // SFLDSP AA
*in15 = *off; // SFLDSP BB
write ctlbb;
write ctlaa;
*in10 = *on; // SFLDSP AA
*in15 = *on; // SFLDSP BB
for rrn1 = 1 to 5;
rrn2 = rrn1;
write sflaa;
write sflbb;
endfor;
dow 1=1;
write ctlbb;
exfmt ctlaa;
if *in03;
*inlr = *on;
leave;
endif;
exsr mouse_sr;
enddo;
begsr mouse_sr;
row# = rowcol / 256;
col# = %rem(rowcol: 256);
select;
when row# >= 4 and row# <= 6;
chain arrn sflaa;
if %found();
// exsr detail1_sr;
endif;
when row# >= 9 and row# <= 11;
ADD THE FOLLOWING LINE
read ctlbb; // to get SFLRRN
chain brrn sflbb;
if %found();
// exsr detail2_sr;
endif;
endsl;
endsr;
/end-free
I run it in debug and look at row# and col# at the SELECT and they always look OK. See if you have the same results with this test code (both named SOTEST). If this test code runs as expected, the problem in the production code probably isn't row/column. If this test code exhibits incorrect row/column numbers, check your PTF levels. If current, call it in as a bug.
EDIT: I misunderstood the problem. RPG will fill in the I/O fields (like SFLCSRRRN) from the control record only when the control record is READ. The EXFMT handles this for CTLAA. In order to handle it for the other control records, insert a READ inside the calculations where you've determined which subfile the user is in.