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
How to avoid using indicators in ile ?
what is overlay?
What is the Difference between command attention key and command function key ?
what is sflinz and sflrna?
http default port 80 is used by some other production http service. How can I create an http instance on another port to run cgidev2 and my future cgi developments?
what is a query can be run in which mode?
how can you execute a command from within an rpg program without calling a clp program?
define a shared access path?
Can you summarize the steps I have to go through in writing my first cgi?
can a single screen format occupy a screen area above and below a subfile format ?
if dspatr(pc) and csrloc were specified for a format, which keyword would have priority?
How do I remove a flag or check no. or name when a user opens too many sessions?
define the purpose of the *cat function?
how to pick up the changed records every time in a subfile after the first change made ?
how can you detect overflow for a print program that prints multiple lines per cycle?