RPGIV @ Work

A unique site for RPG and System i Lovers


Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Database file sizes Print E-mail
User Rating: / 1
Written by Chamara Withanachchi   

Before you design and create a database file, you need to know the maximum size allowed for the file.

The following table lists the maximum values for database files.

Description Maximum value
Number of bytes in a record 32 766 bytes
Number of fields in a record format 8 000 fields
Number of key fields in a file 120 fields
Size of key for physical and logical files 32 768 characters1
Size of key for ORDER BY (SQL) and KEYFLD (OPNQRYF) 10 000 bytes
Number of records contained in a file member 4 294 967 294 records2
Number of bytes in a file member 1 869 162 846 624 bytes3
Number of bytes in an access path 1 099 511 627 776 bytes3 5
Number of keyed logical files built over a physical file member 3686 files
Number of physical file members in a logical file member 32 members
Number of members that can be joined 256 members
Size of a character or DBCS field 32 766 bytes4
Size of a zoned decimal or packed decimal field 63 digits
Maximum number of distinct database files that can be in use at one time ~500 000
Maximum number of members in a physical or logical file 32 767
Maximum number of constraints per physical file 5000 constraints
Maximum number of triggers per physical file 300 triggers
Maximum number of recursive insert and update trigger calls 200

1 When a first-changed-first-out (FCFO) access path is specified for the file, the maximum value for the size of the key for physical and logical files is 32 763 for ACCPTHSIZ(*MAX1TB) and 1995 characters for ACCPTHSIZ(*MAX4GB).

2 For files with keyed sequence access paths, the maximum number of records in a member varies and can be estimated using the following formulas.

When ACCPTHSIZ(*MAX4GB) is specified, use the following formula:

10 + (.8 x key length)

When ACCPTHSIZ(*MAX1TB) is specified, use the following formula:

12 + (.8 x key length)

These are estimated values. The actual maximum number of records can vary significantly.

3 Both the number of bytes in a file member and the number of bytes in an access path must be looked at when message CPF5272 is sent indicating that the maximum system object size has been reached.

4 The maximum size of a variable-length character or DBCS field is 32 740 bytes. DBCS-graphic field lengths are expressed in terms of characters; therefore, the maximums are 16 383 characters (fixed length) and 16 370 characters (variable length).

5 The maximum is 4 294 966 272 bytes if the access path is created with a maximum size of 4 gigabytes (GB), ACCPTHSIZ(*MAX4GB).

<Previous   Next>