SFLRCDNBR – type of data?

AS 400
Hello. 20 years in 390 and I've just arrived in 400. I've an issue with a screen, giving a status 22 (dup key) writing the subfile. I see we have more than 10.000 lines to show, but the field in the SFLRCDNBR (CURSOR) only allow 4S definition. So when I add 1 after 9999, it becomes 0 again. I can define as 9(5) the field in the program, but I have to move it to the SFLRCDNBR... Any way to use a 9(5) field here? Thanks in advance.

Software/Hardware used:
cobol, as/400

Answer Wiki

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

Subfiles have a 9999 record size limit.  Either modify the program to only load 9999 max or change design to load by a key and use the SETLL and READE to load a smaller sample of the data

Discuss This Question: 1  Reply

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.
  • TheRealRaven
    No. Maximum subfile size will always be 9999. No one will ever want to scroll through that many records.

    There are two alternative subfile types -- expanding and page-at-a-time.

    For expanding, you generally load only as many as are commonly expected to be viewed by a user in any instance; and whenever a user scrolls beyond the bottom, you add one or more pages. That can continue up to 9999 rows.

    For page-at-a-time, you only load enough rows to fill a page. When pageUp/pageDown is pressed, you reload with the next appropriate block of rows.

    Technically, a subfile is built in memory. The two parameters, SFLSIZ() and SFLPAG(), combine to tell the system how to manage the allocated memory along with the display.

    SFLPAG() simply declares how many display lines will be occupied by subfile rows. SFLSIZ() tells the system to allocate enough memory to handle that many rows when the file is opened. (The allocation can grow if an expanding subfile has more rows added.

    Wnen the subfile is declared with SFLSIZ() equal to SFLPAG(), it acts as a page-at-a-time subfile. Pressing pageUp/pageDown causes display management to return to program control. Your program should then detect which key was pressed and perform either a LoadNext or LoadPrevious proc whichever is appropriate, then loop back to display again.
    36,880 pointsBadges:

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.

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


Share this item with your network: