Further Reading — Chapter 24: Nested Programs

IBM Official Documentation

  • Enterprise COBOL for z/OS: Programming Guide — "Defining a class hierarchy of programs" — The definitive reference for nested program structure, COMMON attribute, GLOBAL clause, and scope rules in IBM Enterprise COBOL. Includes diagrams showing visibility rules.

  • Enterprise COBOL for z/OS: Language Reference — "Nested programs" — Formal syntax rules for contained programs, END PROGRAM, COMMON, GLOBAL, and the RECURSIVE attribute.

  • Enterprise COBOL for z/OS: Language Reference — "Scope of names" — Detailed rules for name resolution in nested structures, including precedence rules when local names shadow GLOBAL names.

Textbooks

  • Murach, Mike, Murach's Mainframe COBOL, 2nd Edition — Chapter 19 covers nested programs with clear before-and-after examples. The discussion of when to use nested vs. external is particularly practical.

  • Stern, Stern, and Ley, COBOL for the 21st Century — Chapter 14 includes a section on contained programs with diagrams showing the nesting structure and visibility rules.

  • Coughlan, Michael, Beginning COBOL for Programmers — Chapter 16 covers nested programs in the GnuCOBOL context, with compilable examples that students can run without mainframe access.

COBOL Standards

  • ISO/IEC 1989:2014 — Programming Language COBOL — The international COBOL standard defines the formal semantics of nested programs, COMMON, GLOBAL, and the RECURSIVE attribute. The standard introduced significant enhancements to nested programs in the 2002 and 2014 revisions.

  • COBOL 2002 Standard Enhancements — The 2002 standard added the RECURSIVE attribute and LOCAL-STORAGE SECTION, both relevant to nested program design. Understanding these additions helps when working with code written under different standard levels.

Design and Architecture

  • Parnas, David L., "On the Criteria To Be Used in Decomposing Systems into Modules" — Parnas's information hiding principle directly applies to the choice between nested and external subprograms. Nested programs implement information hiding by making internal utilities invisible to external callers.

  • Gamma et al., Design Patterns: Elements of Reusable Object-Oriented Software — While OO-focused, the Facade pattern (a single entry point hiding internal complexity) is directly analogous to a COBOL outer program with nested utilities. The Strategy pattern parallels the choice between inline paragraphs, nested programs, and external subprograms.

GnuCOBOL Resources

  • GnuCOBOL Programmer's Guide — Section on nested programs covers GnuCOBOL-specific behavior, including compilation flags and debugging support for nested structures. Available at https://gnucobol.sourceforge.io/

  • GnuCOBOL FAQ — "How do I compile nested programs?" — Practical guidance on building and testing nested program structures with GnuCOBOL.

Modernization Context

  • IBM Redbooks: "COBOL Application Modernization" — Discusses how nested programs interact with modernization strategies, including when to refactor nested programs to external subprograms to enable service-oriented access.

  • Micro Focus Documentation: "COBOL Nested Programs in Modern Environments" — Covers how nested programs behave in Micro Focus COBOL environments (Visual COBOL, Enterprise Developer), with notes on IDE support for navigating nested structures.

Online Resources

  • IBM Z Xplore (https://www.ibm.com/z/resources/zxplore) — Free learning platform where you can compile and run nested COBOL programs on a real z/OS system. The advanced COBOL modules include nested program exercises.

  • Open Mainframe Project — COBOL Programming Course — Includes modules on program organization that cover nested programs alongside external subprograms.