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
Write a CL program which will run a batch job at 1 am every night
is their a difference in cobol400 for the release 5.2 and 6.1 at the as400.
explain the purpose of keep and assume keywords?
how do you use commitment control in rpg program ?
How to debug a batch job when it is in messagewait(mswg) status. I know the steps for batch ebugging, but im confusing with when we submit any job for batch debug we put in held state. So here also do same thing or any other way?
How to avoid using indicators in ile ?
How to Define a Procedure in RPG?
What is the use of jdftval in as400?
In AS/400 projects in Companies whats the meaning of production support team.what production support involves.also what work does development,maintenance involve what are the other teams or processes that are available for as400 project.
what is the difference between *like and *namvar ?
what is meant by object lock requests,held locks and locks waiting to be applied(wrkobjlck) why should we apply for locks.Please explain sir.
what does the ovrdbf command do?
in conjunction with what other keyword must ovrdta and ovrata be used?
1. There is a file called Month. Month has 12 members called Jan, Feb, ..., Dec. How to design a rpg code which can access any member and show its content. (User can ask for any member when required)?
In Which Specs Arrays, Tables & Constants Are Defined?