Hello All. I am sure that this question has already been answered somewhere but I am not able to find the answer so please bear with me. My DDS contains 4 records 1) MAP1 RECORD 2)MAP1S SFL 3)MAP1C SFLCTL 4) MAP1S MAP2 RECORD
Map1 contains fields that are used to filter the results to be displayed in the subfile. My program edits the subfile and if I find an error I want to position the cursor on the field in the subfile record that is in error. Problem is - the cursor keep positioning itself in MAP1 on the first entry field. What am I doing wrong?
Thanks in advance. Nancy
Software/Hardware used:
ASKED:
May 25, 2011 5:28 PM
UPDATED:
May 26, 2011 11:50 PM
Are you outputting the MAP1 record after doing the error checking? (If so, why?)
Tom
Hi, I have seen the similar scenario with subfiles(But in RPGLE).
I got it finally by using CSRRRN. I was successful in this issue by moving the RRN to CSRRRN when ever there we get a first error. So, that it will point to the first error position instead of first record.
Hope the same help you.
I was successful in this issue by moving the RRN to CSRRRN when ever there we get a first error.
I assume that you mean SFLCSRRRN() since CSRRRN isn’t a valid keyword.
That keyword will help with determining the subfile RRN that the cursor is on when control returns to the program. It might be used together with SFLRCDNBR(CURSOR) to reposition to the appropriate subfile page when the subfile is output again. Unfortunately, it won’t determine what field the cursor ends up in except that the cursor will be in the first input-capable field.
There is also the CSRLOC() keyword that can position the cursor on output. But it’s documented as being invalid for SFL formats.
However, if you have sample code that demonstrates how to make those work, please post it.
Tom