check
QSYS2.SYSFILES








On Wednesday, April 1, 2026 at 07:01:56 PM GMT+2, Jerry Forss <jforss@xxxxxxxxxxxxx> wrote:





There is a part that I am still missing but not critical.

I have a file that has initial records of 1000000, increment records of 10000 and maximum increments of 1000, resulting of max records of 11,000,000.

The file filled up and 9999 was used as the response.

The file now has 11,023,368 records but the info from my call still has the numbers above.
Is that addition increments saved anywhere?

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jerry Forss
Sent: Wednesday, April 1, 2026 11:28 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: ExternalRe: Extend and Reorg PF

This is what I ended up with


// Declare Sql Statement
Exec SQL
Declare FileCursor Cursor For
SELECT A.Sys_DName, A.Sys_Tname,
B.Number_Rows, B.Deleted,
C.Increment_records, Initial_Records, Maximum_Increments
FROM SysTables A
JOIN SysTableStat B
ON A.Sys_DName = B.Sys_DName AND
A.Sys_TName = B.Sys_TName
JOIN SysFiles C
ON A.Sys_DName = C.Table_Schema And
B.Sys_TName = C.Table_NAME
WHERE A.Sys_DName = :SQLLibrary And A.Type = 'P' And A.FileType = 'D';

// Run Sql Statement
Exec SQL Open FileCursor;

// Process Data Set
DoU Done;

// Get Employee Data
Exec Sql Fetch Next From FileCursor Into : Object_Schema,
: Object_Name,
: Current_Records,
: Deleted_Records,
: Increment_Records,
: Initial_Records,
: Maximum_Increments;

// If Eof Of Data or Unknown Error get out
If (SQLSTT <> SQLOK)
And (SQLSTT <> SQLCmpError);
Leave;
EndIf;


// Do Stuff

EndDo;

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Reeve
Sent: Wednesday, April 1, 2026 11:14 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: ExternalRe: Extend and Reorg PF

DSPFD to an *OUTFILE (column MBRCDC) gives you the record capacity.
Otherwise, the capacity is (initial_size + (records per increment * number of increments)); I think that's SQL-able.

On Wed, Apr 1, 2026 at 7:18 AM Jerry Forss <JForss@xxxxxxxxxxxxx> wrote:

I have the need to check all PF if they are getting close to filling
up, even with the extensions.

I can use to get number of current records and deleted records.

SELECT A.SYS_DNAME,A.SYS_TNAME,A.FILETYPE,A.TYPE,
B.NUMBER_ROWS,B.DELETED,B.DATA_SIZE,B.LASTUSED
FROM SYSTABLES A JOIN SYSTABLESTAT B
ON A.SYS_DNAME = B.SYS_DNAME AND A.SYS_TNAME = B.SYS_TNAME WHERE
A.SYS_DNAME = 'UTILITIES'

How do I get the file capacity so I know if the file is getting close
to filling up?

I would do a CHGPF to increase capacity.



Subject to Change Notice:

WalzCraft reserves the right to improve designs, and to change
specifications without notice.

Confidentiality Notice:

This message and any attachments may contain confidential and
privileged information that is protected by law. The information
contained herein is transmitted for the sole use of the intended recipient(s) and should "only"
pertain to "WalzCraft" company matters. If you are not the intended
recipient or designated agent of the recipient of such information,
you are hereby notified that any use, dissemination, copying or
retention of this email or the information contained herein is
strictly prohibited and may subject you to penalties under federal
and/or state law. If you received this email in error, please notify
the sender immediately and permanently delete this email. Thank You

WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
www.walzcraft.com<https://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.



Subject to Change Notice:

WalzCraft reserves the right to improve designs, and to change specifications without notice.

Confidentiality Notice:

This message and any attachments may contain confidential and privileged information that is protected by law. The information contained herein is transmitted for the sole use of the intended recipient(s) and should "only" pertain to "WalzCraft" company matters. If you are not the intended recipient or designated agent of the recipient of such information, you are hereby notified that any use, dissemination, copying or retention of this email or the information contained herein is strictly prohibited and may subject you to penalties under federal and/or state law. If you received this email in error, please notify the sender immediately and permanently delete this email. Thank You

WalzCraft PO Box 1748 La Crosse, WI, 54602-1748 www.walzcraft.com<https://www.walzcraft.com> Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.




Subject to Change Notice:

WalzCraft reserves the right to improve designs, and to change specifications without notice.

Confidentiality Notice:

This message and any attachments may contain confidential and privileged information that is protected by law. The information contained herein is transmitted for the sole use of the intended recipient(s) and should "only" pertain to "WalzCraft" company matters. If you are not the intended recipient or designated agent of the recipient of such information, you are hereby notified that any use, dissemination, copying or retention of this email or the information contained herein is strictly prohibited and may subject you to penalties under federal and/or state law. If you received this email in error, please notify the sender immediately and permanently delete this email. Thank You

WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
www.walzcraft.com<https://www.walzcraft.com> Phone: 1-800-237-1326

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.