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 are necessary keywords to code message subfile?
How we will get issues on AS/400 technology ? I mean which issue/Defect Tracking tool is using in all companies when any issue comes? Can anybody explain about the work flow of AS/400 project ? plzzz
what is a non-join logical file?
In 'o' Specs What Is The Opcode For Write?
maximum number of subfiles that can be active for a single file is?
To Add A File To The 'file Selection' Option Of A Query, The Function Key To Be Pressed Is?
What Is The Object Type Of Pf, Lf, Printer File & Display File?
how do you pass parameters in cl?
what are different types of substems?
Write a CL program which will run a batch job at 1 am every night
How to reverse the string in rpg
how do you use commitment control in rpg program ?
what is scan and xlate?
how can you specify no duplicate key?
WHICH REPLY CODE IS USED BT sftp ? ... (e.g.226 is used by FTP IF FILE IS TRANSFERED)