Mainframe modernization · Part 4
How to re-engineer a mainframe estate in parallel
Two adjacent rows in Medicare’s 2021.3 Home Health Pricer give different rates for the same kind of skilled nursing visit. Both carry revenue code 0550. The standard non-rural rate is $149.68 in the row effective January 1, 2020, and $152.63 in the row effective January 1, 2021. Give one coding agent the file reader and another the claim lookup, and each has a plausible shortcut. The reader could keep only the latest row for each code. The lookup could pass every test its author wrote using a table with just one row per code. A December 2020 claim would expose the mistake. CMS 2021.3 mainframe source and tables, ZIP
- Revenue rate file
- Load dated ratesBuild the claim lookup
- Check the rate at the year boundary
Follow a claim through the batch
In the published COBOL, the batch manager HHMGR213 reads a 650-character claim record, calls HHOPN213 and writes the updated record to its output file. On its first normal call, HHOPN213 reads four reference files into working storage and sets a switch so later claims can reuse the tables. Lines 299–306 of hhopn213.txt pass them to the driver. CMS COBOL archive
CALL HHDRV213 USING WAGE-INDEX-DATA
MSA-WI-TABLE
CBSA-WAGE-INDEX-DATA
CBSA-WI-TABLE
HRG-TABLE
REVENUE-TABLE
HHA-INPUT-DATA
HOLD-VARIABLES-DATA.
The sixth argument is the revenue table. The seventh is the claim record the manager will write back. The driver declares those arguments in the same order. An agent tracing this call needs the layouts on both sides. The names can differ in COBOL because the caller and callee match arguments by position. IBM’s COBOL CALL reference
Find the assumption both teams would inherit
The loader reads revtabl.txt in file order. For each record it advances an index and copies the revenue code, effective date and rate fields into the next table entry. The driver finds the first matching code. Lines 459–461 of hhdrv213.txt show how it walks the remaining entries for that code. CMS 2021.3 driver and loader, ZIP
PERFORM 2800-GET-REV-SEARCH THRU 2800-EXIT
VARYING RU2 FROM RU1 BY 1 UNTIL
TB-REV-CODE (RU2) NOT = HHA-REVENUE-CODE (SUB1).
On line 467 the test is HHA-SERV-THRU-DATE NOT < TB-REV-EFFDATE (RU2). A row becomes eligible on its effective date. Each eligible row can overwrite the selected rate. The published file keeps each code’s rates together in ascending date order, so the last qualifying row supplies the amount. A replacement lookup could select the latest eligible date explicitly and allow the reader to return rows in any order. If the new reader has to serve the COBOL driver during rollout, it must still supply the layout and row order that driver expects.
What can proceed in parallel
One agent can build the reader from the fixed-width file and its field declarations. Give it the two published 0550 rows and check that both survive with their dates, that the leading zero in the code survives, and that the field 000015263 decodes to $152.63. A second agent can implement the lookup against those same dated entries. For the standard non-rural column, a service-through date of December 31, 2020 should select $149.68. January 1, 2021 should select $152.63. Those expectations come straight from the table. They are rates before the payment calculation.
Before accepting either change, feed the published file through the new reader and pass its output to the new lookup. Run the January case first, followed by the December case, against the same loaded table. That order would catch a reader that discarded historical rows and a lookup that kept using the most recent claim’s rate. Inspect the claim’s selected rate at the handoff to the calculator. Both dates go through this lookup before the driver chooses between the 2020 and 2021 calculators. The teams can keep this test as they add cases for rural rates and the separate rates for providers that did not submit the required data.
How that scales to a larger estate
For a large inventory, a community-detection algorithm such as Leiden can suggest groups of closely connected programs and files. A group is a place to begin tracing. In this example, a dependency graph could show the reader handing a table to the driver. Discovering that one code can have several valid rows took the file layout, the data and the driver’s search loop. Leiden research paper
We’d give another team a unit when it has an input it can build against, a result it can verify independently and an agreed check with its neighbour. Here that check costs two rows and two dates. For an interface whose owners still disagree about the result, finishing one case together is a better use of their time than assigning more agents.
Part 5 follows a comparison from recorded output through a parallel run.
← All parts in this series