Prerequisites and Self-Assessment
This book does not teach COBOL. It teaches enterprise architecture for people who already know COBOL. If you are not sure whether you are ready, this section will tell you.
What You Must Know
The following skills are assumed throughout every chapter. If any of these are unfamiliar, you need Books 1 and 2 (or equivalent experience) before proceeding.
COBOL Language Fundamentals
- All four divisions: IDENTIFICATION, ENVIRONMENT, DATA, PROCEDURE --- you should be able to write them from memory without referencing a manual.
- Data description: PIC clauses (numeric, alphanumeric, edited), OCCURS, REDEFINES, RENAMES, level-88 condition names, group items, elementary items.
- Control flow: PERFORM (inline and out-of-line, VARYING, UNTIL, TIMES, THRU), EVALUATE, IF/ELSE, nested conditionals.
- File handling: OPEN, CLOSE, READ, WRITE, REWRITE, DELETE for sequential, relative, and indexed files. FILE STATUS checking. DECLARATIVES and USE AFTER ERROR.
- Arithmetic: COMPUTE, ADD, SUBTRACT, MULTIPLY, DIVIDE with ON SIZE ERROR. ROUNDED. Understanding of decimal precision and intermediate results.
- String handling: STRING, UNSTRING, INSPECT (TALLYING, REPLACING, CONVERTING), reference modification.
- Table handling: OCCURS, INDEXED BY, SEARCH, SEARCH ALL, SET, subscript vs. index. Multi-dimensional tables.
VSAM
- File organizations: KSDS (key-sequenced), RRDS (relative record), ESDS (entry-sequenced) --- when to use each and why.
- Access modes: Sequential, random, and dynamic access.
- IDCAMS: DEFINE CLUSTER, REPRO, LISTCAT, DELETE at minimum.
- Alternate indexes: Definition, PATH, and UPGRADE considerations.
- FILE STATUS: Two-byte status code interpretation for VSAM-specific conditions.
Embedded SQL and DB2 Fundamentals
- Static SQL: SELECT INTO, INSERT, UPDATE, DELETE embedded in COBOL programs.
- Host variables: COBOL-to-DB2 data type mapping, indicator variables for NULL handling, SQLCA interpretation.
- Cursors: DECLARE, OPEN, FETCH, CLOSE. WITH HOLD. Cursor positioning.
- DB2 bind: BIND PLAN, BIND PACKAGE --- you know that precompilation and binding exist and roughly what they do.
- SQLCODE: You can interpret common SQLCODEs without looking them up: 0, +100, -805, -811, -818, -904, -911, -913.
- Basic joins, subqueries, GROUP BY, ORDER BY in embedded SQL context.
CICS Fundamentals
- Pseudo-conversational design: RETURN TRANSID, COMMAREA, the pseudo-conversational lifecycle.
- BMS maps: DFHMSD, DFHMDI, DFHMDF, symbolic map copybooks, SEND MAP, RECEIVE MAP.
- Basic CICS commands: EXEC CICS READ, WRITE, REWRITE, DELETE (VSAM). EXEC CICS LINK, XCTL, RETURN. EXEC CICS SEND, RECEIVE.
- Error handling: RESP and RESP2, HANDLE CONDITION (and why you should avoid it), HANDLE ABEND basics.
- Transaction concepts: What a CICS task is, what a transaction ID is, how CICS manages conversational state.
JCL
- JOB, EXEC, DD statements: You can write a complete JCL stream for a compile-link-go, a batch COBOL execution, and a multi-step job.
- DD parameters: DSN, DISP, SPACE, DCB, UNIT, VOL --- you know what they mean and how to set them.
- Procedures: PROC, PEND, overriding proc steps.
- Conditional execution: COND parameter, IF/THEN/ELSE/ENDIF.
- Utilities: IEBGENER, IEBCOPY, IDCAMS --- you have used them.
SORT/MERGE
- DFSORT or SyncSort: SORT FIELDS, INCLUDE/OMIT, INREC, OUTREC, SUM FIELDS. You have written SORT control statements and invoked SORT from JCL.
- COBOL SORT: SORT verb with INPUT PROCEDURE and OUTPUT PROCEDURE.
Subprogram Linkage
- CALL: Static CALL, dynamic CALL, BY REFERENCE, BY CONTENT, BY VALUE.
- LINKAGE SECTION: Passing data between programs via the linkage section.
- RETURN-CODE: Using RETURN-CODE for inter-program communication.
- Copybooks: COPY statement, REPLACING clause, shared data definitions.
Debugging
- CEDF: CICS Execution Diagnostic Facility --- you have used it to step through CICS transactions.
- Abend codes: You can interpret common abend codes: S0C7 (data exception), S0C4 (protection exception), S0C1 (operation exception), S806 (load failure), S80A (virtual storage), S878 (GETMAIN failure).
- DISPLAY debugging: You have used DISPLAY statements for batch program debugging.
- Compiler listings: You can read a COBOL compiler listing to find diagnostics and data maps.
General
- Mainframe environment: You are comfortable with TSO/ISPF or an equivalent IDE. You can submit jobs, review SYSOUT, navigate datasets.
- Basic TCP/IP: You understand IP addresses, ports, and the basic client-server model. You do not need to be a networking expert.
Self-Assessment Diagnostic
Answer these 20 questions honestly, without looking anything up. Score yourself at the end.
COBOL Language (Questions 1-5)
1. What is the difference between PERFORM 100-PROCESS THRU 100-EXIT and PERFORM 100-PROCESS? When would you use THRU, and what is the risk?
2. You see this in a production program:
01 WS-AMOUNT PIC S9(7)V99 COMP-3.
01 WS-RATE PIC S9(3)V9(5) COMP-3.
01 WS-RESULT PIC S9(9)V99.
COMPUTE WS-RESULT = WS-AMOUNT * WS-RATE.
Is there a potential precision problem? Explain.
3. What does the following INSPECT statement do?
INSPECT WS-INPUT-STRING
TALLYING WS-COUNT FOR ALL "," BEFORE INITIAL "."
REPLACING ALL ";" BY "," AFTER INITIAL ".".
4. Explain the difference between SEARCH (serial) and SEARCH ALL (binary). What precondition must be met for SEARCH ALL to work correctly?
5. A program uses CALL "SUBPROG" USING BY CONTENT WS-KEY. What is the implication of BY CONTENT versus BY REFERENCE for the called program? Can the called program modify WS-KEY in the calling program?
VSAM and File Handling (Questions 6-8)
6. You attempt a random READ on a KSDS and get FILE STATUS "23". What happened? What is the correct programmatic response?
7. What is the purpose of an alternate index, and what does the UPGRADE attribute control?
8. You need to process a VSAM KSDS both sequentially (for a batch report) and randomly (for on-demand lookups) in the same program. Which ACCESS MODE do you use, and what statements control the switch between sequential and random processing?
DB2 (Questions 9-12)
9. Your program receives SQLCODE -911. What happened? What are the two most common causes, and what should your program do in response?
10. Explain the difference between a cursor declared WITH HOLD and one without. When does the distinction matter?
11. What is an indicator variable in embedded SQL? Write the COBOL data definition for a nullable CHAR(20) host variable with its indicator.
12. You have a SELECT statement that sometimes returns SQLCODE 0 and sometimes returns SQLCODE -811. What is wrong, and how do you fix it?
CICS (Questions 13-16)
13. Explain pseudo-conversational design. Why does CICS use this pattern instead of holding a task active while the user types?
14. What is a COMMAREA? What is its maximum size, and what happens if you need to pass more data than it can hold?
15. Your CICS program does an EXEC CICS READ and gets RESP value 13 (NOTFND). What should your program do? What should it absolutely NOT do?
16. What is the difference between EXEC CICS LINK and EXEC CICS XCTL? When would you use each?
JCL and Operations (Questions 17-20)
17. Explain DISP=(NEW,CATLG,DELETE). What happens to the dataset if the step ends normally? What happens if it abends?
18. You have a three-step job. Step 1 creates a dataset, step 2 processes it, step 3 deletes it. Step 2 abends. What happens to the dataset, and what JCL techniques would you use to ensure proper cleanup?
19. What is the difference between a cataloged procedure and an in-stream procedure? How do you override a DD statement inside a cataloged procedure?
20. Your batch COBOL job abends with S0C7 in step STEP03. Describe your diagnostic process: what do you look at first, second, and third?
Scoring
Give yourself one point for each question you could answer confidently and correctly.
| Score | Assessment |
|---|---|
| 18-20 | You are ready. Proceed to Chapter 1. |
| 14-17 | You are probably ready but have some gaps. Skim the relevant sections of Book 2 for your weak areas, then proceed. |
| 10-13 | You have significant gaps. Work through Book 2 before starting this book. You will struggle with Parts II-IV without stronger DB2 and CICS foundations. |
| Below 10 | Start with Book 1. This book is not the right starting point for you yet. There is no shame in building the foundation properly --- it will make everything that follows faster. |
Be honest with yourself. Reading a book that is above your level does not make you learn faster. It makes you memorize fragments without understanding, which is worse than not reading it at all.
What This Book Assumes You Do NOT Know
This is what you are here to learn. If you already know all of this, you do not need this book.
z/OS Internals (Part I)
- How z/OS manages virtual storage, address spaces, and the relationship between your COBOL region size and your program's behavior
- Language Environment internals: what happens between the CALL to your program and your first PROCEDURE DIVISION statement
- DFSMS storage management: SMS classes, ACS routines, and how storage is allocated, managed, and migrated
- Workload Manager: service classes, service goals, how WLM decides when and where your work runs
Advanced DB2 (Part II)
- DB2 optimizer internals: cost-based optimization, filter factor estimation, access path selection, and why your query changed plans after RUNSTATS
- Advanced SQL: multi-row FETCH and INSERT, temporal tables, recursive CTEs, OLAP functions in COBOL contexts
- Locking architecture: lock escalation, deadlock detection and resolution, concurrency strategies for high-throughput systems
- DB2 utilities at scale: REORG strategies for billion-row tables, online REORG, RUNSTATS distribution statistics
- Stored procedures and UDFs written in COBOL
- Performance diagnosis: reading EXPLAIN output, DSN_STATEMNT_TABLE analysis, IFCID trace interpretation
CICS Architecture (Part III)
- Multi-Region Operation (MRO) and CICSPlex topology
- CICS web services: REST and SOAP from COBOL programs
- Channels and containers: modern data passing patterns
- CICS security architecture: RACF integration, transaction security, resource-level security
- CICS performance tuning: task management, storage tuning, MAXT diagnosis
- XA transactions, indoubt resolution, and automatic recovery design
Messaging and Integration (Part IV)
- IBM MQ: queue management, message patterns, transactional messaging from COBOL
- Event-driven architecture: MQ triggers, CICS events, publish/subscribe patterns
- API-first COBOL: z/OS Connect, API mediation layer, OpenAPI specifications
- Data integration patterns across mainframe and distributed boundaries
Batch Architecture at Scale (Part V)
- Batch window engineering: critical path analysis, scheduling optimization, the math of getting everything done by 6am
- Checkpoint/restart design: building programs that survive any failure at any point
- Parallel batch processing: partitioned processing, multi-step pipelines, DB2 parallelism
- Batch performance: I/O optimization, buffer tuning, SORT optimization at scale
- Batch monitoring: SMF records, automated alerting, incident response playbooks
Security and Operations (Part VI)
- RACF for developers: profiles, permissions, program-level security, encryption
- Capacity planning: MSU budgeting, growth forecasting, right-sizing
- Disaster recovery: GDPS, Sysplex failure domains, DR testing methodology
- Operational automation: REXX scripting, JCL procedures, self-healing batch streams
Modernization Engineering (Part VII)
- Modernization strategy: rehost, refactor, replatform, replace --- making the right decision
- Strangler fig pattern applied to mainframe systems
- Running COBOL in cloud environments (and when you should not)
- AI-assisted COBOL: using LLMs for code understanding, documentation, and assisted refactoring
- DevOps for mainframes: Git integration, CI/CD pipelines, automated testing on z/OS
- Hybrid architecture: designing systems where COBOL and cloud-native coexist
If you know some of these topics, that is excellent --- you will move through those chapters quickly. If you know all of them, you should be writing this book, not reading it.