the program does everything it did before AND puts a message on the queue. During the parallel-run period, both the flat file and the MQ message carry the same data. This allows the batch and real-time paths to process the same transactions. → Chapter 45: Capstone 3 — From Batch to Real-Time: A Full Migration Project
Step-by-step guide for COBOL-DB2 development including JCL setup, precompilation, and binding. - **"DB2 for z/OS: Diagnosis Guide and Reference"** — Essential for understanding and resolving DB2 errors in production. → Chapter 27 Further Reading
Various Micro Focus white papers on adopting OO COBOL in enterprise environments. - **"Modernizing COBOL Applications: From Procedural to Object-Oriented"** — Industry articles on migration strategies. → Chapter 25 Further Reading
IBM Redbook (SG24-6105). Chapter on VSAM return codes and file status mapping. Essential for understanding the relationship between VSAM return/reason codes and COBOL FILE STATUS. → Further Reading — Chapter 10: Defensive Programming
Compatible mode. Maximum 18 digits for intermediate results. This is the traditional limit. - **`ARITH(EXTEND)`** — Extended mode. Maximum 31 digits for intermediate results. Essential for financial calculations that multiply large amounts by small rates. → Appendix B: Mathematical Foundations
ATM feed corruption | | Thu | 2,301,445 | 41 | 0.002% | Normal — sorted successfully | | Fri | 2,567,201 | 52 | 0.002% | Normal — sorted successfully | → Case Study 1: GlobalBank Daily Transaction Sort
ACCEPT
A COBOL statement that retrieves data from an external source, typically the system date/time or a user input device. In batch programs, ACCEPT FROM DATE/DAY/TIME retrieves system values; in CICS, ACCEPT is generally not used (replaced by CICS RECEIVE). (Ch. 3) → Appendix F: Glossary
Access Method
A component of the operating system that manages the transfer of data between an application program and a *dataset*. Common access methods include *QSAM*, *BSAM*, and *VSAM*. The access method handles buffering, blocking, and physical I/O operations. (Ch. 11) See also: *QSAM*, *BSAM*, *VSAM*. → Appendix F: Glossary
Account master record layout 2. **TXN-REC** — Transaction record layout 3. **IO-STATUS** — Generic file status fields (with REPLACING) 4. **WS-DATES** — Date working storage 5. **CON-CODES** — Return code constants 6. **PAR-LOG** — Error logging paragraph → Chapter 9: Copybooks and Code Reuse
Acquire locks as late as possible
do validation and preparation before locking 2. **Release locks as early as possible** — commit promptly after updates 3. **Minimize processing between lock acquisition and release** — no I/O to non-locked resources, no complex calculations 4. **Use the least restrictive lock mode** — share locks fo → Chapter 32: Transaction Design Patterns
ADATA
Compiler-associated data produced when the ADATA compiler option is specified. Contains detailed symbol, cross-reference, and diagnostic information used by *COBOL analysis tools* and *static analysis* utilities. (Ch. 35) → Appendix F: Glossary
ADDR
An address constant or the ADDRESS OF special register in COBOL, which provides the memory address of a data item. Used primarily in inter-language communication and dynamic call scenarios. (Ch. 26) See also: *Pointer*, *ADDRESS OF*. → Appendix F: Glossary
ADDRESS OF
A COBOL special register that yields the memory address of a *linkage section* item or any level-01 or level-77 item in the working-storage or local-storage section. Central to *pointer-based processing* and *reference modification*. (Ch. 19) See also: *Pointer*, *Reference Modification*. → Appendix F: Glossary
Advantages observed:
Adding a new account type required one new file, zero changes to existing code - Each class was self-contained and testable independently - The inheritance hierarchy eliminated duplicated code (common operations defined once in BankAccount) - Polymorphism through interfaces allowed generic reporting → Case Study 25.1: GlobalBank Account Class Hierarchy
Advantages of COBOL SORT:
Complex filtering and transformation via INPUT/OUTPUT PROCEDUREs - Sort logic documented alongside business logic - Conditional sorting based on program state - Integration with program variables and control flow → Chapter 15: Sort and Merge
Advantages of JCL sort:
No COBOL program to compile and maintain - Directly leverages all sort utility features - Often faster for simple sorts (no COBOL overhead) - Easier to modify (change JCL, not source code) → Chapter 15: Sort and Merge
AIBTDLI
The Application Interface Block (AIB) version of the *DL/I* call interface used in *IMS* programming. Provides a standardized way to issue IMS database and message calls, replacing the older PCB-based CBLTDLI interface. (Ch. 31) → Appendix F: Glossary
A VSAM component that provides an additional access path to the records in a *base cluster*. An AIX is itself a KSDS whose records contain the alternate key and the primary key(s) of the base cluster records. Accessed through a *path*. (Ch. 12) See also: *KSDS*, *PATH*, *ALTERNATE RECORD KEY*. → Appendix F: Glossary
A clause in the FILE-CONTROL paragraph that defines a secondary key for an *indexed file* (typically a *VSAM KSDS* with an *alternate index*). Allows retrieval by a key other than the primary key. (Ch. 12) See also: *KSDS*, *Alternate Index*, *RECORD KEY*. → Appendix F: Glossary
A modernization technique in which a legacy COBOL program is left intact but is fronted by an API layer (typically REST/JSON or SOAP/XML) that translates modern service requests into calls the COBOL program understands. Preserves proven business logic while enabling new integration patterns. (Ch. 37 → Appendix F: Glossary
Application Developer
Writing and maintaining COBOL programs for business applications. This is the most common path and the one this textbook prepares you for. → Chapter 1: The COBOL Landscape Today
APPLY WRITE-ONLY
A clause in the FILE-CONTROL paragraph or I-O-CONTROL paragraph that optimizes output buffering for sequential files by using a technique that reduces the number of physical I/O operations for variable-length records. (Ch. 14) → Appendix F: Glossary
Architect
Designing the overall structure of mainframe applications, including how COBOL programs interact with databases, message queues, web services, and modern front-ends. → Chapter 1: The COBOL Landscape Today
Arguments against PERFORM THRU:
Makes it easy to accidentally add a paragraph within the THRU range that should not be executed - Ties paragraph ordering to execution semantics — reordering paragraphs can break the program - Can mask spaghetti code by hiding GO TO within the THRU range → Chapter 7: Iteration Patterns
Arguments for PERFORM THRU:
Provides a clean exit point pattern (a common idiom pairs each logical paragraph with an exit paragraph) - Allows GO TO to an exit paragraph within the THRU range, enabling guard clauses - Groups related paragraphs into a logical unit → Chapter 7: Iteration Patterns
Use the Readiness Checklist (Section 1) and Application Inventory (Section 2) to understand your starting position. 2. **Decide** — Apply the Decision Framework (Section 3) to each application to determine the appropriate strategy. 3. **Justify** — Build the business case with the Cost-Benefit Templ → Appendix I: Migration & Modernization Toolkit
Assesses the current state
what questions would you ask? What data would you gather? 2. **Identifies risks** — what are the biggest risks of doing nothing? Of doing too much? 3. **Recommends a strategy** — where on the modernization spectrum would you position this organization? 4. **Proposes a phased roadmap** — what happens → Chapter 42: The Future of COBOL
ASSIGN TO assignment-name
Links the logical file to a physical entity. On z/OS, this is a DD name from the JCL. In GnuCOBOL, it is typically a filename or environment variable. → Chapter 11: Sequential File Processing
AWS Mainframe Modernization
https://aws.amazon.com/mainframe-modernization/ - **Azure Mainframe Migration** — https://azure.microsoft.com/solutions/mainframe-migration/ - **IBM Z as a Service** — https://www.ibm.com/z/cloud → Further Reading — Chapter 40: COBOL and the Modern Stack
B
batch cycles
sequences of COBOL programs orchestrated by JCL and job schedulers — that post transactions, calculate interest, generate statements, and reconcile accounts. A large bank's nightly batch window may execute thousands of COBOL programs in a carefully sequenced dependency chain. → Chapter 1: The COBOL Landscape Today
Batch Processing
A mode of execution in which programs run without interactive user input, processing large volumes of data in scheduled jobs. Batch is the dominant execution model for COBOL workloads, typically orchestrated through *JCL* and managed by *JES*. (Ch. 1, Ch. 38) See also: *JCL*, *JES*, *Online Processi → Appendix F: Glossary
Benefits of LSR:
Buffer pool is shared — a single pool can serve many files. - Hiperspace buffering (data space buffering) can extend the effective buffer pool. - CICS manages buffer allocation and look-aside (checking if a CI is already in a buffer before issuing I/O). → Appendix E: VSAM and File Organization Reference
Benefits:
Enable direct access by non-key fields - Eliminate full database scans for alternate lookups - Transparent to the application program (via PSB configuration) → Chapter 31: IMS/DB Basics
Bidirectional communication
the parameter carries input data to the subprogram and the subprogram modifies it to carry output data back. 3. **Performance matters** — passing an address is faster than copying data, especially for large structures. → Chapter 23: Parameter Passing Patterns
BLOCK CONTAINS
Specifies the blocking factor. Blocking combines multiple logical records into a single physical block, dramatically improving I/O performance: → Chapter 11: Sequential File Processing
Blocking:
`BLKSIZE` should be a multiple of `LRECL` for fixed-length records. - Optimal block size: code `BLKSIZE=0` and let SMS calculate the optimum (system-determined block size). - For variable-length: `BLKSIZE` = maximum block size = maximum LRECL + 4 (BDW) + 4 (RDW), typically. → Appendix C: JCL Quick Reference
Records actual execution paths during testing - Identifies code paths that are never exercised (dead code candidates) - Generates test data from production patterns → Chapter 41: Legacy Code Archaeology
Buffer
A region of memory used to hold data being transferred between a program and a storage device. Buffering reduces the number of physical I/O operations. The number of buffers can be controlled through JCL (*BUFNO*) and file definition parameters. (Ch. 14, Ch. 36) → Appendix F: Glossary
Build a portfolio
create GitHub repositories with COBOL programs, CI/CD pipelines, and documentation 3. **Get certified** — IBM offers mainframe certifications that employers recognize 4. **Network** — attend SHARE conferences, join the Open Mainframe Project community, connect with COBOL developers on LinkedIn 5. ** → Chapter 42: The Future of COBOL
Business Analyst / Domain Expert
COBOL developers who work in a single domain (banking, insurance) for years accumulate deep business knowledge that makes them invaluable as analysts and consultants, even if they stop coding. → Chapter 1: The COBOL Landscape Today
BY CONTENT
A CALL statement phrase indicating that a copy of the argument is passed to the subprogram. The called program receives its own copy and cannot modify the caller's original data. (Ch. 23) See also: *BY REFERENCE*, *BY VALUE*, *CALL*. → Appendix F: Glossary
BY REFERENCE
The default parameter-passing mechanism in COBOL CALL statements. The address of the argument is passed, allowing the called program to read and modify the caller's data directly. (Ch. 23) See also: *BY CONTENT*, *BY VALUE*, *CALL*. → Appendix F: Glossary
By the Numbers: COBOL's Footprint
**$3 trillion** in daily transactions processed by COBOL systems - **95%** of ATM swipe transactions touch COBOL code - **80%** of in-person transactions involve COBOL at some layer - **43%** of banking systems are built on COBOL - **220 billion** lines of COBOL are in active production use - **1.5 → Chapter 1: The COBOL Landscape Today
BY VALUE
A CALL statement phrase indicating that the binary value of the argument is passed on the call stack, consistent with C calling conventions. Essential for inter-language communication with C, Java, and other languages. (Ch. 23, Ch. 26) See also: *BY REFERENCE*, *BY CONTENT*, *Inter-Language Communic → Appendix F: Glossary
financial formulas, date calculations, rate lookups - **Validation rules** — field edits, range checks, cross-field validations - **Decision logic** — EVALUATE statements with many branches, complex IF nesting - **Error handling** — what happens when things go wrong? → Chapter 34: Unit Testing COBOL
CALL
A COBOL statement that transfers control to a subprogram. CALL can be *static* (resolved at link-edit time) or *dynamic* (resolved at run time through the *DYNAM* compiler option or a CALL identifier). (Ch. 22) See also: *Static Call*, *Dynamic Call*, *Subprogram*, *CANCEL*. → Appendix F: Glossary
CANCEL
A COBOL statement that logically removes a dynamically called subprogram from memory, forcing it to be reloaded and re-initialized on the next CALL. Releases the storage occupied by the subprogram's working-storage. (Ch. 22) See also: *Dynamic Call*, *INITIAL*. → Appendix F: Glossary
Capacity analysis:
At 50ms per transaction, one CICS transaction instance can process 20 per second = 1,200 per minute - Current volume (8.3/minute) uses less than 1% of capacity - Even at projected peak (25/minute), utilization is approximately 2% - The system has enormous headroom — a factor of 50x between projected → Chapter 45: Capstone 3 — From Batch to Real-Time: A Full Migration Project
Catalog
On z/OS, a structured file (the *Integrated Catalog Facility*, or ICF catalog) that records the location and attributes of *datasets*. The *master catalog* is the top-level catalog; *user catalogs* are associated with specific high-level qualifiers. (Ch. 2) See also: *Dataset*, *IDCAMS*. → Appendix F: Glossary
catalogs
system-level repositories that track every VSAM data set's attributes and location. You define a VSAM file using the **IDCAMS** utility (Access Method Services), typically through JCL: → Chapter 12: Indexed File Processing (VSAM KSDS)
Challenges:
The 30% cost overrun was substantial - The project required years of parallel running (old and new systems simultaneously), which doubled operational complexity - Some complex business logic from the COBOL system was difficult to replicate and required significant rework - Organizational change mana → Case Study 2: Commonwealth Bank of Australia's Core Banking Overhaul
Changeman / Endeavor / ISPW
Commercial mainframe change management tools that include copybook impact analysis. Understanding these tools helps contextualize the copybook management challenges discussed in this chapter. → Further Reading: COBOL Program Structure Deep Dive
CHANNEL
In CICS, a named collection of *containers* passed between programs via LINK, XCTL, or START commands. Channels overcome the 32 KB limitation of the *COMMAREA*. (Ch. 30) See also: *CONTAINER*, *COMMAREA*. → Appendix F: Glossary
Chapter 10: Defensive Programming
Using copybooks for standardized error handling patterns - **Chapter 22: Subprograms and the CALL Statement** — How copybooks define the LINKAGE SECTION contract between calling and called programs - **Chapter 25: Coding Standards and Style** — Broader naming conventions that encompass copybook nami → Further Reading — Chapter 9: Copybooks and Code Reuse
Chapter 11: Sequential File Processing
Understanding sequential file I/O is prerequisite for sort operations. - **Chapter 14: Advanced File Techniques** — Multi-file processing patterns that often involve sort steps. - **Chapter 16: Report Writer** — Report Writer's control break handling provides a declarative alternative to manual cont → Further Reading — Chapter 15: Sort and Merge
Chapter 15: Sort and Merge
Sort operations often precede report generation; OUTPUT PROCEDUREs can contain Report Writer logic. - **Chapter 17: String Handling** — STRING and reference modification for building formatted output lines in manual report programs. - **Chapter 38: Batch Processing Patterns** — Reports as part of co → Further Reading — Chapter 16: Report Writer
Chapter 18: Table Handling and Searching
Tables often used in conjunction with string handling (lookup tables for code translation, abbreviation expansion). - **Chapter 19: Pointer and Reference Modification** — Deeper exploration of reference modification including complex offset computations. - **Chapter 20: Intrinsic Functions** — FUNCT → Further Reading — Chapter 17: String Handling
Chapter 25: Object-Oriented COBOL
An alternative modernization approach that stays within COBOL rather than bridging to other languages. - **Chapter 27: Embedded SQL Fundamentals** — Another inter-system interface, this time between COBOL and DB2. - **Chapter 29–32: CICS Programming** — Online transaction processing where inter-lang → Chapter 26 Further Reading
Chapter 26: Inter-Language Communication
An alternative modernization approach where COBOL collaborates with Java and C rather than adopting OO internally. - **Chapter 37: Modernization Strategies** — The broader context for deciding between OO COBOL, language migration, and other modernization paths. - **Chapter 22: Structured Programming → Chapter 25 Further Reading
Dynamic SQL, stored procedures, and performance tuning beyond the fundamentals. - **Chapter 29: Introduction to CICS** — Online transaction processing where embedded SQL meets real-time interactive programs. - **Chapter 26: Inter-Language Communication** — Another form of cross-system integration, t → Chapter 27 Further Reading
Covers CICS-specific testing techniques including CEDF (the CICS Execution Diagnostic Facility) and automated transaction testing. → Further Reading: CICS Fundamentals
Conditional expressions used in PERFORM UNTIL conditions and within loop bodies. - **Chapter 8: Paragraph and Section Design** — How to design paragraphs that are performed by loops — naming, cohesion, and the PERFORM THRU debate. - **Chapter 11: Table Handling Fundamentals** — PERFORM VARYING is th → Further Reading — Chapter 7: Iteration Patterns
Chapter 7: Iteration Patterns
Conditional logic frequently controls loop behavior through PERFORM UNTIL and TEST BEFORE/AFTER. - **Chapter 8: Paragraph and Section Design** — The structural strategies for reducing nesting (paragraph extraction, guard clauses) are explored as design principles. - **Chapter 29: Compliance Reportin → Further Reading — Chapter 6: Advanced Conditional Logic
Chapter 9: Copybooks and Code Reuse
Standardized error handling through shared copybooks (IO-STATUS, PAR-LOG) - **Chapter 11: Sequential File Processing** — Applying FILE STATUS checking in the most common I/O pattern - **Chapter 12: Indexed File Processing** — INVALID KEY handling for VSAM KSDS operations - **Chapter 22: Subprograms → Further Reading — Chapter 10: Defensive Programming
character moves
they copy bytes without any numeric conversion. Elementary moves between numeric fields perform the appropriate conversion (display to packed, packed to binary, etc.). This distinction is the #1 source of S0C7 abends in COBOL programs. → Chapter 33: Debugging Strategies
Characteristics:
Program starts, processes, and ends - No message processing - Checkpoint/restart for recovery - Typically used for batch updates, reports, data extracts → Chapter 31: IMS/DB Basics
the paragraph might be referenced through a computed GO TO or through a variable-based PERFORM (rare but possible). → Chapter 41: Legacy Code Archaeology
speak with organizations that have completed (not just started) modernization projects with the vendor. 7. **Negotiate** with awareness that modernization projects tend to be longer and more complex than initially estimated. Build flexibility into the contract. → Appendix I: Migration & Modernization Toolkit
Check SQLCODE after every SQL statement
detect failures before they cascade. - **Commit at logical business boundaries** — not after every statement (chatty) and not only at program end (mega-transaction). - **Hold locks for the shortest possible time** — calculate before locking, commit immediately after updating. - **Design compensation → Key Takeaways — Chapter 32: Transaction Design Patterns
Check the key feedback area
it tells you where IMS is positioned in the hierarchy, which is invaluable when GN calls return unexpected segments. → Chapter 31: IMS/DB Basics
Check the return code
RC 0 = success, RC 4 = warning, RC 8 = error, RC 12+ = severe error, RC 16 = catastrophic. 2. **Read the job log (JESMSGLG, JESJCL, JESYSMSG)** — look for the first error message. 3. **Check SYSPRINT** — compiler listings, utility messages, program output. 4. **Check CEEDUMP or SYSUDUMP** — for aben → Appendix C: JCL Quick Reference
CHKP (Checkpoint)
Establishes a sync point; commits all database changes since the last checkpoint - **XRST (Extended Restart)** — Used with CHKP for restart/recovery in batch programs - **ROLB (Rollback)** — Backs out changes to the last checkpoint - **PCB (Schedule/Terminate)** — In some environments, explicitly sc → Chapter 31: IMS/DB Basics
CI split
moving roughly half the records in the CI to a free CI within the same CA. If the CA has no free CIs, a **CA split** occurs, which is more expensive. Proper free-space allocation (discussed in Section 12.2.3) minimizes splits. → Chapter 12: Indexed File Processing (VSAM KSDS)
CICS Command
An EXEC CICS statement embedded in a COBOL program. CICS commands are preprocessed by the CICS translator (or the integrated CICS translator in Enterprise COBOL) before compilation. Common commands include READ, WRITE, SEND MAP, RECEIVE MAP, LINK, XCTL, RETURN, and SYNCPOINT. (Ch. 29, Ch. 30) → Appendix F: Glossary
Detailed reference for all DFHMSD, DFHMDI, and DFHMDF options. Covers advanced features like cursor positioning, dynamic attribute modification, and partition support. → Further Reading: CICS Fundamentals
CICS TS for z/OS Channel and Container Programming
claim number, status, amounts, dates 2. **MEMBER** — member name, ID 3. **PROVIDER** — provider name, network status 4. **PAYMENT** — payment amounts, copay, adjustments → Case Study 2: MedClaim's Claim Status Lookup Screen
CLM-INTAKE
Reads electronic claim submissions, validates them, and writes them to the CLAIM-MASTER file. 2. **CLM-ADJUD** — Reads claims from CLAIM-MASTER, applies business rules, determines payment amounts. 3. **CLM-PAY** — Reads adjudicated claims, generates payment transactions. 4. **RPT-PROVIDER** — Reads → Chapter 9: Copybooks and Code Reuse
COBCH
The COBOL compiler diagnostic message prefix for some Micro Focus COBOL messages. IBM Enterprise COBOL uses the prefix *IGYPA*, *IGYPS*, or *IGYCE* depending on the compiler phase. (Ch. 33) → Appendix F: Glossary
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. → Further Reading — Chapter 24: Nested Programs
COBOL as Part of Broader Courses:
Multiple community colleges offering COBOL in workforce development programs - University of Cape Town — Legacy systems modernization course includes COBOL - National University of Singapore — Enterprise software engineering includes COBOL modules → Chapter 42: The Future of COBOL
COBOL by the Numbers (2026)
**220+ billion** lines of COBOL in active production - **$3 trillion** in daily transaction volume through COBOL systems - **95%** of ATM transactions touch COBOL - **43%** of banking systems built on COBOL - **800,000** COBOL developers worldwide (estimated) - **Average age** of COBOL developers: 5 → Chapter 42: The Future of COBOL
was published in April 1960. By December of that year, COBOL programs were running on computers from two different manufacturers, demonstrating the portability that was the language's *raison d'être*. → Chapter 1: The COBOL Landscape Today
Historical documents from the committee that designed COBOL. Available in various archives. Fascinating for understanding why COBOL's structure was designed the way it was. → Further Reading: COBOL Program Structure Deep Dive
CODASYL COBOL Committee Reports
The original committee documents from the 1960s are available in various archives and provide fascinating insight into the design decisions that shaped the language. → Further Reading: The COBOL Landscape Today
Code Page
A mapping between byte values and characters. Mainframe COBOL typically uses EBCDIC code pages (e.g., 037 for US English, 500 for international). Understanding code pages is essential when processing data that crosses platform boundaries. (Ch. 17) See also: *EBCDIC*, *ASCII*, *CCSID*. → Appendix F: Glossary
Paragraph names like `2000-PROCESS` and `3000-PROCESSING` (what is the difference?) - Variables named `WS-WRK-FLD-1` through `WS-WRK-FLD-47` - GO TO statements creating spaghetti control flow - PERFORM THRU paragraphs with fall-through logic - Nested IF statements 10 levels deep with no scope termin → Chapter 41: Legacy Code Archaeology
Common IMS abend codes:
U0457 — PSB not found or not authorized - U0474 — Database not available - U0778 — DL/I call error (often a bad SSA format) - U3303 — IMS buffer pool full → Chapter 31: IMS/DB Basics
A COBOL USAGE clause specifying single-precision floating-point (4 bytes). On z/OS, may be IBM hexadecimal floating-point or IEEE 754, depending on the *FLOAT* compiler option. (Ch. 5) → Appendix F: Glossary
COMP-2
A COBOL USAGE clause specifying double-precision floating-point (8 bytes). (Ch. 5) See also: *COMP-1*. → Appendix F: Glossary
COMP-3
A COBOL USAGE clause specifying packed-decimal representation, where each byte contains two decimal digits (one in each nibble) except the last byte, which contains one digit and the sign. Also called *PACKED-DECIMAL*. The dominant numeric format for financial calculations in COBOL. (Ch. 5) See also → Appendix F: Glossary
Compiler Option
A parameter that controls the behavior of the COBOL compiler. Key Enterprise COBOL options include RENT, DYNAM, THREAD, OPTIMIZE, TEST, SSRANGE, ARITH, NUMCHECK, and XMLPARSE. Options are specified on the CBL/PROCESS card, in JCL, or through installation defaults. (Ch. 2, Ch. 33, Ch. 36) → Appendix F: Glossary
A JCL parameter on the JOB or EXEC statement that controls whether a job step is executed based on the *condition codes* returned by previous steps. Largely superseded by *IF/THEN/ELSE/ENDIF* in modern JCL. (Appendix C) See also: *Condition Code*. → Appendix F: Glossary
Condition Code
(1) In JCL, a numeric value (0–4095) returned by a program or job step indicating success or severity of problems. By convention, 0 = success, 4 = warning, 8 = error, 12 = severe error, 16 = terminal error. (2) In COBOL, the result of a conditional expression evaluation. (Ch. 2, Ch. 6) See also: *RE → Appendix F: Glossary
Condition flags
Set a processing flag (e.g., WS-OK-TO-PROCESS) and check it before each successive condition. Advantage: No GO TO required. Disadvantage: Repeated flag checking adds verbosity and the flag must be managed carefully. → Quiz — Chapter 6: Advanced Conditional Logic
In CICS, a named data area within a *channel* used to pass data between programs. Containers and channels are the modern replacement for the *COMMAREA*, supporting data areas larger than 32 KB. (Ch. 30) See also: *CHANNEL*, *COMMAREA*. → Appendix F: Glossary
context-sensitive
they are reserved only when they appear in specific syntactic positions. Outside those positions, they can be used as programmer-defined names. This was introduced to reduce the burden of the ever-growing reserved word list. → Appendix D: COBOL Reserved Words
CONTINUE
A COBOL statement that is a no-operation. Used as a placeholder in conditional statements (IF/EVALUATE) when no action is needed for a particular branch. (Ch. 6) → Appendix F: Glossary
Control Area (CA)
A VSAM organizational unit consisting of multiple *control intervals*. Control area splits occur when a CA runs out of free space and must be reorganized. (Ch. 12) See also: *Control Interval*, *VSAM*. → Appendix F: Glossary
Control Break
A report-processing pattern in which a change in the value of a control field triggers the printing of subtotals, headers, or other summary information. A fundamental COBOL batch processing pattern. (Ch. 16, Ch. 38) See also: *Report Writer*. → Appendix F: Glossary
COPY
A COBOL compiler-directing statement that includes the contents of a *copybook* at the point where the COPY statement appears. Supports the REPLACING phrase for text substitution during inclusion. (Ch. 9) See also: *Copybook*, *REPLACE*. → Appendix F: Glossary
A file containing COBOL source code (typically data definitions or procedure division paragraphs) intended to be included in multiple programs via the *COPY* statement. Copybooks promote consistency and reduce maintenance effort. Stored in *PDS* members on z/OS. (Ch. 9) See also: *COPY*, *PDS*. → Appendix F: Glossary
Costs:
Additional I/O overhead on every insert, update, and delete (the index must be maintained) - Additional disk space for the index database - Additional logging and recovery overhead - Index database must be reorganized periodically → Chapter 31: IMS/DB Basics
In *BMS*, the technique of placing the screen cursor at a specific field position. Achieved by setting the cursor attribute in the symbolic map or using the CURSOR option on SEND MAP. (Ch. 29) → Appendix F: Glossary
Cursor Stability (CS)
The default, and the right choice for most online transactions. It locks the current row only while the cursor is positioned on it. When you FETCH the next row, the previous lock is released. This provides a good balance between concurrency and consistency for typical CICS transactions. → Chapter 28: Advanced DB2 Programming
[ ] How many files? Input vs. output? - [ ] How many record types (REDEFINES on FD records)? - [ ] What are the key fields (account numbers, claim numbers)? - [ ] What flags control processing flow (88-level items)? - [ ] What tables are loaded (OCCURS DEPENDING ON)? - [ ] Where are the financial to → Chapter 41: Legacy Code Archaeology
Dataset
The z/OS term for a file. Datasets are cataloged in the *ICF catalog* and have a 44-character name organized in dot-separated qualifiers (e.g., PROD.PAYROLL.MASTER). Dataset organization types include *PS* (sequential), *PO* (partitioned), and *VSAM*. (Ch. 2, Ch. 11) See also: *PDS*, *VSAM*, *Sequen → Appendix F: Glossary
DB2
IBM's relational database management system for z/OS (and other platforms). COBOL programs access DB2 through *embedded SQL* statements (EXEC SQL ... END-EXEC). DB2 is the dominant relational database on the mainframe. (Ch. 27, Ch. 28) See also: *Embedded SQL*, *SQLCA*, *DCLGEN*. → Appendix F: Glossary
DD Statement
Defines a dataset (file) for the step: ```jcl //INFILE DD DSN=PROD.TRANS.DAILY,DISP=SHR //OUTFILE DD DSN=PROD.TRANS.POSTED, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(50,10),RLSE), // DCB=(RECFM=FB,LRECL=200,BLKSIZE=0) //SYSOUT DD SYSOUT=* ``` → Chapter 2: Development Environment Setup
Deadlock
A situation in which two or more tasks are each waiting for a resource held by the other, resulting in none of them being able to proceed. DB2 and CICS detect deadlocks and roll back one of the participating tasks. (Ch. 28, Ch. 32) See also: *Lock*, *Timeout*, *SQLCODE -911*. → Appendix F: Glossary
Debug Tool
IBM's interactive debugger for z/OS (now called z/OS Debugger). Allows setting breakpoints, inspecting and modifying variables, and stepping through COBOL programs executing in batch, CICS, IMS, or DB2 stored procedure environments. (Ch. 33) → Appendix F: Glossary
Debugging
The process of identifying and correcting errors in a program. COBOL debugging techniques include DISPLAY statement tracing, compiler options (TEST, SSRANGE), *IBM Debug Tool* / *z/OS Debugger*, dump analysis, and log analysis. (Ch. 33) See also: *Dump*, *SSRANGE*, *Debug Tool*. → Appendix F: Glossary
describing *what* you want rather than *how* to produce it. The same philosophy appears in: → Chapter 16: Report Writer
DECLARATIVES
A section of the COBOL Procedure Division that contains USE statements for specifying procedures to handle exceptional conditions such as I/O errors. Declarative procedures are invoked automatically by the runtime when the specified condition occurs. (Ch. 10, Ch. 14) See also: *USE AFTER*, *File Sta → Appendix F: Glossary
Dedicated COBOL Courses:
University of Limerick (Ireland) — COBOL in the CS curriculum since 2020 - University of North Texas — Mainframe programming with IBM Academic Initiative - Northern Illinois University — COBOL and mainframe computing - Sungkyunkwan University (South Korea) — COBOL for financial systems - SUNY Bingha → Chapter 42: The Future of COBOL
the validation gate, overflow guards, output initialization, envelope pattern, and documented contracts — prevents the most common parameter-related bugs. - **RETURN-CODE** operates outside the parameter passing mechanism and communicates the job-level condition code to the operating system and JCL → Chapter 23: Parameter Passing Patterns
Define the API contract
Design the REST endpoint (URL, HTTP method, request/response JSON schema) based on the COBOL program's input/output copybooks - [ ] **Map data types** — Document the mapping between COBOL data types and JSON types (PIC 9 → number, PIC X → string, COMP-3 → number, dates → ISO 8601 strings) - [ ] **Ch → Appendix I: Migration & Modernization Toolkit
Deliverables:
Complete COBOL program - JCL to compile and run - Test control file with at least 5 operations - Expected output for each operation → Exercises: Advanced DB2 Programming
Deployment Metrics — After CI/CD
Average time from code complete to production: **3 business days** - Deployments per month: **12** (on-demand) - Deployment success rate: **98%** - Time to detect compile errors: **3 minutes** - Time to detect integration issues: **15 minutes** → Chapter 40: COBOL and the Modern Stack
Deployment Metrics — Before CI/CD
Average time from code complete to production: **14 business days** - Deployments per month: **2** (bi-weekly release windows) - Deployment success rate: **87%** (13% required rollback) - Time to detect compile errors: **4-6 hours** (overnight compile batch) - Time to detect integration issues: **2- → Chapter 40: COBOL and the Modern Stack
Derek Washington
Junior COBOL Developer (8 months at GlobalBank) Derek graduated with a computer science degree focused on Python and JavaScript. He took one COBOL course as an elective because a guest lecturer from a bank mentioned the salary premium. He was hired into GlobalBank's new COBOL Academy program, which → Chapter 1: The COBOL Landscape Today
A set of practices combining software development (Dev) and IT operations (Ops) to shorten the development lifecycle. Mainframe DevOps applies CI/CD, automated testing, and infrastructure-as-code principles to COBOL and z/OS environments. (Ch. 40) See also: *CI/CD*. → Appendix F: Glossary
DFHMDF
Field Definition: - `POS=(row,col)` — Screen position - `LENGTH=n` — Field length in characters - `ATTRB` — Field attributes: - `ASKIP` — Auto-skip (read-only, cursor skips over) - `UNPROT` — Unprotected (user can type in this field) - `BRT` — Bright (high intensity) - `NORM` — Normal intensity - `D → Chapter 29: CICS Fundamentals
Map Set Definition: - `TYPE=&SYSPARM` — Allows generating physical or symbolic map from same source - `MODE=INOUT` — Map is used for both sending and receiving data - `LANG=COBOL` — Generate COBOL copybook for symbolic map - `STORAGE=AUTO` — Each task gets its own copy of the map area - `TIOAPFX=YES → Chapter 29: CICS Fundamentals
IBM's DFSORT can perform many multi-file operations (merge, match, compare) without custom COBOL code. Understanding DFSORT capabilities helps you choose between COBOL programs and utility-based approaches. → Further Reading — Chapter 14: Advanced File Techniques
Compilation required Micro Focus COBOL; IBM Enterprise COBOL on z/OS could not compile the full hierarchy - Runtime performance was 15% slower than the procedural version (method dispatch overhead) - Only Priya and one external consultant could maintain the OO code - Debugging tools had limited OO s → Case Study 25.1: GlobalBank Account Class Hierarchy
DISPLAY
(1) A COBOL USAGE clause specifying zoned-decimal representation, where each digit occupies one byte (the default for numeric items without an explicit USAGE). (2) A COBOL statement that writes data to the default output device (typically SYSOUT in batch). (Ch. 3, Ch. 5, Ch. 33) See also: *COMP*, *C → Appendix F: Glossary
DL/I is navigational, not declarative
you tell IMS how to traverse the hierarchy, one segment at a time, unlike SQL where you describe what you want and the optimizer figures out how. → Key Takeaways — Chapter 31: IMS/DB Basics
DLET (Delete)
Deletes the segment most recently retrieved with a hold call *and all its dependents*. If you delete an ACCOUNT segment, all TRANSACTION and LOAN segments under it are also deleted. → Chapter 31: IMS/DB Basics
Documentation
data dictionaries, interface specifications — must be refreshed. 7. **Downstream systems** that consume the data must be notified. → Chapter 9: Copybooks and Code Reuse
Dump
A formatted display of the contents of a program's storage areas at the time of an *ABEND*. Tools like IPCS (Interactive Problem Control System) format dumps for analysis. COBOL programs can request a dump via a CALL to CEE3DMP or ILBOABN0. (Ch. 33) See also: *ABEND*, *IPCS*. → Appendix F: Glossary
DYNAM
A COBOL compiler option that causes CALL literal statements to be treated as dynamic calls, resolving the subprogram at run time rather than at link-edit time. (Ch. 22) See also: *Dynamic Call*, *Static Call*. → Appendix F: Glossary
Dynamic Call
A CALL statement that resolves the target subprogram name at run time by loading it from a load library. Achieved through CALL identifier or through the *DYNAM* compiler option with CALL literal. Dynamic calls allow subprograms to be updated independently. (Ch. 22) See also: *Static Call*, *CANCEL*, → Appendix F: Glossary
scanning for delimiters, extracting tokens, parsing variable-format records — are built by combining reference modification with position-tracking variables. - **The pointer build pattern** — maintaining a position counter and appending pieces via reference modification — is the standard COBOL idiom → Chapter 19: Pointer and Reference Modification
E
Each step must be idempotent
running it twice produces the same result as running it once (where possible) 2. **Each step must check for prior completion** — skip processing if already done 3. **Each step must produce clear return codes** 4. **Each step must write control totals** — so the next step can verify it received the c → Chapter 38: Batch Processing Patterns
EIBRESP
The EIB field containing the numeric response code from the last CICS command. Testing EIBRESP (using DFHRESP symbolic values like NORMAL, NOTFND, DUPKEY) is the modern alternative to HANDLE CONDITION for error handling. (Ch. 29, Ch. 30) See also: *EIB*, *RESP*, *HANDLE CONDITION*. → Appendix F: Glossary
Elementary Item
A COBOL data item that is not further subdivided; it has a PICTURE clause. Contrast with a *group item*, which is subdivided into elementary items or other groups. (Ch. 4) See also: *Group Item*, *PICTURE*. → Appendix F: Glossary
Embedded SQL
SQL statements coded directly within a COBOL program, delimited by EXEC SQL and END-EXEC. The DB2 precompiler (or coprocessor) translates embedded SQL into COBOL CALL statements before compilation. (Ch. 27, Ch. 28) See also: *DB2*, *Host Variable*, *SQLCA*, *DCLGEN*. → Appendix F: Glossary
The syntax should resemble English prose. 2. **Business orientation** — The language prioritizes fixed-point decimal arithmetic, record-oriented I/O, and report generation. 3. **Portability** — COBOL programs should run on different hardware with minimal modification. 4. **Backward compatibility** — → Chapter 1: The COBOL Landscape Today
Enhanced JSON/XML Support:
Schema validation during JSON PARSE (reject messages that do not conform to a schema) - JSONPath expressions for extracting nested fields - XML namespace handling improvements - Support for JSON arrays with mixed types → Chapter 42: The Future of COBOL
A COBOL statement that establishes an alternate entry point in a subprogram. Allows a single load module to present multiple callable interfaces. Less common in modern COBOL; separate subprograms are preferred. (Ch. 22) → Appendix F: Glossary
ENVIRONMENT DIVISION
for copying SELECT statements or special-names entries - **DATA DIVISION** — for record layouts, working-storage groups, or condition names (most common) - **PROCEDURE DIVISION** — for paragraph or section text → Chapter 9: Copybooks and Code Reuse
Environment reproducibility
the same container runs identically in dev, test, and production - **Scaling** — spin up more instances when load increases - **Isolation** — each service runs in its own container with its own dependencies → Chapter 40: COBOL and the Modern Stack
EVALUATE
A COBOL conditional statement that provides multi-way branching (similar to switch/case in other languages). EVALUATE can test multiple subjects against multiple conditions simultaneously using EVALUATE TRUE, EVALUATE variable, or compound subjects. (Ch. 6) See also: *IF*, *CONTINUE*. → Appendix F: Glossary
Every DL/I call gets an EVALUATE
check for spaces (success), GE (not found), and OTHER (unexpected error). - **Use qualified SSAs whenever possible** — they let IMS navigate directly instead of scanning. - **Use the D command code** to retrieve multiple segments in a path with a single call. - **Minimize DL/I call count** — each ca → Key Takeaways — Chapter 31: IMS/DB Basics
The prefix that begins an embedded command in COBOL: EXEC SQL for *DB2*, EXEC CICS for *CICS*, EXEC DLI for *IMS*. These statements are processed by a precompiler or translator before COBOL compilation. (Ch. 27, Ch. 29, Ch. 31) → Appendix F: Glossary
**BR-010:** Claims over $50,000 require pre-authorization - **BR-011:** Pre-authorization must not be expired (days remaining > 0) - **BR-012:** Claims $50,000 or less do not require pre-authorization - **BR-013:** Denied reasons: AUTH-EXP (expired authorization), NO-AUTH (no authorization on file) → Chapter 41: Legacy Code Archaeology
F
False
PIC A allows only alphabetic characters (A-Z, a-z) and spaces. 12. **True** — COMP-5 uses the full binary range; PIC affects only display formatting. 13. **False** — Level 77 items are elementary items and cannot have subordinates. 14. **False** — VALUE is not permitted in the FILE SECTION. 15. **Tr → Quiz — Chapter 4: Data Description Mastery
Favor OO COBOL when:
You are building a significant new subsystem (not modifying existing code) - Your team has OO experience (from Java, C#, or training) - Your compiler fully supports OO COBOL (Micro Focus) - The domain has natural object hierarchies (banking products, insurance claim types) - Long-term maintainabilit → Chapter 25: Object-Oriented COBOL
Favor procedural COBOL when:
You are maintaining existing production code - Your team is procedural-only - Your compiler has limited OO support - The domain is primarily batch data transformation - Short-term delivery is the priority → Chapter 25: Object-Oriented COBOL
FD (File Description) Clauses:
**RECORDING MODE:** `F` (fixed), `V` (variable), `U` (undefined), `S` (spanned). Most COBOL files use fixed-length records. - **RECORD CONTAINS n CHARACTERS:** Specifies the record length. - **BLOCK CONTAINS 0 RECORDS:** Tells the system to use optimal blocking (0 means "let the system decide"). On → Chapter 3: COBOL Program Structure Deep Dive
FILE STATUS
A two-byte data item defined in the FILE-CONTROL paragraph that receives a status code after every I/O operation. The first byte indicates the category (0 = success, 1 = at-end, 2 = invalid key, 3 = permanent error, 9 = implementor-defined). Checking file status is a fundamental *defensive programmi → Appendix F: Glossary
FILE STATUS IS status-variable
Specifies a two-character field that receives the result of every I/O operation on this file. As Chapter 10 established, this is **mandatory for defensive programming**: → Chapter 11: Sequential File Processing
FILE-CONTROL
The paragraph within the ENVIRONMENT DIVISION's INPUT-OUTPUT SECTION that associates COBOL internal file names (SELECT) with external file identifiers (ASSIGN) and specifies file organization and access mode. (Ch. 11, Ch. 12) See also: *SELECT*, *ASSIGN*, *Organization*, *Access Mode*. → Appendix F: Glossary
FILLER
A COBOL reserved word used as a data-name for data items that do not need to be referenced by name. Commonly used in record layouts, screen definitions, and group items to define positional padding. In COBOL 85 and later, the word FILLER is optional for unnamed items. (Ch. 4) → Appendix F: Glossary
Financial patterns
penny distribution, compound interest, loan amortization, claim proration — all require careful attention to precision, rounding, and verification. → Chapter 5: Numeric Precision and Arithmetic
Fixed-Point Arithmetic
Arithmetic operations performed on numbers with a fixed number of decimal places, as opposed to floating-point. COBOL's default arithmetic model uses fixed-point decimal (*COMP-3* or *DISPLAY* numeric), which is preferred for financial calculations because it avoids floating-point rounding errors. ( → Appendix F: Glossary
For each transaction, specify:
Number of screens and their purpose - COMMAREA structure - TSQ usage (if any) - TDQ usage (if any) - DB2 tables accessed - LINK vs XCTL relationships between programs - START usage for async operations (overdue notices, etc.) - Security requirements - Error handling strategy → Exercises: Advanced CICS Programming
recompile against the new copybook 2. **Java web portal** — update the ClaimRecord Java class 3. **Python analytics** — update the claim record parsing logic 4. **EDI gateway** — update the mapping between X12 837 and MedClaim internal format 5. **Database** — update the DB2 table if the claim recor → Case Study 9.2: MedClaim's Cross-System Copybook Strategy
Fragile to maintenance
If a programmer adds a paragraph between 2100 and 2199, it becomes part of the THRU range. This is a real risk in large teams. → Chapter 8: Paragraph and Section Design
FREESPACE(ci-percent ca-percent):
`ci-percent` — Percentage of each CI to leave free during initial load or reorganization. Free space within CIs allows records to be inserted without splitting. - `ca-percent` — Percentage of CIs within each CA to leave empty. Free CIs accommodate CI splits without triggering CA splits. - Typical va → Appendix E: VSAM and File Organization Reference
Real-time transaction notifications to mobile app - **GBANK.INQUIRY.REQUEST** / **GBANK.INQUIRY.REPLY** — Balance inquiry from web - **GBANK.ALERT.FRAUD** — Fraud detection system triggers - **GBANK.FEED.EXTERNAL** — External data feeds from card networks → Chapter 39: Real-Time Integration
GDG Housekeeping Checklist
Verify GDG limit is set appropriately (too low = premature rolloff, too high = wasted DASD) - Monitor DASD consumption — 365 generations of a large file consume significant space - Periodically verify that the GDG base and all active generations are consistent in the catalog - Use IDCAMS LISTCAT to → Chapter 38: Batch Processing Patterns
Get Next (GN)
Sequential retrieval. Moves forward in hierarchical sequence from the current position. Like a cursor FETCH NEXT, but through the entire database hierarchy. → Chapter 31: IMS/DB Basics
Get Next within Parent (GNP)
Sequential retrieval constrained to the current parent. If you are positioned on a customer, GNP retrieves the next child segment (account, address) under *that* customer only. When all children are exhausted, you get a GE (not found) status. → Chapter 31: IMS/DB Basics
Get Unique (GU)
Direct retrieval. Jumps directly to a specific segment based on fully qualified SSAs. Like a SQL `SELECT ... WHERE primary_key = value`. → Chapter 31: IMS/DB Basics
GETMAIN
A CICS command that allocates a block of storage. Used when a program needs dynamic memory beyond its working-storage. FREEMAIN releases the acquired storage. (Ch. 30) → Appendix F: Glossary
A legacy banking application handling accounts, transactions, and reporting. You'll watch it evolve from simple batch processing to a fully modernized system with online capabilities. → Intermediate COBOL: Beyond the Basics
GlobalBank Nightly Batch Window
**11:00 PM** — Online regions quiesce, batch window opens - **11:15 PM** — Extract jobs pull daily transactions - **11:45 PM** — Validation and enrichment jobs - **12:30 AM** — Core processing: interest calculation, fee assessment - **2:00 AM** — Account updates: post transactions to master files - → Chapter 38: Batch Processing Patterns
GnuCOBOL
An open-source COBOL compiler (formerly OpenCOBOL) that translates COBOL to C, then compiles the C to a native executable. Provides a way to learn and practice COBOL on Linux, macOS, and Windows without a mainframe. (Ch. 2) See also: *Enterprise COBOL*. → Appendix F: Glossary
GnuCOBOL Community
Forums and mailing lists for the open-source COBOL compiler. - **Micro Focus Community Forums** — Discussion boards for Micro Focus COBOL users, including OO COBOL topics. → Chapter 25 Further Reading
Practical guide to COBOL-C interoperability using the free GnuCOBOL compiler. - **IBM Z Xplore** (https://www.ibm.com/z/resources/zxplore) — Free cloud environment for experimenting with z/OS COBOL, C, and inter-language calls. → Chapter 26 Further Reading
Comprehensive documentation for GnuCOBOL, including installation, compiler options, and language extensions. Available at the GnuCOBOL project site. → Further Reading: Development Environment Setup
A delightful television appearance where Rear Admiral Hopper explains computing concepts (including the origin of the word "bug") to a general audience. Available on YouTube. → Further Reading: The COBOL Landscape Today
Group Item
A COBOL data item that is subdivided into one or more subordinate items. A group item does not have a PICTURE clause; its size is the sum of its subordinate items. Group items are always treated as alphanumeric when used in operations. (Ch. 4) See also: *Elementary Item*, *Level Number*. → Appendix F: Glossary
For sequential processing: At least 2 data buffers per string (number of concurrent I/O operations). More buffers enable read-ahead. - For random processing: Buffer the entire index component if possible, plus 2-3 data buffers. - Formula for index buffering: `index CI size * number of index levels * → Appendix E: VSAM and File Organization Reference
H
HANDLE CONDITION
An older CICS command that establishes a label to branch to when a specified condition occurs. Considered legacy practice; modern CICS programming uses the *RESP* option and explicit testing of *EIBRESP*. (Ch. 29) See also: *EIBRESP*, *RESP*. → Appendix F: Glossary
Handle the case where no selection is found
the user pressed Enter without typing 'S' anywhere 4. **Calculate the TSQ item number** from the screen row position: item = top-item + selected-row - 1 → Chapter 30: Advanced CICS Programming
managing member eligibility, benefits, and claims (similar to insurance) - **Hospital billing systems** — translating medical procedures into billing codes and generating claims - **Pharmacy benefit management** — adjudicating prescription drug claims in real time - **Government health programs** — → Chapter 1: The COBOL Landscape Today
Hercules
An open-source IBM mainframe emulator that runs on Windows, Mac, or Linux - **GnuCOBOL** — A free, open-source COBOL compiler that runs natively on modern operating systems - **IBM Z Xplore** — A free, cloud-based environment provided by IBM for students to learn z/OS → Chapter 1: The COBOL Landscape Today
The first (leftmost) qualifier of a *dataset name*. On z/OS, the HLQ is typically the TSO user ID or a group identifier and is used by RACF for security authorization. (Ch. 2) See also: *Dataset*, *DSN*. → Appendix F: Glossary
Hints:
Use a separate sequential file for the checkpoint record - Remember to REWRITE the checkpoint record, not WRITE a new one each time - On restart, read through the input file to skip already-processed records → Exercises — Chapter 38: Batch Processing Patterns
Hold variants (GHU, GHN, GHNP)
Identical to GU, GN, GNP, but they establish a **hold** on the retrieved segment, allowing you to subsequently issue REPL (replace) or DLET (delete). You *must* use a hold call before updating or deleting. → Chapter 31: IMS/DB Basics
Host Variable
A COBOL data item referenced within an *embedded SQL* statement. Host variables are prefixed with a colon in SQL statements (e.g., :WS-EMPLOYEE-ID) and serve as the bridge between COBOL working-storage and DB2 columns. (Ch. 27) See also: *Embedded SQL*, *DCLGEN*, *Indicator Variable*. → Appendix F: Glossary
Over 200 universities worldwide have access to z/OS through IBM Z Xplore - Free cloud-hosted mainframe environments for students - Structured learning paths from beginner to advanced → Chapter 42: The Future of COBOL
IBM ADDI Dependency Analysis:
Traces data flow across programs (field A in program X feeds field B in program Y via a shared file) - Identifies all programs affected by a copybook change - Maps DB2 table usage across all programs → Chapter 41: Legacy Code Archaeology
Complete SQL syntax reference including all SQLCODE values and SQLSTATE mappings. - **IBM DB2 for z/OS: Codes** — Comprehensive listing of all DB2 message codes, return codes, and reason codes. Essential for debugging. - **IBM Enterprise COBOL for z/OS: Programming Guide** — Chapter on "Programming → Chapter 27 Further Reading
IBM's official language reference and programming guide. Available free online at IBM Documentation. Essential reference for z/OS COBOL development. → Further Reading: Development Environment Setup
IBM Enterprise COBOL for z/OS: Language Reference
Chapter on Compiler-Directing Statements, COPY statement section. The definitive reference for COPY syntax, REPLACING rules, and library handling on z/OS. - Available at: IBM Documentation (online), SC27-1408 → Further Reading — Chapter 9: Copybooks and Code Reuse
IBM Enterprise COBOL for z/OS: Programming Guide
"Using copy libraries" section. Practical guidance on copybook organization, SYSLIB concatenation, and compiler options for copybook handling. - Available at: IBM Documentation (online), SC27-1412 → Further Reading — Chapter 9: Copybooks and Code Reuse
IBM Enterprise COBOL: Best Practices
IBM Redpaper or Redbook (search IBM Redbooks for "COBOL best practices"). Provides IBM's own recommendations for program structure, coding standards, and performance. → Further Reading: COBOL Program Structure Deep Dive
IBM's coding standards for decades recommended PERFORM THRU with EXIT paragraphs. Many large enterprise codebases use this pattern exclusively. → Chapter 8: Paragraph and Section Design
Discusses how nested programs interact with modernization strategies, including when to refactor nested programs to external subprograms to enable service-oriented access. → Further Reading — Chapter 24: Nested Programs
Full z/OS environment in the cloud - **Wazi as a Service** — Development and test z/OS instances - **Hyper Protect Virtual Servers** — Secure z/OS workloads on IBM Cloud → Chapter 40: COBOL and the Modern Stack
Free hands-on learning platform for mainframe development. Includes exercises on data description and record layout design. [ibm.com/it-infrastructure/z/education/zxplore](https://ibm.com/it-infrastructure/z/education/zxplore) → Further Reading — Chapter 4: Data Description Mastery
Complete reference for system ABENDs (S0C7, S0C4, etc.) and user ABENDs. Essential for diagnosing production failures. - Available at: IBM Documentation (online), SA38-0665 → Further Reading — Chapter 10: Defensive Programming
IBM-MAIN mailing list
Long-running community discussion list for mainframe professionals. Excellent for asking questions about z/OS, JCL, and COBOL in production environments. → Further Reading: Development Environment Setup
IDCAMS
An IBM utility program (Access Method Services) used to define, alter, delete, and manage *VSAM* datasets, *catalogs*, *alternate indexes*, and other data objects. Invoked through JCL with SYSIN control statements. (Ch. 12) See also: *VSAM*, *Catalog*. → Appendix F: Glossary
idempotent
safe to execute multiple times. If the compensation itself fails and is retried, it must produce the same result. This is why we use UPDATE with specific status values rather than DELETE: if the compensation runs twice, the second UPDATE simply sets a value that is already set. → Chapter 32: Transaction Design Patterns
The fundamental COBOL conditional statement. Supports nested IF, IF/ELSE, and compound conditions using AND, OR, and NOT. The scope terminator END-IF (introduced in COBOL 85) is strongly preferred over period-terminated conditionals. (Ch. 6) See also: *EVALUATE*, *END-IF*. → Appendix F: Glossary
Standardized interfaces for calling C, Java, and Python functions - Portable binary data formats for cross-platform COBOL communication - Unicode (UTF-8) as a first-class data type → Chapter 42: The Future of COBOL
IMS organizes data hierarchically
segments in parent-child trees, not rows in flat tables. Understanding the hierarchy is prerequisite to writing correct DL/I calls. → Key Takeaways — Chapter 31: IMS/DB Basics
Increasing the file size
If the load factor has crept above 80%, allocate a larger file (typically 150% of the current record count) 2. **Evaluating the hash function** — If the data distribution has shifted (e.g., a new branch series was added with account numbers clustered in a narrow range), the hash function may need ad → Chapter 13: Relative Files and RRDS
Indicator Variable
In *embedded SQL*, a halfword (*PIC S9(4) COMP*) variable associated with a host variable. Indicates null values (value = -1), truncation (value = positive), or normal data (value = 0). Essential for handling nullable database columns. (Ch. 27) See also: *Host Variable*, *NULL*. → Appendix F: Glossary
Industry Snapshot: Banking
92 of the world's top 100 banks use IBM mainframes - Core banking COBOL codebases range from 5 million to 100+ million lines - Average age of core banking code: 25–35 years - Daily transaction volumes: billions of individual operations → Chapter 1: The COBOL Landscape Today
INITIAL
A clause on a PROGRAM-ID that specifies the program is in its initial state each time it is called (working-storage is re-initialized). Useful when a subprogram must not retain state between calls. (Ch. 22) See also: *CANCEL*, *Working-Storage Section*. → Appendix F: Glossary
INITIALIZE
A COBOL statement that sets data items to predetermined values based on their category: alphanumeric items to spaces, numeric items to zeros. Supports the REPLACING phrase for custom initialization. A safer alternative to MOVE SPACES or MOVE ZEROS to a group item. (Ch. 4, Ch. 10) → Appendix F: Glossary
Inline PERFORM
A PERFORM statement with the executed statements coded directly between PERFORM and END-PERFORM, rather than referencing a separate paragraph. Introduced in COBOL 85. (Ch. 7) See also: *PERFORM*, *Out-of-Line PERFORM*. → Appendix F: Glossary
INSPECT
A COBOL statement that examines and optionally modifies characters or groups of characters in a data item. Supports TALLYING (counting), REPLACING, and CONVERTING operations. A key tool for *string handling*. (Ch. 17) See also: *STRING*, *UNSTRING*. → Appendix F: Glossary
Inter-Language Communication (ILC)
The practice of COBOL programs calling or being called by programs written in other languages (C, Java, PL/I, Assembler). Requires careful attention to *calling conventions*, *data representation*, and the *Language Environment* runtime. (Ch. 26) See also: *BY VALUE*, *Language Environment*. → Appendix F: Glossary
Internet required
no offline development - **Shared system** — performance may vary depending on other users - **Session limits** — connections may time out after periods of inactivity - **IBM's schedule** — the system has occasional maintenance windows - **Dataset space limits** — as a shared educational system, you → Chapter 2: Development Environment Setup
IRS
Tax return processing, refund calculation, audit selection - **Social Security Administration** — Benefit calculation, eligibility determination, payment processing - **State unemployment systems** — The COVID-19 pandemic in 2020 famously exposed the fragility of state unemployment systems, many run → Chapter 1: The COBOL Landscape Today
IS INITIAL
Specifies that the program's working storage is re-initialized every time it is called. Without this clause, COBOL programs retain their working storage values between calls (this is called being "resident" or "quasi-reentrant" in CICS terms). - **IS COMMON** — In nested programs, marks the program → Chapter 3: COBOL Program Structure Deep Dive
ISO 8601
International standard for date and time representations (YYYY-MM-DD format). Understanding ISO 8601 helps when interfacing COBOL systems with modern APIs and web services. → Further Reading: Date and Time Processing
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. → Further Reading — Chapter 24: Nested Programs
ISO/IEC 1989:2023
The official COBOL language standard. Expensive to obtain from ISO, but draft versions circulate in the standards community. Useful for understanding the "canonical" language definition versus vendor extensions. → Further Reading: COBOL Program Structure Deep Dive
ISRT (Insert)
Adds a new segment occurrence to the database. You fill the I/O area with the segment data and specify SSAs to indicate where in the hierarchy the new segment should be placed. → Chapter 31: IMS/DB Basics
It tests a small unit of logic
typically a single function or method. 2. **It is automated** — it runs without human intervention and reports pass/fail. 3. **It is isolated** — it does not depend on files, databases, networks, or other external resources. 4. **It is repeatable** — it produces the same result every time. 5. **It i → Chapter 34: Unit Testing COBOL
J
James Okafor
Team Lead, Claims Processing James has been in insurance IT for twenty years, the last twelve at MedClaim. He leads a team of eight developers responsible for the claims adjudication engine — the heart of MedClaim's system. James is a pragmatic leader who believes in thorough testing, clear document → Chapter 1: The COBOL Landscape Today
JOB Statement
The first statement in a JCL job stream, identified by //jobname JOB. Specifies the job name, accounting information, message class, and job-level parameters such as REGION and TIME. (Appendix C) See also: *JCL*, *EXEC Statement*, *DD Statement*. → Appendix F: Glossary
A COBOL statement (Enterprise COBOL 6.1+) that converts a COBOL data structure to JSON text. Enables COBOL programs to produce JSON output for REST APIs and modern integration patterns. (Ch. 39, Ch. 40) See also: *JSON PARSE*, *XML GENERATE*. → Appendix F: Glossary
JSON PARSE
A COBOL statement (Enterprise COBOL 6.1+) that parses JSON text and populates a COBOL data structure. The counterpart to *JSON GENERATE*. (Ch. 39, Ch. 40) → Appendix F: Glossary
Set breakpoints at COBOL paragraph names or statement numbers - Step through code line by line - Display and modify variable values - Set conditional breakpoints (break only when a condition is true) - Monitor variables for changes - Examine call stacks → Chapter 33: Debugging Strategies
`RELATE` — The base cluster that this AIX indexes. - `KEYS(length offset)` — The alternate key's length and position within the base cluster's records. - `NONUNIQUEKEY` or `UNIQUEKEY` — Whether duplicate alternate key values are allowed. - `UPGRADE` — VSAM automatically updates the AIX when the base → Appendix E: VSAM and File Organization Reference
Key points:
`PROGRAM-ID` is the only required paragraph. The name must follow your compiler's rules (typically 1–30 characters, alphanumeric plus hyphen, no leading digit). - `IS INITIAL` causes the program's working storage to be reinitialized each time it is called, which is important for reentrant subprogram → Appendix A: COBOL Language Reference Card
Key Xpediter features:
Source-level debugging with COBOL source display - Before/after data inspection - Automatic data formatting (displays COMP-3 fields in decimal) - File I/O interception — see exactly what records are being read/written - Abend-Aid integration — enhanced abend analysis → Chapter 33: Debugging Strategies
`length` — Number of bytes in the primary key (1 to 255). - `offset` — Byte position of the key within the record (0-based). For a key starting at position 1 (COBOL-style), use offset 0. → Appendix E: VSAM and File Organization Reference
Lawson, C., "DB2 for z/OS: The Complete Reference"
Detailed reference covering DB2 architecture, SQL, and application programming. - **Yevich, R., "DB2 for COBOL Programmers"** — Specifically targeted at COBOL developers learning DB2. Excellent for the transition from VSAM to relational thinking. → Chapter 27 Further Reading
Layer 2: Unit Tests (During Modernization)
Test individual programs or modules in isolation - Validate business logic calculations with boundary values - Test error handling paths (invalid input, database errors, file not found) → Appendix I: Migration & Modernization Toolkit
Layer 3: Integration Tests
Test program-to-program interactions (CALL chains, CICS LINK/XCTL) - Test program-to-database interactions (DB2 CRUD, cursor processing, commit/rollback) - Test program-to-file interactions (sequential, VSAM, GDG) → Appendix I: Migration & Modernization Toolkit
Layer 4: Regression Tests
Re-execute characterization tests against the modernized system - Compare outputs field-by-field, not just byte-for-byte (formatting may change) - Automated comparison tools are essential at scale → Appendix I: Migration & Modernization Toolkit
Layer 5: Performance Tests
Benchmark critical transactions (response time, throughput) - Run batch jobs with production-scale data volumes - Compare CPU time, elapsed time, and I/O counts against legacy baselines - Define acceptable performance thresholds before testing (e.g., "within 10% of legacy") → Appendix I: Migration & Modernization Toolkit
Layer 6: Parallel Testing
Run the legacy and modernized systems simultaneously with the same inputs - Compare outputs automatically at scale - Duration: minimum 1 full business cycle (typically 1 month, ideally 1 quarter) - Reconcile every discrepancy — no unexplained differences → Appendix I: Migration & Modernization Toolkit
Layer 7: User Acceptance Testing (UAT)
Business users validate that the modernized system meets their requirements - Focus on end-to-end business processes, not technical details - Include edge cases that only experienced users know about → Appendix I: Migration & Modernization Toolkit
Legacy ≠ Obsolete
COBOL runs trillions of dollars in transactions daily; understanding it is a superpower. - **Readability is a Feature** — COBOL's verbosity is a deliberate design choice for long-term maintainability. - **The Modernization Spectrum** — From pure maintenance to wrapping to rewriting, there is a conti → Intermediate COBOL: Beyond the Basics
Legend for the alphabetical listing:
**85** — Reserved in COBOL-85 (ANSI X3.23-1985) - **02** — Added in COBOL 2002 (ISO/IEC 1989:2002) - **14** — Added in COBOL 2014 (ISO/IEC 1989:2014) - Words without a tag have been reserved since at least COBOL-74. → Appendix D: COBOL Reserved Words
A number (01–49, 66, 77, 88) that indicates the hierarchical position of a data item within a record. 01 = record level, 02–49 = subordinate levels, 66 = RENAMES, 77 = independent item, 88 = condition name. (Ch. 4) See also: *Elementary Item*, *Group Item*, *88 Level*. → Appendix F: Glossary
LIBINQ01
Library inquiry: Accept a library ID, display all books and their copy status 2. **LIBCHK01** — Book checkout: Accept a member ID and book ISBN, create a CHECKOUT record, update COPY status to 'O' 3. **LIBRPT01** — Overdue report: Scan all CHECKOUT records, list those where CHK-DUE-DATE < today → Chapter 31: IMS/DB Basics
LINAGE
A clause in the FD (file description) that specifies the number of lines per page for a print file, along with footing, top, and bottom margins. Provides simple page-control without *Report Writer*. (Ch. 16) → Appendix F: Glossary
Linkage Section
The section of the COBOL Data Division that describes data items received from a calling program, CICS, or the operating system. Items in the Linkage Section do not have storage allocated by the program itself; they reference storage owned by the caller. (Ch. 22, Ch. 23) See also: *CALL*, *COMMAREA* → Appendix F: Glossary
Load Module
The executable form of a program stored in a *PDS* or *PDSE* load library. Created by the binder (linker) from one or more *object modules*. (Ch. 2) See also: *Object Module*, *PDS*. → Appendix F: Glossary
Lock
A mechanism used by DB2 and CICS to control concurrent access to shared resources (rows, pages, tables, records). Locks prevent inconsistent data access but can cause contention or *deadlocks* if not managed carefully. (Ch. 28, Ch. 32) See also: *Deadlock*, *Isolation Level*. → Appendix F: Glossary
Keep the COBOL code, invest in maintenance and documentation - **Re-platform** — Move the same COBOL code to newer hardware or a cloud environment - **Encapsulate** — Wrap COBOL programs in modern interfaces (REST APIs, message queues) - **Re-factor** — Restructure COBOL code for maintainability wit → Chapter 1: The COBOL Landscape Today
Map
In *BMS*, the definition of a screen layout including field positions, attributes (protected, unprotected, bright, dark), and data types. Physical maps control screen formatting; symbolic maps (generated as COBOL copybooks) define the data interface. (Ch. 29) See also: *BMS*, *Symbolic Map*, *Physic → Appendix F: Glossary
Maria Chen
Senior COBOL Developer (28 years at GlobalBank) Maria started at GlobalBank as a junior programmer in 1998, fresh out of a community college program that still taught COBOL. She has worked on nearly every module of the core banking system and has the kind of deep institutional knowledge that cannot → Chapter 1: The COBOL Landscape Today
master-transaction update pattern
arguably the most important pattern in all of COBOL batch processing. Getting it right means accounts balance to the penny. Getting it wrong means incorrect balances, regulatory violations, and very unhappy customers. → Chapter 14: Advanced File Techniques
profile before optimizing. The bottleneck is rarely where you think it is. - **I/O dominates** — in most COBOL batch programs, 80-95% of elapsed time is I/O. Optimize I/O first. - **Data types matter** — COMP-3 and COMP arithmetic are 3-5x faster than DISPLAY arithmetic. - **Block size is critical** → Chapter 36: Performance Tuning
MedClaim Insurance Processing
A health insurance claims processing system that demonstrates file handling, VSAM, report generation, and DB2 integration in a realistic business context. → Intermediate COBOL: Beyond the Basics
Provides visual impact analysis diagrams - Supports "what-if" analysis — change a field and see the full ripple effect - Tracks data lineage from source to destination across the entire system → Chapter 41: Legacy Code Archaeology
The most complete OO COBOL implementation. Micro Focus's documentation includes tutorials and examples for CLASS-ID, inheritance, and interfaces. - **IBM Enterprise COBOL for z/OS Language Reference** — Documents which OO features are supported in IBM's compiler. Essential reading for z/OS shops. - → Chapter 25 Further Reading
Microservice
A small, independently deployable service that performs a single business function. In COBOL modernization, microservice architecture may involve wrapping COBOL programs as individually deployable services behind APIs. (Ch. 40) See also: *API Wrapping*, *Modernization*. → Appendix F: Glossary
Migration
The process of moving a COBOL application from one platform, compiler, or runtime to another (e.g., mainframe to cloud, Enterprise COBOL to GnuCOBOL, batch to online). Distinguished from *modernization*, which focuses on updating the architecture without necessarily changing the platform. (Ch. 37) S → Appendix F: Glossary
Minimize the number of I/O operations
SQL calls, VSAM reads, IMS DL/I calls 2. **Avoid table scans** — ensure WHERE clauses use indexed columns 3. **Commit early** — release locks as soon as possible 4. **Avoid GETMAIN/FREEMAIN in loops** — allocate working storage once 5. **Keep transaction scope small** — do only what is necessary for → Chapter 32: Transaction Design Patterns
Mobile banking API
Real-time account inquiry, transfers, and payment from mobile apps 2. **Partner API** — Third-party fintech access to account data (Open Banking compliance) 3. **Real-time fraud detection** — Transaction scoring before approval (currently batch-only) 4. **Customer 360 dashboard** — Unified view of c → Case Study: GlobalBank — Evaluating Modernization Options for GLOBALBANK-CORE
Modernization
Updating legacy COBOL systems to meet current business and technical requirements. Modernization strategies range from cosmetic changes (UI refresh) to structural changes (API enablement, data layer modernization) to complete replacement. (Ch. 37, Ch. 40, Appendix I) See also: *Migration*, *API Wrap → Appendix F: Glossary
Modernization Specialist
Helping organizations migrate from or modernize their COBOL systems. This role requires understanding both COBOL and modern technologies. It is one of the fastest-growing niches. → Chapter 1: The COBOL Landscape Today
The COBOL statement that transfers data from a source to one or more destinations. MOVE handles data conversion and truncation according to COBOL's data movement rules (alphanumeric = left-justified/space-padded, numeric = right-justified/zero-padded). (Ch. 3, Ch. 4) See also: *MOVE CORRESPONDING*. → Appendix F: Glossary
A COBOL program defined within the scope of another COBOL program (contained program). Nested programs can share data with their containing program through the *GLOBAL* clause and provide structured modularity without external subprogram overhead. (Ch. 24) See also: *Contained Program*, *GLOBAL*. → Appendix F: Glossary
No local installation required
works from any web browser - **Real z/OS** — not an emulation; you are on actual IBM hardware - **Enterprise COBOL compiler** — the same compiler used in production environments - **DB2 and CICS available** — essential for Parts VI and VII of this textbook - **Structured learning paths** — IBM provi → Chapter 2: Development Environment Setup
No validation of provider type before adjudication
a missing defensive check 3. **No post-processing verification** — the batch job did not verify that every processed claim had a decision 4. **Change management gap** — the database team added the new provider type code, but the adjudication team was not notified → Case Study 2: MedClaim Adjudication Logic and the Missing WHEN OTHER
not errors
IMS still retrieved a valid segment. But they are informational signals that help you detect boundaries when processing sequentially. → Chapter 31: IMS/DB Basics
A COBOL phrase used with statements like CALL, STRING, UNSTRING, and ACCEPT to specify processing when the operation completes successfully (no exception condition). (Ch. 10, Ch. 17) → Appendix F: Glossary
NULL
(1) In DB2/SQL, a value indicating the absence of data, distinct from zero or blank. Detected in COBOL through *indicator variables*. (2) In COBOL, the figurative constant representing a null address (used with pointers). (Ch. 19, Ch. 27) See also: *Indicator Variable*, *Pointer*. → Appendix F: Glossary
O
Object Module
The output of the COBOL compiler: a machine-language translation of the source program that has not yet been linked into an executable *load module*. Stored in a dataset or PDS member with RECFM=FB, LRECL=80. (Ch. 2) See also: *Load Module*, *Binder*. → Appendix F: Glossary
OCCURS
A COBOL clause that defines a table (array) by specifying the number of times a data item is repeated. OCCURS DEPENDING ON (ODO) defines variable-length tables. (Ch. 18) See also: *Table Handling*, *SEARCH*, *SEARCH ALL*, *Index*. → Appendix F: Glossary
OCESQL (Open COBOL ESQL)
An embedded SQL preprocessor for GnuCOBOL that supports PostgreSQL and MySQL. Allows embedded SQL practice without z/OS access. - **Micro Focus COBOL with ODBC** — Micro Focus COBOL supports embedded SQL with various databases through ODBC connectivity. → Chapter 27 Further Reading
ON EXCEPTION
A COBOL phrase used with statements like CALL, STRING, and UNSTRING to specify processing when an exception condition occurs (e.g., subprogram not found, string overflow). (Ch. 10, Ch. 17, Ch. 22) See also: *NOT ON EXCEPTION*, *Defensive Programming*. → Appendix F: Glossary
ON SIZE ERROR
A COBOL phrase used with arithmetic statements (ADD, SUBTRACT, MULTIPLY, DIVIDE, COMPUTE) to specify processing when the result exceeds the capacity of the receiving field. Essential for *defensive programming*. (Ch. 5, Ch. 10) See also: *Defensive Programming*. → Appendix F: Glossary
Online Processing
Interactive transaction processing in which a user (or automated system) sends a request and receives a response, typically in sub-second time. On z/OS, online COBOL processing is managed by *CICS* or *IMS/TM*. (Ch. 29) See also: *Batch Processing*, *CICS*, *IMS*. → Appendix F: Glossary
OPEN
A COBOL statement that makes a file available for processing. Modes include INPUT (read), OUTPUT (write new), I-O (read and update), and EXTEND (append). Must precede any READ, WRITE, REWRITE, or DELETE operation. (Ch. 11) See also: *CLOSE*, *File Status*. → Appendix F: Glossary
An open-source unit testing framework for COBOL that encourages structured, testable program design. Understanding testing frameworks reinforces good structural practices. → Further Reading: COBOL Program Structure Deep Dive
Reads a header-detail-trailer order file, validates each order, writes valid orders to an output file and rejects to a reject file 2. **ORD-REPORT** — Reads the valid order file and produces a formatted report with page breaks, subtotals by department, and grand totals 3. **ORD-SUMMARY** — Reads the → Exercises — Chapter 11: Sequential File Processing
Organization
The structural arrangement of records in a file. COBOL supports SEQUENTIAL, INDEXED, and RELATIVE organizations. On z/OS, these map to *QSAM*, *VSAM KSDS*, and *VSAM RRDS*, respectively. (Ch. 11, Ch. 12, Ch. 13) → Appendix F: Glossary
A synonym for *COMP-3*. Each byte holds two decimal digits, except the rightmost byte, which holds one digit and the sign. (Ch. 5) See also: *COMP-3*, *DISPLAY*, *Zoned Decimal*. → Appendix F: Glossary
Paragraph
A named block of code in the COBOL Procedure Division, terminated by the next paragraph or section name. Paragraphs are the primary unit of PERFORM targets and program organization. (Ch. 8) See also: *Section*, *PERFORM*. → Appendix F: Glossary
Paragraph extraction
Move nested logic into separate, well-named paragraphs. Advantage: Each paragraph has a single responsibility and is independently testable. Disadvantage: Requires more paragraphs, and the flow of control is less visible in a single reading of the code. → Quiz — Chapter 6: Advanced Conditional Logic
the CALL USING lists parameters in a different order than the PROCEDURE DIVISION USING; diagnose by comparing the copybooks or parameter lists side by side. (2) **Parameter size mismatch** — the caller defines a field as PIC X(10) but the subprogram expects PIC X(20), causing storage overlay; diagno → Quiz — Chapter 22: CALL and Subprogram Linkage
COBOL landscape, environment setup, program structure, data description, numeric precision - **Part II: Control Flow and Program Design** — Advanced conditionals, iteration, paragraph design, copybooks, defensive programming - **Part III: File Processing Mastery** — Sequential, indexed (VSAM KSDS), → Intermediate COBOL: Enterprise Programming for the Modern Mainframe
PATH
In VSAM, a catalog entry that connects an *alternate index* to its *base cluster*, allowing programs to access the base cluster's records through the alternate key. (Ch. 12) See also: *Alternate Index*, *KSDS*. → Appendix F: Glossary
PERFORM
A COBOL statement that transfers control to a paragraph or section (out-of-line) or executes inline statements (inline PERFORM). Supports PERFORM VARYING for loops and PERFORM TIMES for counted iteration. (Ch. 7) See also: *Paragraph*, *Section*, *Inline PERFORM*. → Appendix F: Glossary
PERFORM range scoping
Instead of `PERFORM 2100-VALIDATE THRU 2300-UPDATE`, you can `PERFORM 2000-PROCESSING`. The section boundaries define the PERFORM range. → Chapter 8: Paragraph and Section Design
Performance impact:
The split itself requires multiple I/O operations (read original CI, write both CIs, update index). - After the split, records that were in key sequence within one CI are now spread across two CIs. Sequential reads that previously required one I/O now require two. - Repeated splits create a fragment → Appendix E: VSAM and File Organization Reference
Phase 1: Source Control Migration (Month 1-2)
Migrated 1,247 COBOL programs from Endevor to Git - Maintained bi-directional sync with Endevor during transition - Established branching strategy (main/develop/feature) → Chapter 40: COBOL and the Modern Stack
Phase 1: Standards (immediate)
Published a formal COBOL coding standard document (modeled on GlobalBank's, with MedClaim-specific additions) - Required all new programs and all modifications to existing programs to follow the new standards - "Scouts rule" — any program touched for a change request must be brought into compliance → Case Study 2: MedClaim's Program Structure Audit
Phase 2: Automated Build (Month 3)
Implemented IBM DBB for dependency-aware builds - Automated compile, link-edit, and CICS NEWCOPY - Build triggered on every push to develop branch → Chapter 40: COBOL and the Modern Stack
Phase 2: Refactoring (ongoing)
Identified the 30 most-modified programs for priority refactoring - Each refactoring included: consistent naming, FILE STATUS on all SELECT statements, scope terminators replacing period-based scope, copybook adoption for all record definitions, and comment headers - Refactoring was done as dedicate → Case Study 2: MedClaim's Program Structure Audit
Phase 3: Automated Testing (Month 4-5)
Added COBOL-Check unit tests for 47 critical programs - Implemented integration test suite using Galasa - Added regression test for control total verification → Chapter 40: COBOL and the Modern Stack
Phase 4: Deployment Pipeline (Month 6)
GitHub Actions pipeline: build, test, deploy to test, deploy to staging - Production deployment gated by manual approval - Automated rollback on test failure → Chapter 40: COBOL and the Modern Stack
Physical map
a load module that controls screen formatting (colors, positioning, attributes) 2. **Symbolic map** — a COBOL copybook that defines the data fields your program reads and writes → Chapter 29: CICS Fundamentals
A COBOL data item (USAGE POINTER) that holds a memory address. Used for dynamic memory management, inter-language communication, and accessing data areas in the *Linkage Section* whose address is set at run time via SET ADDRESS OF. (Ch. 19) See also: *ADDRESS OF*, *SET*, *Linkage Section*. → Appendix F: Glossary
Policy administration
issuing, modifying, renewing, and canceling policies across dozens of product lines - **Claims processing** — adjudicating claims against policy terms, calculating benefits, managing reserves - **Underwriting** — evaluating risk and determining premiums - **Regulatory reporting** — generating report → Chapter 1: The COBOL Landscape Today
positionally
the first item in the CALL USING corresponds to the first item in the PROCEDURE DIVISION USING, the second to the second, and so on. → Chapter 22: CALL and Subprogram Linkage
Practical readability
For validation paragraphs with many sequential checks, the guard clause pattern is demonstrably more readable than deeply nested IFs or repeated condition flag checks. → Chapter 8: Paragraph and Section Design
Precompiler
A preprocessor that translates embedded statements (*EXEC SQL*, *EXEC CICS*, *EXEC DLI*) into standard COBOL CALL statements before the COBOL compiler processes the source. DB2, CICS, and IMS each have their own precompiler (or integrated coprocessor in modern compilers). (Ch. 27, Ch. 29, Ch. 31) → Appendix F: Glossary
Prefixes indicate scope:
`WS-` for WORKING-STORAGE items - `LS-` for LINKAGE SECTION items - `FD-` or file-specific prefixes for FILE SECTION items → Chapter 8: Paragraph and Section Design
Prerequisites Checklist:
Writing a complete COBOL program with all four divisions - Using PICTURE clauses for basic data types (numeric, alphanumeric) - Performing arithmetic with ADD, SUBTRACT, MULTIPLY, DIVIDE, and COMPUTE - Writing IF/ELSE conditional logic - Using PERFORM to execute paragraphs - Reading from and writing → Chapter 1: The COBOL Landscape Today
an initial READ before the processing loop, with additional READs at the bottom of the loop: > > ```cobol > PERFORM 1100-READ-FIRST-RECORD > PERFORM 2000-PROCESS UNTIL WS-END-OF-FILE > ... > > 2000-PROCESS. > PERFORM 2100-PROCESS-RECORD > READ TXN-INPUT-FILE > AT END SET WS-END-OF-FILE TO TRUE > NOT → Chapter 11: Sequential File Processing
Priya Kapoor
Application Architect Priya has fifteen years of experience spanning both mainframe and distributed systems. She holds certifications in both IBM Z and AWS, and she leads GlobalBank's modernization strategy. Her approach is pragmatic: keep what works, wrap what needs modern interfaces, replace only → Chapter 1: The COBOL Landscape Today
Problem: "My arithmetic gives wrong results"
Cause: Missing `S` (sign) in the PIC clause — negative intermediate results lose their sign. - Fix: Always use `S` on fields that participate in arithmetic where results might be negative. → Chapter 4: Data Description Mastery
Process changes:
A mandatory impact analysis step was added for all copybook changes - A "full recompile" procedure was documented for copybook modifications - Coding standards were updated to prohibit REDEFINES on copybook FILLER areas - Reference modification with hardcoded offsets into copybook records was banned → Case Study 1: The Copybook Change That Broke 47 Programs
Academic research on how programmers understand unfamiliar code. Search ACM Digital Library and IEEE Xplore for "program comprehension COBOL" for research specific to COBOL systems. → Further Reading — Chapter 41: Legacy Code Archaeology
program visibility
it determines which programs can call which other programs. A COMMON program can be called by its siblings. Use case: a shared formatting routine that multiple sibling processing programs need to call. GLOBAL controls **data visibility** — it determines which data items can be accessed by which prog → Quiz — Chapter 24: Nested Programs
Program-ID
The paragraph in the IDENTIFICATION DIVISION that names the COBOL program. The program-id is used to identify the program for CALL statements, CICS LINK/XCTL commands, and cataloging in load libraries. (Ch. 3) → Appendix F: Glossary
MedClaim expects to add 3 new partner insurers in the next 12 months, each contributing ~2,000 transactions per day - Total projected daily volume in 12 months: 13,000 transactions - Total projected daily volume in 24 months: 20,000 transactions → Chapter 45: Capstone 3 — From Batch to Real-Time: A Full Migration Project
Pseudo-Conversational
A CICS programming technique in which a transaction sends a screen to the user and then returns control to CICS (freeing resources). When the user responds, CICS starts a new task that reads the input and processes it. This pattern conserves system resources by not holding a task active while waitin → Appendix F: Glossary
Q
Qualitative outcomes:
Derek Washington could now modify the routing logic independently, without Maria's oversight - Sarah Kim (business analyst at MedClaim, who consulted on the project) said the EVALUATE version "reads like the business rules document" - Two new transaction types were added in the six months post-refac → Case Study 1: GlobalBank Transaction Routing Overhaul
Use when you need all rows you read to remain stable for the duration of your unit of work — for example, when you read data to make a decision and then update based on that decision. RS holds locks on all accessed rows until COMMIT. Be careful: if you read 10,000 rows, you hold 10,000 locks. → Chapter 28: Advanced DB2 Programming
READ-INPUT-RECORD
Reads one record and checks file status. - **VALIDATE-INPUT-FIELDS** — Performs all field-level validation, sets an error flag. - **CALCULATE-DISCOUNT** — Applies business rules to compute the discount; only called if validation passed. - **FORMAT-REPORT-LINE** — Moves computed values to the output → Appendix G: Answers to Selected Exercises
Readability is a Feature
well-designed data descriptions are living documentation that communicates business semantics — and **Defensive Programming** — choosing the right USAGE, always including `S` for signed fields, using INITIALIZE instead of MOVE SPACES, and validating record types before accessing REDEFINES variants. → Chapter 4: Data Description Mastery
Real-time claim status notifications
push notifications when a claim status changes 2. **Predictive claim analytics** — machine learning models to flag potentially fraudulent claims 3. **Provider self-service portal** — a web application for providers to submit claims electronically and check status → Chapter 37: Migration and Modernization
a 4-byte header at the beginning of each record that contains the record length. The RDW is transparent to your COBOL program; the system handles it automatically. → Chapter 11: Sequential File Processing
Record everything:
Take detailed notes - Record the conversation (with permission) - Follow up with a written summary for the interviewee to review → Chapter 41: Legacy Code Archaeology
RECORD KEY
The clause in FILE-CONTROL that identifies the primary key field of an *indexed file*. Records are stored in ascending order of the record key. (Ch. 12) See also: *ALTERNATE RECORD KEY*, *KSDS*. → Appendix F: Glossary
the 01-level under the FD. This catches many beginners: > > ```cobol > * CORRECT: > WRITE OUTPUT-RECORD FROM WS-DATA > > * WRONG — will not compile: > WRITE OUTPUT-FILE FROM WS-DATA > ``` → Chapter 11: Sequential File Processing
For fixed-length records, specify the same value for both. - For variable-length, `average` is used for space calculation and `maximum` sets the upper limit. → Appendix E: VSAM and File Organization Reference
REDEFINES
A COBOL clause that allows two or more data descriptions to share the same physical storage. Used when the same storage area can contain different types of data (e.g., a numeric field or a text field depending on a record type indicator). (Ch. 4) See also: *RENAMES*. → Appendix F: Glossary
A COBOL feature that allows access to a substring of a data item by specifying a starting position and length in parentheses: DATA-ITEM(start:length). (Ch. 19) See also: *STRING*, *UNSTRING*, *Pointer*. → Appendix F: Glossary
The level-66 data item that provides an alternative grouping of elementary items from a record. Defined with RENAMES ... THRU ..., it creates a new group name spanning contiguous fields. Less commonly used than *REDEFINES*. (Ch. 4) → Appendix F: Glossary
Repeatable Read (RR)
The strongest isolation level. Not only are accessed rows locked, but DB2 also locks qualifying rows that *could have been* accessed (to prevent phantom inserts). Use sparingly — it significantly reduces concurrency. Appropriate for financial closing operations where absolute consistency is required → Chapter 28: Advanced DB2 Programming
REPL (Replace)
Updates the segment most recently retrieved with a hold call. You modify the I/O area and issue REPL. You **must not** change the segment's key field. → Chapter 31: IMS/DB Basics
REPLACE
A COBOL compiler-directing statement that substitutes text strings throughout the source program until a REPLACE OFF is encountered. Distinguished from COPY ... REPLACING, which applies only within the copied text. (Ch. 9) → Appendix F: Glossary
report groups
the building blocks of the report. Each group corresponds to a type of report line: → Chapter 16: Report Writer
Report Writer
A COBOL feature (REPORT SECTION and associated statements) that automates the production of formatted reports, handling page breaks, control breaks, subtotals, and grand totals through declarative definitions rather than procedural code. (Ch. 16) → Appendix F: Glossary
An option on CICS commands that stores the response code in a specified data item. Using RESP prevents CICS from abnormally terminating the task on error and allows the program to handle errors explicitly. (Ch. 29, Ch. 30) See also: *EIBRESP*, *HANDLE CONDITION*. → Appendix F: Glossary
RETURN-CODE
A COBOL special register (PIC S9(4) COMP) that is set by the program to indicate its completion status to the operating system or calling program. Maps to the *condition code* in JCL. (Ch. 10, Ch. 22) See also: *Condition Code*. → Appendix F: Glossary
A COBOL statement that replaces an existing record in a file. For sequential files opened I-O, REWRITE replaces the record most recently READ. For indexed and relative files, REWRITE replaces the record identified by the key. (Ch. 11, Ch. 12) → Appendix F: Glossary
Rewrite ACCTINQ in Java
Estimated 4 months, risk of introducing logic bugs in a critical program 2. **CICS Transaction Gateway (CTG)** — Direct CICS access from Java middleware, 2 months 3. **z/OS Connect** — Direct REST-to-CICS mapping, 3 weeks → Case Study 1: GlobalBank Real-Time Balance API
Business Analyst Sarah came to IT from the business side of insurance. She spent five years as a claims examiner before transitioning to business analysis. She does not write COBOL, but she reads it fluently — a skill she picked up by sitting with developers during testing cycles. Sarah translates b → Chapter 1: The COBOL Landscape Today
Display employee data with editable fields: name, department, salary, status - Employee ID, hire date, and last-modified fields are read-only - PF5 = save (goes to confirmation), PF3 = cancel (back to search) - Validate all edited fields before proceeding → Exercises: Advanced CICS Programming
A COBOL statement that performs a serial (linear) search through a table defined with *OCCURS* and *INDEXED BY*. Starts from the current index position and increments sequentially. (Ch. 18) See also: *SEARCH ALL*, *Table Handling*, *Index*. → Appendix F: Glossary
SEARCH ALL
A COBOL statement that performs a binary search through a table, requiring the table to be defined with ASCENDING/DESCENDING KEY. More efficient than *SEARCH* for large ordered tables. (Ch. 18) See also: *SEARCH*, *Table Handling*. → Appendix F: Glossary
Section
A named block of code in the COBOL Procedure Division consisting of one or more *paragraphs*. Sections can be PERFORMED as a unit, and all paragraphs within the section execute. In the Data Division, sections (WORKING-STORAGE SECTION, LINKAGE SECTION, etc.) define categories of data. (Ch. 8) See als → Appendix F: Glossary
In *IMS*, the basic unit of data in a hierarchical database, roughly analogous to a row in a relational table. Segments are organized in a parent-child hierarchy. (Ch. 31) See also: *IMS*, *DL/I*, *SSA*. → Appendix F: Glossary
SELECT
A clause in the FILE-CONTROL paragraph that assigns an internal file name (used in the FD and I/O statements) to an external file. The SELECT clause also specifies ORGANIZATION, ACCESS MODE, RECORD KEY, and FILE STATUS. (Ch. 11, Ch. 12) See also: *FILE-CONTROL*, *ASSIGN*, *Organization*. → Appendix F: Glossary
Select base image
Choose a minimal Linux image (Alpine, Debian slim) with the COBOL compiler/runtime installed - [ ] **Create Dockerfile:** - Install COBOL runtime dependencies - Copy compiled programs (or source + compile in build stage) - Configure file paths and environment variables - Set the entry point to the C → Appendix I: Migration & Modernization Toolkit
SELECT file-name
Declares a logical file name that you will use throughout the program. This name appears in FD entries, OPEN, READ, WRITE, and CLOSE statements. → Chapter 11: Sequential File Processing
sentinel value
a special value that signals the end of data. In COBOL, HIGH-VALUES (x'FF...') and LOW-VALUES (x'00...') are natural sentinels. → Chapter 10: Defensive Programming
Sequential File
A file in which records are stored and accessed in the order they were written. The simplest and most common file organization in COBOL batch processing, using *QSAM* on z/OS. (Ch. 11) See also: *QSAM*, *Organization*. → Appendix F: Glossary
SET
A COBOL statement with multiple uses: SET index-name (table processing), SET condition-name TO TRUE (88-level), SET pointer (address manipulation), SET ADDRESS OF (linkage section addressability). (Ch. 18, Ch. 19) → Appendix F: Glossary
Annual mainframe conference with sessions on DevOps, CI/CD, and modernization for COBOL. Past presentations available online. - **Open Mainframe Summit** — Linux Foundation event focusing on open-source mainframe tools. → Further Reading — Chapter 40: COBOL and the Modern Stack
Single exit point
All paths through the paragraph converge at the exit paragraph. This satisfies the "one entry, one exit" principle of structured programming. → Chapter 8: Paragraph and Section Design
Six retrieval calls, three update calls
GU, GN, GNP (and their hold variants GHU, GHN, GHNP) for retrieval; ISRT, REPL, DLET for updates. Hold calls are required before REPL or DLET. → Key Takeaways — Chapter 31: IMS/DB Basics
A COBOL statement that sorts records from one or more input files (USING) or an input procedure, based on specified key fields, and writes the sorted records to an output file (GIVING) or an output procedure. Invokes the system sort utility (DFSORT or SyncSort). (Ch. 15) See also: *MERGE*, *INPUT PR → Appendix F: Glossary
`SPEED` — Skips preformatting of CIs during initial load. Faster loading, but if the load fails mid-stream, the data set is unusable. - `RECOVERY` — Preformats all CIs before loading. Slower, but a failed load can be restarted. → Appendix E: VSAM and File Organization Reference
A field in the *SQLCA* indicating the result of the most recent SQL statement. SQLCODE = 0 means success, positive values indicate warnings (100 = not found), and negative values indicate errors (-805 = plan not found, -911 = deadlock/timeout, -818 = timestamp mismatch). (Ch. 27, Ch. 28) → Appendix F: Glossary
An Enterprise COBOL compiler option that generates runtime checks for subscript out-of-range and reference modification out-of-range conditions. Essential for debugging; typically disabled in production for performance. (Ch. 10, Ch. 33) See also: *Defensive Programming*, *Compiler Option*. → Appendix F: Glossary
Stack Overflow [cobol] tag
Active community of COBOL developers answering questions. Search for questions about program structure, copybooks, and column conventions for practical guidance. → Further Reading: COBOL Program Structure Deep Dive
Stage 1: Source Commit
Trigger: code committed to version control (Git, Endevor, or SCLM export to Git) - Actions: validate commit message, check for reserved word conflicts, verify copybook dependencies → Appendix I: Migration & Modernization Toolkit
Stage 2: Build (Compile + Link)
Mainframe: invoke IGYCRCTL via JCL or IBM Dependency Based Build (DBB) - Distributed: invoke GnuCOBOL (cobc) or Micro Focus COBOL compiler - Compile options: RENT, MAP, LIST, OFFSET, SSRANGE (test builds), OPTIMIZE (production builds) - Fail the pipeline on RC > 4 (warnings are acceptable; errors ar → Appendix I: Migration & Modernization Toolkit
Run coding standards checks (naming conventions, structured programming rules, banned patterns like ALTER and GO TO in new code) - Run complexity analysis (paragraph size, nesting depth, cyclomatic complexity) - Generate findings report; fail on critical violations → Appendix I: Migration & Modernization Toolkit
Stage 5: Integration Test
Execute tests that exercise multiple programs together, including DB2, CICS, and file I/O - Use test doubles or sandboxed subsystems - Compare output files against expected baselines (byte-for-byte or field-level comparison) → Appendix I: Migration & Modernization Toolkit
Stage 6: Package
Create a versioned deployment artifact (load module, container image, or deployment package) - Tag the artifact with the Git commit hash and build number - Store in an artifact repository (Artifactory, Nexus, or z/OS load library) → Appendix I: Migration & Modernization Toolkit
Stage 7: Deploy (Dev → QA → Prod)
Deploy to Dev automatically on successful build - Deploy to QA on approval (manual gate or automated after soak period) - Deploy to Prod on approval with change management ticket - Each environment uses its own datasets, DB2 subsystem, and CICS region → Appendix I: Migration & Modernization Toolkit
Start broad:
"What does this system do in business terms?" - "What would happen if this program stopped running?" - "What are the most common problems with this program?" → Chapter 41: Legacy Code Archaeology
Static Analysis
The examination of source code without executing it, to detect potential errors, enforce coding standards, and assess complexity. Tools for COBOL static analysis include IBM Application Discovery, SonarQube with COBOL plugins, and COBOL-specific lint utilities. (Ch. 35) See also: *Code Review*. → Appendix F: Glossary
Static Call
A CALL statement resolved at link-edit time, where the called subprogram is bound into the same *load module* as the caller. Provides faster invocation but requires re-linking when the subprogram changes. (Ch. 22) See also: *Dynamic Call*, *NODYNAM*. → Appendix F: Glossary
The COBOL compiler translates source code into an *object module*. This contains machine code, but external references (like CALL targets) are unresolved. → Chapter 22: CALL and Subprogram Linkage
Step 2: Link-edit (Bind)
The linkage editor (or binder, its modern replacement) resolves external references: - For **static CALLs**: It pulls in the subprogram's object code and includes it in the same load module. - For **dynamic CALLs**: It marks the reference as "to be resolved at runtime" and does not include the subpr → Chapter 22: CALL and Subprogram Linkage
`PGM=IGYCRCTL` — The IBM Enterprise COBOL compiler - `PARM='RENT,LIST,MAP,XREF,OFFSET'` — Compiler options: reentrant code, generate listing, data map, cross-reference, offset listing - `SYSIN` — The COBOL source code to compile - `SYSLIB` — Where to find copybooks referenced by COPY statements - `S → Chapter 2: Development Environment Setup
Step GO:
`PGM=ACCTINQ` — Run the compiled program - `COND=(8,LT)` — Skip if any previous step had a return code less than 8 - `ACCTFILE` — A DD statement that the COBOL program references via its SELECT statement (this maps a logical file name in COBOL to a physical dataset on z/OS) → Chapter 2: Development Environment Setup
Step LKED:
`PGM=IEWL` — The linkage editor (linker) - `COND=(8,LT,COMPILE)` — Skip this step if the COMPILE step had a return code less than 8 (meaning: only link if compilation succeeded) - `SYSLIN` — The object module from the compile step - `SYSLMOD` — Where to store the executable load module → Chapter 2: Development Environment Setup
A modernization strategy (named by Martin Fowler) in which legacy functionality is gradually replaced by new implementations. New features are built in the target architecture, and traffic is progressively routed away from the legacy system until it can be decommissioned. (Ch. 37, Ch. 40) See also: → Appendix F: Glossary
Strengths:
Random access by primary key — O(log n) via B+ tree. - Sequential access in key order — efficient for batch processing. - Alternate indexes for access by secondary keys. - Variable-length records supported. - Records can be inserted, updated, and deleted. → Appendix E: VSAM and File Organization Reference
STRING
A COBOL statement that concatenates the contents of multiple data items into a single data item, using a DELIMITED BY phrase to control how much of each source item is included. (Ch. 17) See also: *UNSTRING*, *INSPECT*, *Reference Modification*. → Appendix F: Glossary
STU-REC
Student record with ID, name, major, GPA, enrollment date, and status 2. **CRS-REC** — Course record with course ID, title, credits, department, and instructor 3. **ENR-REC** — Enrollment record linking student to course with grade 4. **IO-STATUS** — Generic file status using the `:PREFIX:` pattern → Chapter 9: Copybooks and Code Reuse
Student Mainframe Lab
Your personal development environment, whether using Hercules emulator, IBM Z Xplore, or GnuCOBOL. Practical setup guidance ensures you can run every example in this book. → Intermediate COBOL: Beyond the Basics
Subprogram
A COBOL program designed to be invoked by another program via a *CALL* statement. Subprograms receive parameters through the *Linkage Section* and the USING clause of the PROCEDURE DIVISION header. (Ch. 22, Ch. 23) See also: *CALL*, *Linkage Section*, *BY REFERENCE*. → Appendix F: Glossary
Subprogram design principles
single responsibility, defined interface contracts, defensive input validation, minimal coupling, and idempotence — prevent the common pitfalls that plague multi-program systems. → Chapter 22: CALL and Subprogram Linkage
Successes:
CBA achieved faster product launches (new products in weeks rather than months) - Real-time payment processing gave CBA a competitive advantage in the Australian market - The bank's digital banking platforms improved significantly - CBA reduced its mainframe footprint and associated licensing costs → Case Study 2: Commonwealth Bank of Australia's Core Banking Overhaul
summary report
control footings with SUM values are produced, but no detail lines. This is useful when you want only subtotals and grand totals, not individual records. → Chapter 16: Report Writer
Symbolic Map
A COBOL copybook generated from a *BMS* map definition. Contains the data structure (field names, lengths, attributes) that the COBOL program uses to send and receive screen data. (Ch. 29) See also: *BMS*, *Map*, *Physical Map*. → Appendix F: Glossary
SYSOUT
A JCL DD parameter that directs output to the *JES spool* for printing or viewing. COBOL DISPLAY statements in batch write to the file assigned to SYSOUT (typically DD name SYSOUT or the system-defined output). (Ch. 2, Appendix C) See also: *JES*, *Spool*. → Appendix F: Glossary
Systems Programmer
Working with the operating system (z/OS), middleware (CICS, IMS, MQ), and database (DB2) layers that COBOL programs depend on. Requires deeper infrastructure knowledge. → Chapter 1: The COBOL Landscape Today
T
Table Handling
The set of COBOL features for working with arrays (tables): *OCCURS*, *INDEXED BY*, *SEARCH*, *SEARCH ALL*, subscripting, and indexing. Tables can be fixed-length or variable-length (*OCCURS DEPENDING ON*). (Ch. 18) See also: *OCCURS*, *SEARCH*, *SEARCH ALL*, *Index*. → Appendix F: Glossary
Task
In *CICS*, a unit of work created to process a *transaction*. Each task has its own storage, program counter, and execution context. Multiple tasks may be executing concurrently in a CICS region. (Ch. 29) See also: *Transaction*, *CICS*. → Appendix F: Glossary
Test at every boundary
language boundaries, data type boundaries, encoding boundaries, and edge-case boundaries. The most insidious inter-language bugs involve correct code on both sides with an incorrect interface between them. → Chapter 26 Key Takeaways
Test Cases to Write:
Debit that goes into overdraft but within limit - Debit that exceeds overdraft limit - Debit on savings account (no overdraft allowed) - Multiple debits that progressively consume the overdraft limit → Exercises: Building a Complete Banking Transaction System
Test the business logic program independently
pass test data via COMMAREA without any screen interaction 4. When a REST API or web service interface is needed, write a thin wrapper that maps JSON to the COMMAREA format and calls the same business logic program → Chapter 29: CICS Fundamentals
Create a test file with 50 records and verify normal processing - Create a test scenario where the end-of-file flag is never set (simulate by commenting out the AT END clause) and verify the safety counter stops the loop - Create a test file with 150 consecutive identical account numbers and verify → Exercises — Chapter 7: Iteration Patterns
The "Dying" Argument:
No major *new* systems are being built in COBOL. Greenfield projects choose modern languages. - The developer population is shrinking through retirement. - Cloud-native architectures, microservices, and SaaS platforms are gradually replacing functions that mainframes used to own. - Some large-scale → Chapter 1: The COBOL Landscape Today
The "Thriving" Argument:
The installed base is *growing*, not shrinking — 1.5 billion new lines per year. - Transaction volumes on mainframes continue to increase. - Migration projects have a high failure rate and often cost more than projected. - The business logic embedded in COBOL systems represents irreplaceable institu → Chapter 1: The COBOL Landscape Today
reading transactions from a sequential file and applying CRUD operations to a VSAM master file — is one of the most common patterns in enterprise COBOL. Master this pattern and you can build most batch maintenance programs. → Key Takeaways — Chapter 12: Indexed File Processing (VSAM KSDS)
The business logic has fundamentally changed
the existing code implements rules that no longer apply 2. **The architecture prevents essential capabilities** — real-time processing, horizontal scaling, cloud-native deployment 3. **The codebase is unmaintainable** — no tests, no documentation, no one who understands it 4. **The platform is being → Chapter 37: Migration and Modernization
The hybrid approach
external subprograms for shared business logic, nested programs for internal plumbing — combines the strengths of both patterns and is the recommended practice. → Key Takeaways — Chapter 24: Nested Programs
most slots between 1 and the maximum RRN are occupied 3. **Maximum performance for random access** is the primary requirement 4. **The data set is relatively static** — not many inserts or deletes 5. **Lookup tables** — code tables, translation tables, rate tables → Chapter 13: Relative Files and RRDS
The key space is sparse
if your keys range from 1 to 10,000,000 but only 50,000 slots are occupied, 99.5% of the file is empty 3. **You need alternate access paths** — RRDS does not support alternate keys 4. **You need key-sequenced browsing** — sequential reads return records in slot order, which may not be meaningful 5. → Chapter 13: Relative Files and RRDS
manifests in string handling because modern data interchange formats (CSV, XML, JSON, pipe-delimited) are inherently string-oriented. COBOL programs that can parse and produce these formats become integration points between the mainframe and the modern distributed world. String handling is not just → Chapter 17: String Handling
The pointer build pattern
maintaining a position variable and appending pieces via reference modification — is the standard COBOL idiom for constructing dynamic output strings. Initialize the pointer to 1, advance it by the length of each appended piece. → Key Takeaways: Pointer and Reference Modification
Average age of a COBOL developer: approximately 55–60 years - Estimated retirements per year: 5,000–10,000 experienced COBOL developers - Universities offering COBOL courses: declining from hundreds in the 1990s to dozens today - Open COBOL positions (U.S.): approximately 10,000–15,000 at any given → Chapter 1: The COBOL Landscape Today
Then narrow:
"Why does paragraph 4700 exist? What special case does it handle?" - "This EVALUATE has 47 WHEN clauses. Are all of them still valid?" - "I see the deductible is calculated differently for plan type 'X'. Why?" → Chapter 41: Legacy Code Archaeology
Database Administrator Tomás manages MedClaim's DB2 databases and is the go-to person for anything related to data access, performance tuning, and database design. He has strong opinions about how COBOL programs should interact with DB2 (opinions that are usually correct) and he serves as the perfor → Chapter 1: The COBOL Landscape Today
Top-down design
Start with a high-level main paragraph and decompose into progressively more detailed subordinate paragraphs. 2. **One entry, one exit** — Each paragraph has one way in (the PERFORM call) and one way out (the end of the paragraph or the exit paragraph in a THRU range). 3. **Limited scope** — Each pa → Chapter 8: Paragraph and Section Design
(1) In CICS, a named unit of work initiated by a 1–4 character transaction identifier. When a user enters a transaction ID, CICS creates a *task* to execute the associated program. (2) In database terms, a logical unit of work bounded by commit and rollback points. (Ch. 29, Ch. 32) See also: *Task*, → Appendix F: Glossary
COPY can appear in ENVIRONMENT, DATA, or PROCEDURE divisions. 12. **True** — Pseudo-text matches character-for-character, including partial words. 13. **False** — Identifier replacement only matches complete words. 14. **False** — Copybooks can contain entries at any level. 15. **True** — PDS member → Quiz — Chapter 9: Copybooks and Code Reuse
TXN-PROC Profile:
210,000 READ operations on the transaction file (sequential, fast) - 210,000 READ operations on the VSAM master (random, slow) - 185,000 REWRITE operations on the VSAM master (random, slow) - 210,000 WRITE operations on the audit file (sequential, fast) → Case Study 2: Scaling the Batch Window
TXN-VALID
Validates each transaction and splits into valid/reject files 2. **TXN-POST** — Posts valid transactions to the account master (VSAM) 3. **TXN-REPORT** — Produces the daily transaction report 4. **TXN-ARCHIVE** — Copies posted transactions to the history file → Chapter 11: Sequential File Processing
Use for read-only queries where approximate data is acceptable: balance inquiries (the user will verify before transacting), report generation, record counting, and dashboard displays. UR acquires no locks at all, meaning it never blocks and is never blocked. The trade-off: you might read data that → Chapter 28: Advanced DB2 Programming
Understanding BMS Attributes:
**ASKIP**: Auto-skip — the cursor cannot be positioned in this field. Used for labels and display-only fields. - **UNPROT**: Unprotected — the user can type in this field. Used for input fields. - **BRT**: Bright — displayed in high intensity. Used for emphasis. - **NORM**: Normal — displayed in sta → Chapter 43: Capstone 1 — Building a Complete Banking Transaction System
Unit Testing
Testing individual COBOL programs or paragraphs in isolation, verifying that specific inputs produce expected outputs. COBOL unit testing frameworks include IBM zUnit (part of IDz), COBOL-Check, and custom harness approaches. (Ch. 34) See also: *Integration Testing*, *Test Harness*. → Appendix F: Glossary
University of North Texas
Mainframe programming course - **Sungkyunkwan University** (South Korea) — COBOL for financial systems - **Multiple community colleges** in the U.S. — COBOL as a workforce development initiative → Chapter 42: The Future of COBOL
UNSTRING
A COBOL statement that splits a single data item into multiple receiving fields based on delimiter characters. The counterpart to *STRING*. Supports DELIMITER IN, COUNT IN, and POINTER clauses for precise control. (Ch. 17) See also: *STRING*, *INSPECT*. → Appendix F: Glossary
USAGE
A COBOL clause that specifies the internal representation of a data item: DISPLAY (zoned decimal), COMP/BINARY (binary), COMP-3/PACKED-DECIMAL, COMP-1 (single float), COMP-2 (double float), POINTER, INDEX, etc. (Ch. 5) See also: *COMP*, *COMP-3*, *DISPLAY*, *PICTURE*. → Appendix F: Glossary
USE AFTER
A COBOL declarative statement (coded in the DECLARATIVES section) that specifies a procedure to be invoked automatically after an I/O error on a specified file or category of files. (Ch. 10, Ch. 14) See also: *DECLARATIVES*, *File Status*. → Appendix F: Glossary
Use DFSDDLT0
IBM's DL/I test program — to test DL/I calls interactively before coding them in COBOL. → Chapter 31: IMS/DB Basics
The report has irregular formatting that Report Writer cannot express - You need fine-grained control over every line - The report is a secondary output of a complex program - Your shop does not support or encourage Report Writer - The report requires conditional formatting based on data values that → Chapter 16: Report Writer
Use Report Writer when:
The report has a regular structure with clear control breaks - Multiple control levels are needed - Automatic accumulation is valuable - The report is the primary output of the program → Chapter 16: Report Writer
V
Validation in INPUT PROCEDURE is not optional
it is a production necessity 2. **Error thresholds prevent cascade failures** — better to stop early than corrupt downstream files 3. **Reconciliation counts are essential** — they enable operations to verify correct processing without examining every record 4. **The SORT verb is more than just orde → Case Study 1: GlobalBank Daily Transaction Sort
A physical or logical unit of storage on z/OS (e.g., a DASD volume). Datasets are allocated on volumes, and the catalog records which volumes contain which datasets. (Ch. 2) See also: *DASD*, *Dataset*. → Appendix F: Glossary
CI and CA splits degrade performance over time (see E.5). - More complex to define and tune than sequential files. - Index maintenance adds overhead to insert/update/delete operations. → Appendix E: VSAM and File Organization Reference
What causes S0C7:
Uninitialized COMP-3 (packed decimal) fields - Alphabetic data moved to a numeric field - File records with corrupted data - Reading past end-of-file - Uninitialized group-level moves that overlay numeric fields - Incorrect REDEFINES over numeric fields → Chapter 33: Debugging Strategies
When to choose asynchronous:
The caller does not need an immediate answer (notifications, reporting) - The target system may be temporarily unavailable - Volume is high and spiky (buffer with queue) - Decoupling is important for maintainability → Chapter 39: Real-Time Integration
When to choose synchronous:
The caller needs an immediate answer (balance inquiry, eligibility check) - The operation is idempotent (safe to retry) - Both systems have high availability → Chapter 39: Real-Time Integration
Where Containerized COBOL Makes Sense
COBOL programs compiled with GnuCOBOL running on Linux - Batch processing jobs that need elastic scaling - COBOL microservices behind an API gateway - Development and testing environments - Cloud migration targets (when moving off mainframe) → Chapter 40: COBOL and the Modern Stack
The section of the COBOL Data Division that defines data items whose values persist for the life of the program (or the run unit). In CICS, each task gets its own copy of working-storage. Contrast with *Local-Storage Section*, which is re-initialized on each invocation. (Ch. 3) See also: *Local-Stor → Appendix F: Glossary
Write your own sort algorithm
bubble sort for small tables, quicksort for larger ones 3. **Use SORT with an INPUT/OUTPUT PROCEDURE** that RELEASEs table entries and RETURNs them back into the table → Chapter 15: Sort and Merge
WS-DAILY-RATE has 9 decimal places
far more than needed for the final result, but essential for intermediate precision 2. **WS-DAILY-INTEREST and WS-ACCRUED-INT have 6 decimal places** — carrying extra precision through the accumulation loop 3. **WS-POSTED-INT has only 2 decimal places with ROUNDED** — rounding occurs only at the ver → Chapter 5: Numeric Precision and Arithmetic
A COBOL statement (Enterprise COBOL 4.2+) that converts a COBOL data structure into XML text. Used for data exchange with systems that consume XML. (Ch. 39) See also: *XML PARSE*, *JSON GENERATE*. → Appendix F: Glossary
XML PARSE
A COBOL statement that parses XML text and invokes a processing procedure for each XML event (start-of-element, content, end-of-element, etc.). Supports SAX-style (event-driven) XML processing. (Ch. 39) See also: *XML GENERATE*. → Appendix F: Glossary
Y
You want to protect input data
the called program cannot accidentally modify data the caller depends on. 2. **You're passing literals or expressions** — BY CONTENT allows you to pass literal values and arithmetic expressions. 3. **You want read-only semantics** — even though COBOL cannot declare a parameter as "const," BY CONTENT → Chapter 23: Parameter Passing Patterns
Your program must demonstrate:
IPT pattern in main paragraph - Hierarchical numbered paragraphs with verb-noun naming - 88-level condition names for all statuses - EVALUATE for routing logic - Maximum 3 levels of nesting - Each paragraph under 30 lines - High cohesion, low coupling - No GO TO (or disciplined GO TO with PERFORM TH → Exercises — Chapter 8: Paragraph and Section Design
Z
z/OS
IBM's flagship mainframe operating system (formerly OS/390, MVS). z/OS provides the runtime environment for COBOL batch and online programs, along with subsystems such as *DB2*, *CICS*, *IMS*, *JES*, and *UNIX System Services*. (Ch. 1, Ch. 2) → Appendix F: Glossary
z/OS Connect
An IBM product that enables z/OS-based assets (COBOL programs, CICS transactions, IMS transactions, DB2 stored procedures) to be accessed as RESTful APIs. Provides API mapping, data transformation, and API management capabilities. (Ch. 39, Ch. 40) See also: *REST*, *API Wrapping*. → Appendix F: Glossary
The current name for IBM's interactive debugging tool for z/OS (formerly Debug Tool). Supports COBOL, PL/I, C/C++, and assembler debugging in batch, TSO, CICS, IMS, and DB2 stored procedure environments. (Ch. 33) See also: *Debug Tool*, *Debugging*. → Appendix F: Glossary
The *DISPLAY* (default) numeric representation in COBOL, where each digit occupies one byte. The sign is embedded in the zone portion of the last byte (C for positive, D for negative in EBCDIC). Also called "external decimal." (Ch. 5) See also: *DISPLAY*, *PACKED-DECIMAL*, *COMP*. → Appendix F: Glossary