What is the difference between a Physical File & a Logical?
Answer Posted / godwin sf
Physical files hold the actual data of a database file. The data is written in arrival sequence.
Physical files are not required to have keyed fields. If a physical file has key fields, this is the order that an RPG program will read the data if the File Spec in the program indicates to read the data in keyed sequence.
Also, with a keyed field, an RPG program can CHAIN, SETLL, READE and READP.
A simple logical file is a different view of the physical file. It is actually a list of pointers to the physical file. Most of the time, a logical file is nothing more than a way of accessing the physical file with different key fields.
With the standard AS/400 supplied tools, it is hard to see the logical file. One way is to use the copy file CPYF to copy the logical file to a new physical file. Then, look at the physical file... it will be in the same order as the logical file.
The AS/400 Database is full featured. Logical files can join multiple files and select and create new fields.
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
Difference Between Call & Sbmjob?
what is the maximum number of records you can specify in a display file?
when do you use f-spec. Continuation line ?
what is sflrolval?
why is as/400 called object oriented machine?
define the purpose of the iter operation?
what is a program described file in rpg?
how do you know that records are locked?
Difference Between Interactive & Batch Job?
what is the maximum number of fields under a record format of physical file?
WHAT is STORED PROCEDURE CONCEPT IN AS400 WITH EXAMPLE?
What are the mandatory keywords of sub file?
What is %CHECK?
define the purpose of the *bcat function?
records can be read/update/deleted with which file?