Stop Guessing File Sizes on IBM i – Use SIZE(NOMAX) Instead!

  • Home
  • /
  • Blog
  • /
  • Stop Guessing File Sizes on IBM i – Use SIZE(NOMAX) Instead!

March 23, 2026

In almost all the IBM-i shops I’ve worked at, we have always set the initial size of physical files to what seems like a reasonable value. Quite often we just accept the system default of 10,000 records with three increments of 1,000 records each. Sometimes we tweak one or more of those numbers, usually the initial size, commonly increasing this to 100,000 with 10k increments.

In a recent project, someone suggested that we stop all the guesswork and create every physical file with SIZE(*NOMAX). Another team member immediately raised a red flag. They worried that a program could get stuck in a loop and keep writing records until it filled the entire disk.

Size Cap vs. Nomax — Who is right?

Years ago, I would have sided with a capped size, but with modern machines, huge table sizes becoming the norm and with IBM-i having its own built in max file sizes (around 1.5tb) now I’m team huge!

Use SIZE(*NOMAX) There is no real danger of a runaway program filling up your disk space. The *NOMAX setting does not mean the file can contain an infinite number of records. Every file still has physical limits built into the IBM i system:

Database Files (PF / LF / SQL Tables)

  • Maximum size of a single object: ~1 TB (typical limit for many object types).
  • Maximum rows in a table: 4,294,967,294 rows.
  • SIZE(NOMAX)* does not mean infinite! The system still enforces the object-size ceiling (~1 TB).

So, if a program does go rogue and starts pumping out records like crazy, it will eventually hit one of those hard limits. When it does, the system will stop the job dead with the CPF5272 error: Failure for device or member &4 file &2 in library &3.

I recommend that you change the default value of the SIZE parameter on the Create Physical File (CRTPF) command to *NOMAX. IBM provides clear instructions on how to set this command default.

Have you already made the switch to *NOMAX in your environment?

While we are talking about best practices, I also recommend that you stop using DDS and start defining your database objects with SQL instead [more]

When you create a table using SQL it automatically uses SIZE(*NOMAX) as the default. That might be more change than you were asking for today, but it is worth considering.

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits.

Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day.

Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe NOW
7-day free trial

Take This Course with ALL ACCESS

Unlock your Learning Potential with instant access to every course and all new courses as they are released.
 [ For Serious Software Developers only ]

Online Learning for IBM i Software Technology Professionals

“The more that you read, the more things you will know. The more that you learn, the more places you’ll go.” – Dr. Seuss

>