Quiz: Migration and Modernization
Multiple Choice
1. On the modernization spectrum, which strategy has the lowest risk and lowest cost?
a) Replace b) Wrap c) Maintain d) Re-Architect
2. What is the primary advantage of API wrapping over rewriting?
a) It produces better code quality b) It preserves proven business logic while enabling modern interfaces c) It is always cheaper than maintaining the existing system d) It eliminates the need for mainframe infrastructure
3. What does IBM z/OS Connect do?
a) Converts COBOL to Java automatically b) Exposes COBOL/CICS programs as REST APIs with automatic JSON-to-COMMAREA transformation c) Migrates VSAM files to cloud storage d) Provides a COBOL IDE for z/OS development
4. In a COBOL-to-REST API wrapper, how should COBOL return code "0004" (record not found) be mapped to HTTP?
a) 200 OK b) 400 Bad Request c) 404 Not Found d) 500 Internal Server Error
5. The Strangler Fig pattern for system rewriting involves:
a) Rewriting the entire system at once and switching over in one weekend b) Incrementally replacing one function at a time while keeping the old system running c) Removing old code without replacing it d) Wrapping the system in a new interface without changing anything
6. Which of the following is a common failure mode of COBOL rewrite projects?
a) The rewrite finishes too quickly b) Underestimating the complexity of business rules embedded in existing code c) The new system is too reliable d) Modern languages cannot handle the same workload
7. What can GnuCOBOL enable for cloud deployment?
a) Direct migration of JCL to cloud workflows b) Compilation of COBOL to native executables that run on Linux cloud VMs and containers c) Automatic conversion of CICS transactions to REST APIs d) Migration of VSAM files to cloud databases
8. When converting VSAM file access to DB2 embedded SQL, SQLCODE 100 corresponds to:
a) WRITE with duplicate key b) Successful operation c) Record not found (like INVALID KEY) d) Database connection error
9. What is screen scraping in the context of mainframe modernization?
a) Automating the 3270 terminal interface to extract data b) Converting BMS maps to HTML c) Scanning source code for security vulnerabilities d) Removing old terminal-based programs
10. Which factor should weigh MOST heavily in deciding between wrapping and rewriting?
a) The age of the COBOL code b) Whether the business logic is sound and the architecture can support required capabilities c) The number of lines of code d) Whether the organization uses IBM or non-IBM hardware
Short Answer
11. Explain the difference between "legacy" and "obsolete" in the context of COBOL systems. Give an example of a COBOL system that is legacy but not obsolete.
12. A COBOL COMMAREA uses COMP-3 packed decimal fields. When exposing this as a JSON API, what data transformation challenges arise? How would you handle them?
13. Describe three risks of doing nothing (not modernizing) a COBOL system. For each risk, explain how it compounds over time.
14. Why do automated COBOL-to-Java translation tools produce code that is "functional but unidiomatic"? What additional work is needed after translation?
15. Your CIO wants to containerize a COBOL program that uses CICS and DB2. What challenges would you identify? What alternatives would you suggest?
True/False
16. API wrapping requires modifying the existing COBOL source code. (True/False)
17. The Strangler Fig pattern allows incremental migration with rollback capability at each step. (True/False)
18. AI tools can fully understand the business context behind COBOL code without human input. (True/False)
19. Running COBOL in a Docker container requires a z/OS operating system. (True/False)
20. The cost of doing nothing (maintaining the status quo) is always lower than the cost of modernization. (True/False)
Answer key available in Appendix G.