Quiz: Legacy System Modernization Case Study
Multiple Choice
1. What is the primary risk of a "big bang" rewrite of a legacy system?
a) The new language may not support COMP-3 fields b) The new system cannot replicate accumulated business logic, and requirements change during the multi-year effort c) DB2 cannot be accessed from non-COBOL languages d) CICS transactions cannot be replicated in Java
2. Why did James assign confidence levels (High/Medium/Low) to business rules in the catalog?
a) To prioritize which rules to implement first b) To identify rules that are poorly understood and need further research before modification c) To determine which rules can be deleted d) To calculate the testing budget for each rule
3. What is the main advantage of extracting validation logic into a called subprogram (CLM-VALID)?
a) Subprograms run faster than inline code b) Multiple programs can share the same validation logic, and changes need to be made only once c) Subprograms can be written in Java d) Subprograms do not need to be compiled
4. In the DB2 migration, why did Tomás migrate one file at a time instead of all files at once?
a) DB2 can only handle one table migration per day b) Incremental migration reduces risk and allows the system to operate in mixed mode during transition c) The VSAM files were too large to migrate simultaneously d) DB2 licensing costs are based on the number of simultaneous migrations
5. What does SQLCODE +100 indicate in a COBOL/DB2 program?
a) The SQL statement was successful b) A deadlock occurred c) The row was not found (no data) d) A constraint violation occurred
6. Why does the refactored CLM-INTAKE use the cascading-IF pattern instead of GO TO?
a) GO TO is not valid in Enterprise COBOL v6 b) The cascading-IF pattern makes the control flow easier to trace and test c) GO TO is slower than IF-ELSE d) The compiler rejects programs with GO TO statements
7. What is the purpose of a DCLGEN copybook in DB2 programming?
a) To define BMS screen maps b) To generate COBOL data definitions that match DB2 table columns exactly c) To create JCL for DB2 utilities d) To define VSAM alternate index keys
8. In the CI/CD pipeline, why is the regression test suite the most valuable artifact?
a) It generates the most documentation b) It allows developers to make changes with confidence that they will not break existing functionality c) It runs faster than other tests d) It is required by COBOL language standards
9. What Enterprise COBOL feature enables direct JSON generation from COBOL data structures?
a) EXEC SQL GENERATE JSON b) CALL 'JSONUTIL' c) JSON GENERATE statement (Enterprise COBOL v6.1+) d) EXEC CICS GENERATE JSON
10. Why did James preserve the legacy program alongside the refactored version during the transition?
a) COBOL cannot delete old programs b) To allow immediate rollback to the legacy version if the refactored version produced unexpected results c) The legacy version was needed for documentation purposes only d) Both versions needed to run simultaneously in production permanently
Short Answer
11. Explain the difference between "modernizing" and "rewriting" a legacy system. Why is modernization generally preferred?
12. Describe three specific problems caused by having multiple inconsistent versions of the same copybook in a system.
13. What is a "parallel run" and why is it essential during legacy system refactoring?
14. Explain how CICS channels and containers work for web service communication. How do they differ from the traditional COMMAREA approach?
15. James's modernization preserved the batch processing architecture even after adding APIs. Why was this the right decision?
Design Questions
16. You discover that a legacy program contains a business rule that nobody understands (the equivalent of ADJ-005 with Low confidence). The rule affects approximately 2% of claims. How would you approach modernizing this rule? What are the risks of changing it? Of leaving it?
17. Design a monitoring dashboard for the modernized MedClaim system. What metrics would you track? How would you detect problems early?
18. MedClaim wants to add machine learning-based fraud detection to their claim processing. How would you integrate an ML model (likely running in Python on a distributed system) with the COBOL claim adjudication pipeline? Sketch an architecture.
Answer Key
1. b) The rewrite cannot replicate accumulated business logic, and requirements evolve during the years-long effort. Legacy systems embody decades of business rules that are difficult to extract and reimplemented correctly.
2. b) Low-confidence rules indicate poorly understood logic that requires research before it can be safely modified. These are the riskiest parts of a modernization.
3. b) Shared validation logic means changes are made once and apply everywhere. This eliminates the risk of inconsistent validation across programs.
4. b) Incremental migration limits risk. If one migration fails, only one file is affected. The system operates in mixed mode (some VSAM, some DB2) during the transition.
5. c) SQLCODE +100 means "not found" — no rows matched the WHERE clause. This is equivalent to VSAM file status '23'.
6. b) The cascading-IF pattern produces a linear, top-to-bottom control flow that is easier to read, trace in a debugger, and verify for correctness. GO TO creates non-linear flow.
7. b) DCLGEN (Declaration Generator) creates COBOL copybooks that exactly match DB2 table column definitions, ensuring type and size consistency between SQL and COBOL.
8. b) Automated regression tests provide confidence that changes do not break existing functionality. This transforms change from a risky event into a routine activity.
9. c) The JSON GENERATE statement, introduced in Enterprise COBOL v6.1, converts COBOL data structures to JSON format directly.
10. b) Keeping the legacy version available allows immediate rollback if the refactored version produces incorrect results. This is the defensive programming approach to modernization.
11. Modernization preserves the existing system while improving it incrementally. Rewriting discards the existing system and builds from scratch. Modernization is preferred because it delivers value at each phase, preserves accumulated business logic, carries lower risk, and can be completed in months rather than years.
12. (1) Programs may interpret the same data differently, causing incorrect processing. (2) A change to a record format must be applied to multiple copybooks, with risk of inconsistency. (3) New developers cannot determine which version is "correct," slowing onboarding.
13. A parallel run executes both the legacy and refactored versions against the same input and compares outputs. It is essential because it proves that the refactored code produces identical results, catching bugs that code review and unit tests might miss.
14. Channels and containers are CICS's modern data-passing mechanism. A channel is a named collection of containers; each container holds a named data item. Unlike COMMAREA (limited to 32KB, single data area), channels support multiple named containers of virtually unlimited size, making them suitable for web service payloads.
15. The batch architecture is proven, efficient, and handles the bulk of processing. Adding APIs provides real-time access where needed without disrupting the reliable batch processing. Not everything needs to be real-time.
16-18. Open-ended design questions. Evaluate for completeness, risk awareness, and pragmatism.