Quiz — Chapter 40: COBOL and the Modern Stack
Multiple Choice
1. What is the primary benefit of using a multi-stage Docker build for COBOL?
a) It makes the COBOL program run faster b) It reduces the final container image size by excluding the compiler c) It enables parallel compilation d) It adds security encryption
2. Which tool enables z/OS mainframe interaction from a CI/CD pipeline?
a) Docker Compose b) Terraform c) Zowe CLI d) Ansible Galaxy
3. What does IBM DBB (Dependency Based Build) provide for COBOL?
a) Database backup and recovery b) Dependency-aware builds that recompile only impacted programs c) Docker container management d) DevOps billing and budgeting
4. In a microservices architecture, what is the recommended approach for data ownership?
a) All services share a single database b) Each service owns its data and communicates through APIs or events c) Data is stored in flat files shared via NFS d) One master service manages all data
5. Which VS Code extension provides COBOL syntax highlighting and copybook navigation?
a) GitHub Copilot b) IBM Z Open Editor c) Docker Extension d) Python Extension
6. What is COBOL-Check?
a) A code formatting tool b) A unit testing framework for COBOL c) A COBOL-to-Java converter d) A security scanning tool
7. Which cloud provider offers z/OS as a cloud service (ZaaS)?
a) AWS b) Google Cloud c) IBM Cloud d) Microsoft Azure
8. What is the purpose of Ansible for z/OS?
a) To compile COBOL programs b) To automate mainframe infrastructure management through code c) To convert JCL to shell scripts d) To monitor mainframe performance
9. In Kubernetes, what resource type runs multiple instances of a container?
a) Service b) ConfigMap c) Deployment d) Ingress
10. What is a key difference between containerized COBOL (GnuCOBOL on Linux) and mainframe COBOL?
a) The COBOL language syntax is different b) Mainframe facilities like CICS, VSAM, and JCL are not available in containers c) Containerized COBOL cannot process files d) Mainframe COBOL is always slower
True or False
11. COBOL programs that use CICS and VSAM can be directly containerized without modification. ____
12. Git branching strategies (feature branches, develop, main) work equally well for COBOL as for Java or Python. ____
13. CI/CD for COBOL can detect compile errors within minutes instead of hours. ____
14. Microservices architecture requires rewriting COBOL programs in a modern language. ____
15. Zowe CLI can submit JCL and view job output from a command line on any platform. ____
Short Answer
16. Explain why GlobalBank chose to modernize the development process (CI/CD) rather than rewriting the COBOL programs themselves.
17. Describe two security considerations specific to running COBOL in containers.
18. What role does an API gateway play in exposing COBOL services as REST APIs?
19. How does MedClaim's containerized adjudication service maintain consistency with the mainframe version's business rules?
20. Why is code review particularly important for COBOL programs that handle financial data?
Answer Key
1. b 2. c 3. b 4. b 5. b 6. b 7. c 8. b 9. c 10. b 11. False 12. True 13. True 14. False 15. True
16. The COBOL programs were already tested, reliable, and correct — 12 years without a logic defect in ACCTINQ. Rewriting would risk introducing bugs in critical financial systems. By modernizing the process (CI/CD), they achieved faster deployments (14 days to 3 days) and higher success rates (87% to 98%) without touching the proven business logic.
17. (1) Container image scanning: COBOL containers may include vulnerable OS packages that need regular patching. (2) Secret management: database credentials and API keys must not be hardcoded in COBOL source or JCL; use vault services or Kubernetes secrets.
18. The API gateway handles authentication (JWT/OAuth), rate limiting, request/response transformation, TLS termination, and monitoring. The COBOL program behind the gateway does not need to implement any of these concerns — it receives clean, validated input through its COMMAREA.
19. Both the mainframe and container environments use the same ADJCORE subprogram (shared source code). When adjudication rules change, ADJCORE is updated once and deployed to both environments, ensuring identical business logic.
20. COBOL programs processing financial data can affect millions of accounts. A subtle bug — such as a numeric overflow in a balance calculation or an incorrect condition in an EVALUATE — could cause incorrect financial postings that may not be detected until after the batch window completes. Code review catches these issues before they reach production.