Skip to Main Content
PROGRAMMING IN COBOL/400: 2nd Edition
book

PROGRAMMING IN COBOL/400: 2nd Edition

by James Cooper, Nancy Stern, Robert A. Stern
January 2002
Intermediate to advanced content levelIntermediate to advanced
736 pages
18h 57m
English
Wiley
Content preview from PROGRAMMING IN COBOL/400: 2nd Edition

Chapter 11. LOGICAL FILES

CHAPTER OBJECTIVES

Upon completion of this chapter, you should be able to

  • Explain the purpose of logical files.

  • Explain the differences between physical files and logical files.

  • Explain how logical files are defined.

  • Describe the various forms of logical files that can be used to define access paths to data stored in physical files.

  • Demonstrate the use of logical files in application programs.

LOGICAL FILES

There will be times when a user needs to access a physical file in some manner other than the way the physical file is defined. For example, a user may want to access employee records using either a Social Security number or a name as the key field. Similarly, a user may wish to group employees and print or display them by department number or city. An accounts receivable clerk may wish to access only those accounts that exceed a certain balance. In another situation, a user may wish to select or omit specific records from a physical file or even select or omit fields within the records. A logical file can be used to accomplish all of these tasks.

A logical file defines an access path to data stored in one or more physical files. Logical files do not contain any data themselves but provide a view of data from physical files. The logical view allows a user to decide what data are to be retrieved from the physical file or files and the format in which they are to appear.

Logical files may be used to

  1. Sequence data in a physical file in a different order.

  2. Select or ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Designing and Programming CICS Applications

Designing and Programming CICS Applications

John Horswill, Members of the CICS Development Team at IBM Hursley

Publisher Resources

ISBN: 9780471418467Purchase book