Chapter 11: Sequential File Processing -- Further Reading
Books
"Murach's Mainframe COBOL" by Mike Murach and Associates Murach's treatment of sequential file processing is among the most practical available, with complete program examples that demonstrate the standard read loop, report generation, and file merging. The paired-pages format presents I/O syntax alongside annotated programs, and the JCL chapters that follow the COBOL coverage show exactly how DD statements connect to SELECT...ASSIGN clauses. This integrated COBOL-and-JCL approach is invaluable for mainframe developers. Available from the Murach website and major booksellers.
"Stern's COBOL for the 21st Century" by Nancy and Robert Stern The Stern textbook includes detailed, step-by-step walkthroughs of sequential file programs, from the simplest single-input single-output programs to multi-file matching and merging. The exercises are progressive, building from basic READ/WRITE programs to programs that produce formatted reports with headers, footers, and page breaks. The discussion of BLOCK CONTAINS and RECORDING MODE clarifies physical file attributes that many introductory texts gloss over. Search for this title through academic publishers.
"COBOL for the 21st Century" by Nancy Stern, Robert Stern, and James Ley This updated edition extends the Stern textbook with coverage of modern file-handling practices, including the use of FILE STATUS codes for comprehensive error handling, integration with sort utilities, and best practices for production-quality file I/O. The chapter on debugging file-processing programs is particularly helpful for beginners encountering S001, S013, and other common file-related abends. Available from major academic publishers.
Online Resources
IBM Enterprise COBOL Language Reference -- File Control Entry The definitive syntax reference for the SELECT clause, ASSIGN TO clause, FILE STATUS clause, and all other FILE-CONTROL entries. This section documents every option available for sequential file definition, including ACCESS MODE, RESERVE, and PADDING CHARACTER. Navigate to the ENVIRONMENT DIVISION section of the Enterprise COBOL Language Reference on the IBM Documentation portal.
IBM Enterprise COBOL Programming Guide -- Processing Sequential Files The programming guide provides practical examples and guidance for sequential file processing, including the standard read-and-process loop, techniques for reading and writing variable-length records, and handling multiple input files. It also covers the interaction between COBOL file attributes and z/OS dataset attributes, including how BLOCK CONTAINS 0 allows the system to determine optimal block size. Available on the IBM Documentation website.
IBM z/OS MVS JCL Reference -- DD Statement Understanding JCL DD statements is essential for any COBOL programmer working on z/OS. This reference documents every DD statement parameter, including DSNAME, DISP, DCB (LRECL, BLKSIZE, RECFM), SPACE, and UNIT. The relationship between DD parameters and COBOL FD attributes is a frequent source of errors, and this reference is the authoritative source for resolving them. Available on the IBM Documentation website under z/OS publications.
GnuCOBOL Programmer's Guide -- File Handling For programmers learning on open-source platforms, GnuCOBOL's file handling documentation explains how sequential file I/O works without JCL. File names in GnuCOBOL map to operating system file paths or environment variables, providing a simpler model for understanding the core concepts before tackling mainframe-specific details. Available through the GnuCOBOL project on SourceForge.
IBM Documentation
IBM Redbook: "ABCs of z/OS System Programming Volume 9 -- Batch Processing" This Redbook provides comprehensive coverage of batch processing on z/OS, including the relationship between JCL, datasets, and COBOL programs. It explains how the operating system allocates datasets, manages buffers, and handles the physical I/O that underlies every COBOL READ and WRITE statement. Understanding this infrastructure helps COBOL programmers diagnose file-related abends and optimize file-processing performance. Search for this title on the IBM Redbooks website.
IBM Knowledge Center: "z/OS DFSMS Using Data Sets" This reference covers sequential data set organization in detail, including physical sequential (PS) and large format sequential datasets. It explains record formats (F, FB, V, VB, U), block sizes, and how the system manages I/O buffers. COBOL programmers benefit from understanding these physical characteristics because they directly affect program behavior, performance, and the meaning of FD clauses. Available through the IBM Documentation portal.
Standards and Specifications
ISO/IEC 1989:2023 -- COBOL Standard, Sequential I-O Module The current COBOL standard defines the formal semantics of sequential file processing, including the precise behavior of OPEN, CLOSE, READ, and WRITE for sequential files. The standard specifies the conditions under which each FILE STATUS value is set and defines the permissible combinations of OPEN mode and I/O statements. Available for purchase through ISO or national standards bodies.
"File Processing in COBOL: A Comparative Approach" -- Academic Papers Academic papers comparing COBOL's file-processing model with file I/O in other languages provide useful context for understanding COBOL's design decisions, such as the separation of logical file definition (SELECT/FD) from physical file allocation (JCL), and the record-oriented rather than stream-oriented approach to I/O. Search academic databases for papers on COBOL file processing or record-oriented I/O systems.