Exercise 1: Why Indexed Organization Made DECLARATIVES Genuinely More Valuable Here — Possible Solution ==================================================================== WHAT THE ORIGINAL SEQUENTIAL CUSTOMER-FILE'S REAL ERROR SURFACE LOOKED LIKE Fundamentals' own sequential CUSTOMER-FILE was accessed almost entirely through one real, repeating pattern: a priming READ followed by more READs inside a PERFORM UNTIL loop, each with its own AT END clause. The real range of things that could go wrong was genuinely narrow - essentially just reaching the end of the file - and that one condition was already handled consistently, inline, at every read. WHAT CONVERTING TO A REAL INDEXED FILE GENUINELY CHANGES This capstone's own Step 3 converts CUSTOMER-FILE to ORGANIZATION IS INDEXED with ACCESS MODE IS DYNAMIC and a real RECORD KEY, replacing the old linear scan with a real direct-by-key READ. Chapter 1's own material establishes that indexed, dynamic-access files open up a genuinely wider real range of possible I/O outcomes than a sequential file ever had - INVALID KEY conditions for a missing record (code 23), real possibilities around REWRITE/DELETE once the file is genuinely updatable, and other real conditions sequential access structurally never encountered at all. WHY A WIDER REAL RANGE OF CONDITIONS MAKES REPEATED INLINE CHECKS GENUINELY MORE BURDENSOME Chapter 6's own material frames DECLARATIVES as the fix for "the real repetition problem" - the more places in a program that touch a file, and the more distinct real conditions that file's own operations can produce, the more repeated handling code inline checking would require at every one of those places. Indexed, dynamic access genuinely multiplies both of these factors compared to the old sequential file: more kinds of real outcomes are possible, and this capstone's own Step 3/Step 8 material shows the file now being touched from multiple separate real programs (the batch job and the new CICS transaction), not just one. WHY DECLARATIVES IS GENUINELY MORE VALUABLE IN THIS SPECIFIC SITUATION Because the newly-indexed CUSTOMER-FILE now has a genuinely wider set of real conditions to handle, and is genuinely touched from more than one program, centralizing that handling in one DECLARATIVES section avoids duplicating an increasingly complex real set of checks across multiple places - exactly the situation where DECLARATIVES' own real value, established in Chapter 6, becomes most pronounced compared to the simpler, narrower error surface the original sequential file ever had. ANSWER: The original sequential CUSTOMER-FILE had a genuinely narrow real error surface - essentially just AT END, already handled consistently inline at every read. Converting it to a real indexed, dynamic-access file in Step 3 introduces a genuinely wider range of possible real conditions (INVALID KEY on a missing record, real REWRITE/DELETE possibilities, and more), and this capstone's own material shows the file now being accessed from multiple separate programs rather than just one. Because DECLARATIVES exists specifically to avoid repeating handling logic across many places for many possible conditions, it becomes genuinely more valuable here than it would have been for the simpler, single-condition sequential file, where inline handling was never much of a repetition burden to begin with. WHY THIS WORKS AS AN ANSWER ------------------------------ This correctly connects the real increase in both the number of possible I/O conditions and the number of programs touching the file to DECLARATIVES' own stated purpose, explaining specifically why the value of centralizing handling grows alongside those two factors.