The Physical File contains the data.
It can have a key but it does not have to.
If read without the key it reads in FIFO sequence. You can set a blocking factor and this is the faster way to process the file.
A logical file contains no data. It just has a access path to read the data from the PF.
A LF can cah a key and/or had Select/omit criteria.
In a high level program you must specify that it is a key file or it will read it in FIFO seq.
When using SQL or QRY, and you select an order, those products will look to see if a LF that already exists can bu used to read the file. If not, it creates one on the fly.
This sure sounds like a homework question…
we don’t want to ruin your educational experience by doing your homework.
A “physical” read actually transferred data data from external storage into an I/O buffer. A “logical” read accessed a record that was already in an I/O buffer. Data is generally transferred between external storage and memory (buffers) in “blocks”. If you compare the size of a block to the size of a record, you might find that, e.g., ten records can fit into a single block. Thus, a “physical” read can transfer ten records. Ten “logical” reads could be done before another physical read was needed.
Note that this is primarily effective for sequentially reading files. If random reads always require fetching different blocks, then physical reads will be perhaps as many as logical reads.