# 'MB'= MegaBytes: File Segment Size

> Source: https://manual.pvxplus.com/parameters/mb

## Description

Controls segment size in multi-segmented files. **'MB'** must be set to a value to activate the multi-segmented file feature.

PxPlus uses the value set in the **'MB'** parameter as a target size for each segment. If, for example, you wanted all files to be around 1 GB, you would set the **'MB'** parameter to 1024 representing 1024 megabytes or 1 GB.

The actual size of each segment will be determined based on the block size of the file. Internally files are partitioned into logical 'units' where each unit represents a portion of the file whose free space is managed by a single block (an inventory block). The Unit size can be computed as follows:

Unit size = ((*bksz* - 6) \* *bksz*)

The value *bksz* above represents the block size of the file -- normally between 1 and 8 kilobytes. You can use the **BSZ=** option when you create the file to override the default block size for a file.

As a unit is filled, the system will check to see if the file exceeds the **'MB'** setting. If so, the next unit of the file will be placed in a new segment.

The following table lists the maximum number of segments allowed for a file based on valid block sizes (1 to 31 kilobytes):

|  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| **Block Size** | **Unit Size** | **Segments** | **Block Size** | **Unit Size** | **Segments** | **Block Size** | **Unit Size** | **Segments** |
| 31*K* | 961MB | **124** | 30*K* | 901MB | **120** | 29*K* | 841MB | **116** |
| 28*K* | 784MB | **112** | 27*K* | 730MB | **108** | 26*K* | 676MB | **104** |
| 25*K* | 625MB | **100** | 24*K* | 577MB | **96** | 23*K* | 529MB | **92** |
| 22*K* | 484MB | **88** | 21*K* | 442MB | **84** | 20*K* | 400MB | **80** |
| 19*K* | 361MB | **76** | 18*K* | 325MB | **72** | 17*K* | 289*MB* | **68** |
| 16*K* | 256MB | **64** | 15*K* | 226MB | **60** | 14*K* | 196*MB* | **56** |
| 13*K* | 169MB | **52** | 12*K* | 144MB | **48** | 11*K* | 121MB | **44** |
| 10*K* | 100MB | **40** | 9*K* | 81*MB* | **36** | 8*K* | 64MB | **32** |
| 7*K* | 49MB | **28** | 6*K* | 36MB | **24** | 5*K* | 25MB | **20** |
| 4*K* | 16MB | **16** | 3*K* | 9MB | **12** | 2*K* | 4MB | **8** |
| 1*K* | 1MB | **4** |  |  |  |  |  |  |

Note:  
This feature is available for variable length records (VLR) format *only*.

## Default

**'MB'=0**

## See Also

**[EFF vs. VLR File Formats](https://manual.pvxplus.com/pxplus-user-guide/file-handling/data-files/eff-vs-vlr-file-formats)**
