Manta alt


You must allow the browser to execute JavaScript programs if you want to view product information. If your browser is set up to execute JavaScript programs, the problem is that the product ID was incorrect. Use the menu bar above to find the desired product.


This course covers the statements and techniques used by a COBOL programmer to process IBM i files.

The course begins with a review of DB2 concepts, file types, and processing. It then shows how to access a physical or logical data file sequentially in either arrival sequence or key sequence. Direct access is then covered. You will see how to access records using either a record key or a relative record number. In addition to learning the relevant COBOL statements, you will also learn programming techniques for handling file in these ways. The course ends with a discussion of I/O error detection and handling in a COBOL program.

Approximate Study Time: 6 hours


After completing this course, you should be able to:

  • Identify the processing capabilities and limitations of the three types of COBOL files
  • Identify a sequential, indexed, or relative file in a COBOL program
  • Code a COBOL program to load, access, update, or extend a database file using an arrival sequence access path
  • Code a COBOL program to access an indexed or a relative file sequentially, randomly, and dynamically, including the addition, replacement, and deletion of records
  • Perform generic key processing with an indexed file
  • Code a COBOL program to process an indexed file through an alternate key
  • Code a COBOL program that uses commitment control
  • Given the description of a relative file, select and code a randomizing algorithm and an overflow technique for optimal performance
  • Code the COBOL statements to diagnose and respond to I/O errors

Topic Outline

DB2 Review

Accessing a File Sequentially

Keyed Access

Keyed Access Enhancements

Relative Access

Relative Access Enhancements

Error Handling


The course is suitable for entry-level programming students with no prior COBOL experience. It can also be taken by COBOL/400 programmers who want to learn ILE COBOL.


Before you begin your study of the material, you should know basic programming concepts and be acquainted with structured programming design techniques. In particular, you will be expected to understand program logic that is documented using pseudocode or structured flowcharts. You may have gained this knowledge from attending classes or from relevant work experience.

This course also assumes that you have a working knowledge of IBM i programming concepts and facilities. You can satisfy this prerequisite by successfully completing the courses in the following Manta series:

Finally, the course assumes that you have completed the previous courses of this series: