What is a logical file? is actually a view of the physical file. Their relationships are equivalent to the relationships of tables and views in SQL Server.
Set the physical file definition as follows: (file name is student)
A R Sturec
A ID 10S
A NAME 10A
A Birth L
A CLASS 10A
A K ID
After the physical files have been built, we can build the logical files. Pfile represents a referenced physical file.
A R sturecl PFILE (STUDENT)
A ID
A NAME
A K ID
This logical file displays only the IDs and name fields.
If you want to display all the fields for a physical file, you should match the field type name setting with the field type name of the physical file. As defined below:
A R Sturec PFILE (STUDENT)
A K NAME
This way, this logical file includes all the contents of the physical file. The keyword definition of a logical file can be inconsistent with the keywords in the physical file.
If you want to add a condition, assume that the logical file includes only students with an ID of less than 1000, defined as follows:
A R STUREC2 PFILE (STUDENT)
A ID
A NAME
A K ID
A S NAME COMP (LT 1000)