<?xml version="1.0" encoding="UTF-8"?>
<!--
  FILE:        ch05fig01.xml
  BASENAME:    ch05fig01
  GRAPHIC:     ch05fig01.png  (also ch05fig01.gif at https://www.magec.com/DOC/ch05fig01.gif)
  GENERATED:   2026-06-13
  SOURCE:      Derived from ch05fig01.png (uploaded diagram image) and authoritative
               MAGEC RAD documentation at https://magec.com/DOC/
  PURPOSE:     Machine-readable representation of the MAGEC RAD "SEE Function"
               logic flow diagram, Chapter 05, Figure 01.
               Optimized for:
                 1. Generating a new graphic diagram for a human, including
                    links to MAGEC documentation.
                 2. AI consumption and reasoning.
                 3. AI generation of a narrative explanation that may be
                    read aloud (text-to-speech friendly).
  AUTHORITY:   https://magec.com/DOC/
               https://magec.com/DOC/insert_main.htm
               https://magec.com/DOC/diags_main.htm
  CONVENTIONS:
    - Entities whose names begin with '%' are MAGEC INSERTION POINTS.
    - Entities whose names match the pattern XXnnn-DESCRIPTION are
      COBOL PARAGRAPH NAMES generated in the MMP.
    - The SEE function has NO CONTINUATION-MODE.  It can serve as the
      NEW-TRANSACTION-MODE for NXT, DUP, CHG, or DEL functions.
    - All nine standard MAGEC function codes:
        xxxADD  xxxCHG  xxxDEL  xxxSEE  xxxNXT
        xxxDUP  xxxSCN  xxxFND  xxxLOC
      This diagram covers: xxxSEE
-->

<MagecDiagram
    id="ch05fig01"
    title="SEE Function — Logic Flow Diagram"
    functionCodes="SEE"
    chapter="05"
    figure="01"
    programType="MMP"
    model="MODELMMP MODELWIN"
    diagramURL="https://www.magec.com/DOC/ch05fig01.gif"
    diagramsChapterURL="https://www.magec.com/DOC/diags_main.htm"
    insertionPointsChapterURL="https://www.magec.com/DOC/insert_main.htm"
    generatedDate="2026-06-13">

  <!-- ============================================================
       NARRATIVE  (read-aloud / TTS-friendly prose description)
       ============================================================ -->
  <Narrative>
    <Title>MAGEC RAD — SEE Function Logic Flow</Title>
    <ReadAloud>
      This diagram illustrates the logical flow of the MAGEC RAD SEE function,
      which is a display-only maintenance function used to look up and display
      an existing record on the screen.

      An important note before we begin: the SEE function has NO
      CONTINUATION-MODE. That means every transaction processed by this
      function is treated as a brand-new request. However, the SEE function
      can serve as the NEW-TRANSACTION-MODE entry point for other functions,
      such as NXT, DUP, CHG, or DEL.

      Processing begins at the top of the diagram with the COBOL paragraph
      AA100-CHECK-FUNCTION, where the very first insertion point, percent-PREINIT,
      is encountered. This is the earliest point at which a developer can
      intercept execution. It runs for every transaction and every function.

      Next, control passes to paragraph BA100-INIT-STORAGE, which contains
      the percent-INIT insertion point. Here, the program initializes its
      working storage areas. This runs for all maintenance functions.

      From there, the program enters paragraph AAM200-MAINTENANCE-MAINLINE,
      where the percent-PFKEYM insertion point is processed. This is the top
      of the maintenance mainline logic and handles PF key detection, such
      as PF7, PF8, PF1, PF2, PF11, PF16, and PF17.

      The program then moves to paragraph BA210-MAINT-SCREEN, which houses
      the percent-INITATB insertion point. Here, screen attributes are
      initialized and can be overridden by the developer.

      Next is paragraph BA400-NORMALIZE-MAINT-KEY, containing the
      percent-NORMKEY insertion point. The key value entered by the operator
      in the SKEY field is normalized — that is, reformatted and validated —
      at this step.

      If the key is INVALID, processing branches to the right side of the
      diagram. Control goes to paragraph BB100-BLANK-SCREEN, which contains
      the percent-BLNKSCR insertion point. The screen is blanked, then
      percent-SNDSCRN in paragraph AA800-SEND-SCREEN is executed to send the
      screen back to the operator, followed by percent-GOBACK in paragraph
      AA900-GOBACK to end the task.

      If the key is valid, processing continues downward to paragraph
      AAM410-READ-BY-KEY, which contains the percent-REDKY insertion point.
      This is where the primary data class record is read from the file using
      the normalized key value.

      If the record is NOT FOUND, the flow again branches right to the
      percent-BLNKSCR, percent-SNDSCRN, and percent-GOBACK sequence described
      above.

      If the record IS FOUND — the REC-FOUND path — processing continues
      downward to paragraph JA100-LOGICAL-JOIN, containing the percent-JOIN
      insertion point. This is where secondary files or derived fields are
      logically joined to the primary record, building the complete logical
      record for display.

      From percent-JOIN, the program flows to paragraph BB200-FILL-SCREEN,
      which contains the percent-COMP insertion point. Here, all database
      fields are moved to the screen fields for display. The developer can
      use percent-COMP to make last-minute adjustments to what the operator sees.

      After percent-COMP, both the REC-FOUND path and the NOT-FOUND or
      INVALID-KEY paths converge at paragraph AA800-SEND-SCREEN, percent-SNDSCRN,
      and finally AA900-GOBACK, percent-GOBACK.

      To summarize the two main paths through the SEE function:
      Path one: valid key, record found — PREINIT, INIT, PFKEYM, INITATB,
      NORMKEY, REDKY, JOIN, COMP, SNDSCRN, GOBACK.
      Path two: invalid key or record not found — PREINIT, INIT, PFKEYM,
      INITATB, NORMKEY, BLNKSCR, SNDSCRN, GOBACK.
    </ReadAloud>
  </Narrative>

  <!-- ============================================================
       FUNCTION SCOPE NOTE
       ============================================================ -->
  <FunctionNote>
    The SEE function is a display-only (inquiry) function.
    It has NO CONTINUATION-MODE — every invocation is a NEW-TRANSACTION.
    It may serve as the NEW-TRANSACTION-MODE entry point for functions
    such as NXT, DUP, CHG, and DEL, which are the natural follow-on actions
    from viewing a record with SEE.
    The nine standard MAGEC function codes are:
    xxxADD, xxxCHG, xxxDEL, xxxSEE, xxxNXT, xxxDUP, xxxSCN, xxxFND, xxxLOC.
    This diagram covers: xxxSEE.
  </FunctionNote>

  <!-- ============================================================
       NODE DEFINITIONS
       Each node is either an InsertionPoint or a Paragraph.
       InsertionPoints begin with '%'.
       Paragraphs are named Cobol paragraph names from the generated MMP.
       docURL points to the authoritative online reference.
       ============================================================ -->
  <Nodes>

    <!-- NODE 1 -->
    <LogicBlock id="N01" sequence="1">
      <CobolParagraph
          name="AA100-CHECK-FUNCTION"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-PREINIT"/>
      <InsertionPoint
          name="%PREINIT"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-PREINIT"
          location="PROCEDURE DIVISION — AA100-CHECK-FUNCTION"
          applicableFunctions="ALL"
          modes="NEW-TRANSACTION, CONTINUATION"
          hasDefaultCode="NO">
        <Description>
          Earliest intercept point for all functions and all modes. Executed
          before initialization of VARIABLE-STORAGE and before TEST-KEY and
          TEST-FUNCT are set. Useful for DL/1 PCB scheduling, SQL CONNECT,
          or altering the key delimiter character.
        </Description>
        <Cautions>
          Cannot reference 88-level function-code conditions (ADD-FUNCTION,
          BROWS-FUNCTION, etc.) without first moving SFUNCT to TEST-FUNCT.
          The Mask may not yet be initialized; check TWA-MSK-ID before
          referencing screen fields.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 2 -->
    <LogicBlock id="N02" sequence="2">
      <CobolParagraph
          name="BA100-INIT-STORAGE"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-INIT"/>
      <InsertionPoint
          name="%INIT"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-INIT"
          location="PROCEDURE DIVISION — BA150-MAINT-INIT"
          applicableFunctions="MAINT (ADD CHG DEL SEE NXT DUP)"
          modes="NEW-TRANSACTION"
          hasDefaultCode="NO">
        <Description>
          Executed early in initialization for all MAINT-FUNCTIONs.
          VARIABLE-STORAGE is set to LOW-VALUES just before this code runs.
          Use to initialize custom work fields, especially COMP-3 numerics
          that must be zeroed to avoid Data Exception errors.
        </Description>
        <Cautions>
          Avoid referencing screen fields other than SFUNCT, SKEY, SCOMPL,
          and SERRMSG. The proper Mask may not yet be formatted.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 3 -->
    <LogicBlock id="N03" sequence="3">
      <CobolParagraph
          name="AAM200-MAINTENANCE-MAINLINE"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-PFKEYM"/>
      <InsertionPoint
          name="%PFKEYM"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-PFKEYM"
          location="PROCEDURE DIVISION — AAM200-MAINTENANCE-MAINLINE"
          applicableFunctions="MAINT (ADD CHG DEL SEE NXT DUP)"
          modes="NEW-TRANSACTION, CONTINUATION"
          hasDefaultCode="YES">
        <Description>
          Top of the maintenance mainline. Default code handles PF7/PF8
          (browse navigation), PF4 (transfer to LOC), PF1/PF2 (help),
          PF11 (help index), PF16/PF17 (copy/paste), and cursor-movement
          detection for CHG intent.
        </Description>
        <Cautions>
          PA1, PA2, CLEAR, PF15, and PF13 have predefined MAGEC meanings.
          SKEY is already moved to TEST-KEY; changes must be made to both.
          Screen may not yet be formatted with THIS-PGMS-MSK.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 4 -->
    <LogicBlock id="N04" sequence="4">
      <CobolParagraph
          name="BA210-MAINT-SCREEN"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-INITATB"/>
      <InsertionPoint
          name="%INITATB"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-INITATB"
          location="PROCEDURE DIVISION — BA200-INIT-ATTRIBUTES / BA210-MAINT-SCREEN"
          applicableFunctions="MAINT (ADD CHG DEL SEE NXT DUP)"
          modes="NEW-TRANSACTION"
          hasDefaultCode="NO">
        <Description>
          Inserted at the very end of the Attribute Initialization routine,
          before BA299-EXIT. Allows developer to override default 3270
          attribute values based on Function Code, Operator ID, or any
          other criteria. Can also alter screen field contents for variable
          headings.
        </Description>
        <Cautions>
          Do not reference file Data Items — I/O has not yet occurred.
          Exit with GO TO BA299-EXIT or fall through.
          Do not reference Browse screen (MSK652) fields here.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 5 — KEY NORMALIZATION + DECISION POINT -->
    <LogicBlock id="N05" sequence="5">
      <CobolParagraph
          name="BA400-NORMALIZE-MAINT-KEY"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-NORMKEY"/>
      <InsertionPoint
          name="%NORMKEY"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-NORMKEY"
          location="PROCEDURE DIVISION — BA400-NORMALIZE-MAINT-KEY"
          applicableFunctions="MAINT (ADD CHG DEL SEE NXT DUP)"
          modes="NEW-TRANSACTION"
          hasDefaultCode="NO">
        <Description>
          Executed after the standard key editing and reformatting. The
          fully formatted key value is in FILE-KEY, ready to be moved to
          NORMALIZED-KEY. Developer can add custom key edits or massage
          the key value (e.g., add a prefix based on Terminal ID or
          Operator ID).
        </Description>
        <Cautions>
          To signal an error, GO TO BA480-BAD-KEY.
          Either GO TO BA480-BAD-KEY or fall through; do not GO TO
          BA499-EXIT without NORMALIZED-KEY being properly set.
          If doing I/O here, save TWA-DB-REQUEST in TWA-DB-REQ-SAV.
          MAINT-only — do not confuse with %NKLOC (for Browse functions).
        </Cautions>
      </InsertionPoint>
      <Decision id="D01" label="INVALID KEY?">
        <WhenTrue  target="N06A" label="INVALID KEY → blank screen path"/>
        <WhenFalse target="N06"  label="Valid key → read record"/>
      </Decision>
    </LogicBlock>

    <!-- NODE 6 — READ BY KEY -->
    <LogicBlock id="N06" sequence="6">
      <CobolParagraph
          name="AAM410-READ-BY-KEY"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-REDKY"/>
      <InsertionPoint
          name="%REDKY"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-REDKY"
          location="PROCEDURE DIVISION — AAM410-READ-BY-KEY"
          applicableFunctions="SEE CHG DEL NXT DUP"
          modes="NEW-TRANSACTION"
          hasDefaultCode="YES">
        <Description>
          Reads the primary Data Class record using NORMALIZED-KEY via the
          MAGEC I/O module (FSTAT, then REDKY command). After a successful
          read, PERFORMS JA100-LOGICAL-JOIN. Also saves the Audit-Stamp for
          later comparison in %RDUKY.
        </Description>
        <Cautions>
          Exit via GO TO AAM440-TEST-RETURN-CODE or fall through.
          If doing non-MAGEC I/O, set TWA-DB-RETURN-CODE appropriately
          so the REC-FOUND / NOT-FOUND conditions work correctly.
        </Cautions>
      </InsertionPoint>
      <Decision id="D02" label="RECORD FOUND?">
        <WhenTrue  target="N07"  label="REC FOUND → logical join"/>
        <WhenFalse target="N06A" label="NOT FOUND → blank screen path"/>
      </Decision>
    </LogicBlock>

    <!-- NODE 6A — BLANK SCREEN (right-side path: INVALID KEY or NOT FOUND) -->
    <LogicBlock id="N06A" sequence="6a" path="ERROR_PATH"
                triggeredBy="INVALID-KEY OR NOT-FOUND">
      <CobolParagraph
          name="BB100-BLANK-SCREEN"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-BLNKSCR"/>
      <InsertionPoint
          name="%BLNKSCR"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-BLNKSCR"
          location="PROCEDURE DIVISION — BB100-BLANK-SCREEN"
          applicableFunctions="SEE CHG DEL ADD (NEW-TRANS) DUP"
          modes="NEW-TRANSACTION"
          hasDefaultCode="NO">
        <Description>
          Inserted at the end of the blank-screen routine, after all screen
          variables are set to underscores. Executed on INVALID-KEY FORMAT
          and on NOT-FOUND. Developer can initialize selected screen fields
          to values other than underscores, or move values based on the key
          entry (e.g., reading a related file for context data).
        </Description>
        <Cautions>
          Only executed in NEW-TRANSACTION phase (and on INVALID KEY).
          Cannot reference Browse Mask (MSK652) fields.
          For logic needed in multiple contexts, place it in %SUBRTNM and
          PERFORM from %BLNKSCR and other insertion points.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 7 — LOGICAL JOIN (REC FOUND path) -->
    <LogicBlock id="N07" sequence="7" path="REC_FOUND_PATH">
      <CobolParagraph
          name="JA100-LOGICAL-JOIN"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-JOIN"/>
      <InsertionPoint
          name="%JOIN"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-JOIN"
          location="PROCEDURE DIVISION — JA100-LOGICAL-JOIN"
          applicableFunctions="ALL (MAINT and BROWSE)"
          modes="NEW-TRANSACTION, CONTINUATION"
          hasDefaultCode="CONDITIONALLY (auto-generated for Logical Join)">>
        <Description>
          Executed after each standard READ of the primary Data Class.
          Reads secondary files or computes derived fields to build the
          full Logical Record. Automatic Logical Join generates code here
          automatically. TWA-DB-REQUEST is saved/restored by the MMP
          before PERFORM-ing this routine.
        </Description>
        <Cautions>
          Executed for both MAINT and BROWSE functions; test IF
          (MAINT-FUNCTION) or IF (BROWS-FUNCTION) before referencing
          screen fields. Exit via GO TO JA900-RETURN (not JA999-EXIT).
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 8 — FILL SCREEN -->
    <LogicBlock id="N08" sequence="8" path="REC_FOUND_PATH">
      <CobolParagraph
          name="BB200-FILL-SCREEN"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-COMP"/>
      <InsertionPoint
          name="%COMP"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-COMP"
          location="PROCEDURE DIVISION — BB200-FILL-SCREEN"
          applicableFunctions="SEE CHG DEL NXT DUP"
          modes="NEW-TRANSACTION"
          hasDefaultCode="NO">
        <Description>
          Inserted at the end of BB200-FILL-SCREEN, after all generated
          MOVEs from database fields to screen fields, just before
          BB299-EXIT. Executed in NEW-TRANSACTION-MODE of Maint functions
          to move data to the screen. Developer can translate codes to
          readable descriptions, set 3270 color/highlight attributes, or
          move additional data to SERRMSG.
        </Description>
        <Cautions>
          Only executed for MAINT functions; cannot reference MSK652 fields.
          Data in SERRMSG is display-only and will be overlaid if MAGEC
          needs to place error messages there.
          For numeric screen fields, MOVE to both the -N (numeric) and -ED
          (edit pattern) sub-fields to stay consistent with MAGEC conventions.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 9 — SEND SCREEN (convergence of all paths) -->
    <LogicBlock id="N09" sequence="9">
      <CobolParagraph
          name="AA800-SEND-SCREEN"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-SNDSCRN"/>
      <InsertionPoint
          name="%SNDSCRN"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-SNDSCRN"
          location="PROCEDURE DIVISION — AA800-SEND-SCREEN"
          applicableFunctions="ALL"
          modes="NEW-TRANSACTION, CONTINUATION"
          hasDefaultCode="NO">
        <Description>
          Executed just before the MMP returns to MAGECCP, which will
          send the screen and terminate the task (or fetch another function).
          Last opportunity to put finishing touches on the screen before
          the operator sees it. Runs for both MAINT and BROWSE functions.
        </Description>
        <Cautions>
          Exit via GO TO AA900-GOBACK or fall through.
          Test TWA-MSK-ID before referencing non-standard screen fields;
          this point is reached for both Maint and Browse functions.
          If SKEY is altered, also update TWA-LAST-KEY.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

    <!-- NODE 10 — GOBACK -->
    <LogicBlock id="N10" sequence="10">
      <CobolParagraph
          name="AA900-GOBACK"
          docURL="https://www.magec.com/DOC/insert_main.htm"
          anchor="Online-Insertion-Point-GOBACK"/>
      <InsertionPoint
          name="%GOBACK"
          docURL="https://www.magec.com/DOC/insert_main.htm#Online-Insertion-Point-GOBACK"
          location="PROCEDURE DIVISION — AA900-GOBACK"
          applicableFunctions="ALL"
          modes="NEW-TRANSACTION, CONTINUATION"
          hasDefaultCode="NO">
        <Description>
          Absolutely the last point in the logical flow for all functions,
          both MAINT and BROWSE. Last opportunity to insert logic before
          the program issues its GOBACK. Can be used to TERMINATE a PCB
          (e.g., for IMS).
        </Description>
        <Cautions>
          This is the logical end of processing. If referencing screen data,
          first interrogate which Mask is initialized.
        </Cautions>
      </InsertionPoint>
    </LogicBlock>

  </Nodes>

  <!-- ============================================================
       FLOW — ordered sequence of node transitions
       ============================================================ -->
  <Flow>

    <FlowPath id="FP01" name="Main Path — Valid Key, Record Found">
      <Step from="START"  to="N01"  label="Entry"/>
      <Step from="N01"    to="N02"  label="%PREINIT complete"/>
      <Step from="N02"    to="N03"  label="%INIT complete"/>
      <Step from="N03"    to="N04"  label="%PFKEYM complete"/>
      <Step from="N04"    to="N05"  label="%INITATB complete"/>
      <Step from="N05"    to="N06"  label="Key valid (no INVALID KEY)"/>
      <Step from="N06"    to="N07"  label="REC FOUND"/>
      <Step from="N07"    to="N08"  label="%JOIN complete"/>
      <Step from="N08"    to="N09"  label="%COMP complete"/>
      <Step from="N09"    to="N10"  label="%SNDSCRN complete"/>
      <Step from="N10"    to="END"  label="GOBACK — task ends"/>
    </FlowPath>

    <FlowPath id="FP02" name="Error Path — Invalid Key">
      <Step from="N05"    to="N06A" label="INVALID KEY detected at %NORMKEY"/>
      <Step from="N06A"   to="N09"  label="%BLNKSCR complete"/>
      <Step from="N09"    to="N10"  label="%SNDSCRN complete"/>
      <Step from="N10"    to="END"  label="GOBACK — task ends"/>
    </FlowPath>

    <FlowPath id="FP03" name="Error Path — Record Not Found">
      <Step from="N06"    to="N06A" label="NOT FOUND after %REDKY"/>
      <Step from="N06A"   to="N09"  label="%BLNKSCR complete"/>
      <Step from="N09"    to="N10"  label="%SNDSCRN complete"/>
      <Step from="N10"    to="END"  label="GOBACK — task ends"/>
    </FlowPath>

  </Flow>

  <!-- ============================================================
       DIAGRAM LAYOUT HINTS
       For graphic regeneration tools.
       ============================================================ -->
  <DiagramLayout orientation="TOP_TO_BOTTOM" style="FLOWCHART">

    <LayoutNode ref="N01"  x="1" y="1"  shape="RECTANGLE" column="CENTER"
                label="AA100-CHECK-FUNCTION&#10;%PREINIT"/>
    <LayoutNode ref="N02"  x="1" y="2"  shape="RECTANGLE" column="CENTER"
                label="BA100-INIT-STORAGE&#10;%INIT"/>
    <LayoutNode ref="N03"  x="1" y="3"  shape="RECTANGLE" column="CENTER"
                label="AAM200-MAINTENANCE-MAINLINE&#10;%PFKEYM"/>
    <LayoutNode ref="N04"  x="1" y="4"  shape="RECTANGLE" column="CENTER"
                label="BA210-MAINT-SCREEN&#10;%INITATB"/>
    <LayoutNode ref="N05"  x="1" y="5"  shape="RECTANGLE" column="CENTER"
                label="BA400-NORMALIZE-MAINT-KEY&#10;%NORMKEY"/>
    <LayoutNode ref="D01"  x="1" y="5"  shape="DIAMOND"   column="CENTER"
                label="INVALID KEY?"/>
    <LayoutNode ref="N06"  x="1" y="6"  shape="RECTANGLE" column="CENTER"
                label="AA410-READ-BY-KEY&#10;%REDKY"/>
    <LayoutNode ref="D02"  x="1" y="6"  shape="DIAMOND"   column="CENTER"
                label="REC FOUND?"/>
    <LayoutNode ref="N07"  x="1" y="7"  shape="RECTANGLE" column="CENTER"
                label="JA100-LOGICAL-JOIN&#10;%JOIN"/>
    <LayoutNode ref="N08"  x="1" y="8"  shape="RECTANGLE" column="CENTER"
                label="BB200-FILL-SCREEN&#10;%COMP"/>

    <!-- Right column — error/not-found path -->
    <LayoutNode ref="N06A" x="2" y="6"  shape="RECTANGLE" column="RIGHT"
                label="BB100-BLANK-SCREEN&#10;%BLNKSCR"/>

    <!-- Convergence — bottom -->
    <LayoutNode ref="N09"  x="2" y="9"  shape="RECTANGLE" column="RIGHT"
                label="AA800-SEND-SCREEN&#10;%SNDSCRN"/>
    <LayoutNode ref="N10"  x="2" y="10" shape="RECTANGLE" column="RIGHT"
                label="AA900-GOBACK&#10;%GOBACK"/>

    <Arrow from="N01"  to="N02"  label=""             style="SOLID"/>
    <Arrow from="N02"  to="N03"  label=""             style="SOLID"/>
    <Arrow from="N03"  to="N04"  label=""             style="SOLID"/>
    <Arrow from="N04"  to="N05"  label=""             style="SOLID"/>
    <Arrow from="N05"  to="N06A" label="INVALID KEY"  style="SOLID" color="RED" direction="RIGHT"/>
    <Arrow from="N05"  to="N06"  label=""             style="SOLID"/>
    <Arrow from="N06"  to="N06A" label="NOT FOUND"    style="SOLID" color="RED" direction="RIGHT"/>
    <Arrow from="N06"  to="N07"  label="REC FOUND"    style="SOLID" color="GREEN"/>
    <Arrow from="N07"  to="N08"  label=""             style="SOLID"/>
    <Arrow from="N08"  to="N09"  label=""             style="SOLID" direction="RIGHT"/>
    <Arrow from="N06A" to="N09"  label=""             style="SOLID"/>
    <Arrow from="N09"  to="N10"  label=""             style="SOLID"/>
  </DiagramLayout>

  <!-- ============================================================
       DOCUMENTATION REFERENCES
       ============================================================ -->
  <References>
    <Reference id="R01" title="Chapter 05 — Logic Diagrams"
               url="https://www.magec.com/DOC/diags_main.htm"
               note="Contains the original ch05fig01.gif and all other MMP/MBP diagrams."/>
    <Reference id="R02" title="Chapter 04 — Insertion Points"
               url="https://www.magec.com/DOC/insert_main.htm"
               note="Authoritative reference for all insertion point descriptions, suggested uses, and cautions."/>
    <Reference id="R03" title="Insertion Point Cross-Reference Table (Figure 1)"
               url="https://www.magec.com/DOC/insert_main.htm#figure1"
               note="Shows which insertion points are active for each of the nine standard function codes."/>
    <Reference id="R04" title="Chapter 03 — Analysis of the Generated MMP"
               url="https://www.magec.com/DOC/genmmp_main.htm"
               note="Detailed analysis of the physical Cobol paragraph structure of generated MMPs."/>
    <Reference id="R05" title="Quick Reference — Insertion Points"
               url="https://www.magec.com/DOC/magref_main.htm#MAGREF009001"
               note="Compact list of all insertion points from the MAGEC Quick Reference booklet."/>
    <Reference id="R06" title="AI Insertion Points (machine-readable)"
               url="https://magec.com/DOC/ai-InsertionPoints.xml"
               note="XML file for AI consumption covering all MAGEC insertion points."/>
  </References>

</MagecDiagram>