Size between a logical and a physical file

440 pts.
Tags:
AS/400
Hello friends, It's me (again !) Why the size of the Logical File is greater than the Physical ? Library . . . . . . : GADTA Library ASP device . : *SYSBAS Object Type Attribute Size Text GAOMA *FILE PF 271130624 * * * * * E N D O F L I S T I N G * * * * * Library . . . . . . : GADTA Library ASP device . : *SYSBAS Object Type Attribute Size Text GAOMA1 *FILE LF 280530944 * * * * * E N D O F L I S T I N G * * * * * FMT PF .....A..........T.Name++++++RLen++TDpB......Functions+++++++++++++++++++++++++++ *************** Beginning of data ********************************************************** 0001.00 A R GXGAOMA 000000 0002.00 A MODCOD 00006A 000000 0003.00 A COLHDG('MODEL') 080521 0004.00 A OPEANO 00004P 000000 0005.00 A COLHDG('ANO') 080521 0006.00 A OPEANOCOMP 00004P 000000 0007.00 A COLHDG('COMPLEMENTO') 080521 0008.00 A OPECOD 00010A 000000 0009.00 A COLHDG('CODIGO') 080521 0010.00 A OPEFRAN 00001A 000000 0011.00 A COLHDG('FRANCHISE') 080521 0012.00 A OPEHOR 00004P01 000000 0013.00 A COLHDG('TEMPO') 080521 ****************** End of data ************************************************************* FMT LF .....A..........T.Name++++++.Len++TDpB......Functions+++++++++++++++++++++++++++ *************** Beginning of data ********************************************************** 0001.00 A UNIQUE 000000 0002.00 A R GXGAOMA PFILE(GAOMA) 000000 0003.00 A K OPECOD 000000 0004.00 A K MODCOD 000000 0005.00 A K OPEFRAN 000000 0006.00 A K OPEANO 000000 ****************** End of data *************************************************************

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi SILVARB,

I don’t know the AS/400 specifically, so take my answer with a pinch of salt (and if I’m wrong, fellow answerers, feel free to delete this). That said…

Many filesystems carve disk into blocks. This makes it easier to create the TOC for the files, but it can also mean that portions of the drive go unused. For instance, let’s say a drive used 8-byte blocks, but you had a 6-byte file. That file would have a physical size of 6 bytes, but a logical size of 1 block, or 8 bytes. Essentially, to get the logical size you have to round up from the physical size to the next largest block.

I’m even less sure of this, but I can imagine this problem may be exacerbated if the file is fragmented, as each one of those fragments has that rounding problem. Imagine an extreme case, where our 6 byte file is fragmented into 6 files — now the physical size is 6 bytes, but the file takes up 6 blocks (one fragment per block), and each block is 8 bytes — 6×8 = 48 bytes logical size.

Again, not sure about all this, but it might at least give you a starting point. HTH.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following