How to remain on same page on Load All Subfile

295 pts.
Tags:
AS/400
AS/400 Subfiles
COBOL
Subfile
I am using Load All Subfile. I used Page Down key and went to 2nd page then on 2nd Page I pressed ENTER Key, then it went back to the first page of subfile. I am using COBOL program to write the subfile. Can anybody tell me how to remain on the same page after pressing ENTER key on Load All subfile? Thank You in advance.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

Try specifying SFLRCDNBR(CURSOR) in your DDS.

Regards,

Martin Gilbert.

Hi,

SFLRCDNBR is defined with a field (i use TOP) to carry the relative record number of the subfile record you want to display. When control returns to your program (enter or a command key) you can detect the subfile record number at the top of the current page. (file information data structure has it).

I usually set the value after the subfile is displayed.

If you edit the subfile and detect an error, you can set the relative record number of the error so the page containing the error will be displayed.

you can place the offending record at the TOP of the page with SFLRCDNBR(CURSOR *TOP)

Good Luck.
PGMBOB

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following