Exercise 3: The Hierarchical Relationship in WS-CUSTOMER-RECORD — Possible Solution ==================================================================== This chapter's own real level-number table establishes that an item with a higher level number is subordinate to an item with a lower one - applying that rule directly to the worked example explains the relationship precisely. WHAT THE 01-LEVEL ITEM REPRESENTS WS-CUSTOMER-RECORD is declared at level 01, which this chapter identifies as beginning a record definition - the top of a hierarchy. It doesn't itself hold a specific PICTURE clause or a specific piece of data; instead, it acts as the overall container name for the complete customer record as a whole. WHAT THE THREE 05-LEVEL ITEMS REPRESENT WS-CUSTOMER-ID, WS-CUSTOMER-NAME, and WS-BALANCE are each declared at level 05 - per this chapter's own table, a level subordinate to the 01 above it. Each of these three items does hold its own specific PICTURE clause (and, for WS-BALANCE, its own USAGE clause), meaning each one individually describes one real, distinct piece of data that together make up the larger record. WHY THIS IS A GENUINE PARENT-CHILD RELATIONSHIP, NOT JUST GROUPING The relationship here is real and structural, not merely three unrelated fields happening to be listed near each other. WS-CUSTOMER- RECORD, as the 01-level parent, represents the entire customer record as a single logical unit; the three 05-level fields together define exactly what that unit is composed of. Referring to WS-CUSTOMER-RECORD as a whole conceptually refers to all three subordinate fields moving and existing together, while referring to one of the 05-level items individually - such as WS-CUSTOMER-NAME - refers only to that one specific piece of data within the larger structure. WHY THIS MATTERS FOR HOW COBOL PROGRAMS USE RECORDS This hierarchical structure is exactly what makes it possible to treat an entire customer record as one meaningful group (useful, for instance, when reading or writing a whole record to a file, a topic Chapter 8 covers directly) while still being able to reference and manipulate one specific field within it individually when only that piece of data is needed. ANSWER: WS-CUSTOMER-RECORD, declared at level 01, is the parent record - the top of the hierarchy, representing the customer record as a whole. WS-CUSTOMER-ID, WS-CUSTOMER-NAME, and WS-BALANCE, each declared at level 05, are subordinate items nested beneath that 01-level parent, per this chapter's own real rule that a higher level number is subordinate to a lower one. Together, the three 05-level fields define exactly what data makes up the larger WS-CUSTOMER-RECORD structure, allowing the whole record to be treated as one unit while still letting each individual field be referenced and used on its own. WHY THIS WORKS AS AN ANSWER ------------------------------ This correctly applies the chapter's own stated level-number hierarchy rule to the specific worked example, and explains why the 01/05 relationship is a genuine structural parent-child relationship rather than an incidental grouping of unrelated fields.