70 pts.
 File Size of a PF in AS/400
How to determine the file size of a a PF in AS/400. Is there a specific CL command which tells us as to how many records a file can store? Or how much more records it can accomodate before its 100% full?

Software/Hardware used:
ASKED: August 13, 2008  8:05 PM
UPDATED: August 15, 2008  3:34 PM

Answer Wiki:
Hi To know all the specified information you can use the command DSPFD Also, The maximum sizes for a PF are documented on this IBM <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/dbp/rbafoappmax.htm">Webstie</a>.
Last Wiki Answer Submitted:  August 15, 2008  3:34 pm  by  ReshmaG   455 pts.
All Answer Wiki Contributors:  ReshmaG   455 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

The field ODOBSZ from the DSPOBJD command will give you the actual object size.

RTVMBRD FILE(YOURLIB/YOURFILE) NBRCURRCD(&NBRCURRCD)
NBRDLTRCD(&NBRDLTRCD)

returns the information about the number of records in one member to your CL program.
You shuld pay attention to the space taken by deleted records as they remain until you reorganize (RGZPFM).

DSPFD FILE(YOURLIB/YOURFILE) TYPE(*MBRLIST) OUTPUT(*OUTFILE)
OUTFILE(YOURLIB/DSPFDOUT)

gives you a table of information about all the members of a PF. The fields MLNRCD and
MLNDTR give you the corr. information that the RTVMBRD does.

There are APIs to get similar information, too.

Generally, if you set the SIZE option when you create the file (CRTPF) you shouldn’t have problems of running out of room, though. The system should extend the space as necessary. We usually set the size at *NOMAX. This has worked for us for many years without problems.

 90 pts.

 

Hi,

The only problem with setting your file sizes to *NOMAX is that if you have a program error where a program gets stuck in a loop writing to a file it can fill your disk up and bring the machine down.

If you’ve got a reasonably experienced development team this shouldn’t be a problem.

Regards,

Martin Gilbert.

 23,625 pts.