Chapter 17. SUBFILE PROGRAMMING

CHAPTER OBJECTIVES

Upon completion of this chapter, you should be able to

  • Describe what a subfile is.

  • Explain the three methods used to load subfiles.

  • Describe the basic concepts of how a subfile works in an application program.

  • Demonstrate how data description specifications (DDS) are used to create a subfile.

  • Demonstrate the creation and execution of programs utilizing subfile processing.

LIST SCREEN OR WORK WITH SCREEN

In this chapter we expand on the description of display files given in Chapter 14, "Interactive Processing." As you recall, record formats are defined in a display file to define an entire screen or a portion of a screen. One of the most common types of record formats used in interactive applications is the list screen, or work with screen, shown in Figure 17.1.

A list, or work with, screen that displays all customers with a particular last name.

Figure 17.1. A list, or work with, screen that displays all customers with a particular last name.

The list screen, or work with screen, provides a method of processing a block of records that are read from and written to a screen. The block of records processed with a list screen is contained in a subfile. A subfile is a collection or

subset of records from a data file that is processed as a unit using a list screen. A subfile can be specified in the DDS for a display file to allow a program to handle multiple records of the same type on a screen. This allows a software developer to ...

Get PROGRAMMING IN COBOL/400: 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.