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
what is the necessary keyword for non-join logical file?
what are the different opcodes available in rpg for database access ?
what are different types of substems?
when should I use method get, and when should I use method post in my cgis?
can we define multi-dimensional arrays in rpg ?
what are the different methods to access seu?
Can we debug the MSGW JOBS?
Which command is used to replace CDUP command in FTP IF i WANT TO USE SFTP?
what is a join logical file?
how to declare a constant variable in the freeformat?
is it there an easy way to determine if an html section is available to issue a wrtsection upon?
Explain The Keywords Edtcde & Edtwrd?
how do you specify page overflow indicator for printer files in rpg?
what is message file?
What is dynslt?