Difference between Physical file and Logical file in AS400 |
Difference b/w PF and LF
There are several differences between PF and LF that are listed here in this blog.
Physical File | Logical File |
---|---|
The physical file occupies memory and has data contained within it. |
The logical file does not occupy any memory and does not contain any data. It's an access path. It's a view over one or more physical files. |
CRTPF command is used to create PF objects. | CRTLF command is used to create an LF object. |
The physical file can exist independently. | A logical file cannot exist independently. Physical file existence required. |
The physical file can exist alone. | A logical file cannot exist with the existence of a physical file. |
The physical file can have only one record format. | The logical file can have up to 32 record formats. |
The physical file cannot be deleted if any dependent A logical file (LF) exists over it. |
The logical file can be deleted without having the need to delete the physical file (PF). |
Use the DSPDBR command on the physical files to find all the dependent Logical files (LF) over the physical file. |
Use the DSPFD command on the Logical files to find the parent physical file on which the LF is based. |