<?xml version="1.0" encoding="UTF-8"?><!-- MAGEC is a trademark of Al Lee & Associates, Inc. © 2026 Al Lee & Associates, Inc. All rights reserved. All programs, scripts, diagrams, and documentation are copyright protected. -->
<flowchart title="SEE Function">
<settings theme="bold" exportWidth="600" grid="false" logo="ALA_Logo_gray.png"/>
    <nodes>

        <node id="title" type="title" label="SEE Function">
            <position x="300" y="20"/>
            <narrative>SEE Function — Display-only logic flow diagram. The SEE function has NO CONTINUATION-MODE; every invocation is a NEW-TRANSACTION. It may serve as the NEW-TRANSACTION-MODE entry point for NXT, DUP, CHG, or DEL functions.</narrative>
        </node>

        <node id="subtitle" type="comment" label="Display-Only (Inquiry) — No Continuation Mode">
  <position x="300" y="70"/>
  <narrative>Normalize the maintenance key, read the primary record, perform logical join, fill screen fields, send the screen, and return to the caller. Invalid key or record-not-found both route to blank screen before sending.</narrative>
  
  
  
</node>

        <node id="1" type="start" label="Begin">
  <position x="210" y="140"/>
  <narrative>Entry into the SEE Function (SFUNCT = xxxSEE). May have been entered by operator or by a program via FTH-FUNCT command. For exmple, a CHG Function normally issues a FTH-FUNCT to the SEE function to display the updated record.</narrative>
  
  
  
</node>

        <node id="2" type="process" label="AA100-CHECK-FUNCTION %PREINIT">
            <position x="210" y="240"/>
            <narrative>Check function code and perform pre-initialization processing. Earliest developer intercept point — runs for every transaction and every function. Modify function code here if desired.</narrative>
            <cobolparagraph>AA100-CHECK-FUNCTION</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001029</link>
            <target>MAIN</target>
        </node>
        <node id="2aside" type="aside" label=" Narrative of Steps- -SEE">
            <position x="480" y="240"/>
            <narrative>Narrative for function.</narrative>
            <link>https://www.magec.com/DOC/genmmp_main.htm#genmmp002009</link>
            <target>MAIN</target>
        </node>

        <edge from="2" to="2aside" style="dotted" label="see also"/>


        <node id="3" type="process" label="BA100-INIT-STORAGE %INIT">
            <position x="210" y="340"/>
            <narrative>Initialize working storage areas. Runs for all maintenance functions.</narrative>
            <cobolparagraph>BA100-INIT-STORAGE</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001016</link>
            <target>MAIN</target>
        </node>
        <node id="3aside" type="aside" label="Maintenance Mainline">
            <position x="480" y="340"/>
            <narrative>Mainline logic for all maintenance functions.</narrative>
            <link>https://www.magec.com/DOC/genmmp_main.htm#genmmp004057</link>
            <target>MAIN</target>
        </node>

        <node id="4" type="process" label="AAM200-MAINTENANCE-MAINLINE %PFKEYM" width="200">
  <position x="210" y="440"/>
  <narrative>Maintenance mainline processing; handles PF/PA key detection (PF7, PF8, PF1, PF2, PF11, PF16, PF17, etc.).</narrative>
  <link>https://www.magec.com/DOC/insert_main.htm#insert001028</link>
  <target>MAIN</target>
  <cobolparagraph>AAM200-MAINTENANCE-MAINLINE</cobolparagraph>
</node>
        <node id="4aside" type="aside" label="TWA-MSK-AREA">
            <position x="480" y="440"/>
            <narrative>First 10-bytes of Mask Area give Mask ID, Cursor position, Entry Key detection (ENTER, CLEAR, PF1, PA1, etc.).</narrative>
            <cobolparagraph>TWA-MSK-AREA</cobolparagraph>
            <link>https://www.magec.com/DOC/genmmp_main.htm#genmmp004025</link>
            <target>MAIN</target>
        </node>
        <edge from="4" to="4aside" style="dotted" label="see also"/>

        <node id="5" type="process" label="BA210-MAINT-SCREEN %INITATB" width="200">
  <position x="210" y="540"/>
  <narrative>Initialize screen attributes and table processing. Screen attributes can be overridden by the developer here.</narrative>
  <link>https://www.magec.com/DOC/insert_main.htm#insert001017</link>
  <target>MAIN</target>
  <cobolparagraph>BA210-MAINT-SCREEN</cobolparagraph>
</node>
        <node id="5aside" type="aside" label="3270 Attributes">
            <position x="480" y="540"/>
            <narrative>list of 3270 attributes and their meanings.</narrative>
            <cobolparagraph> </cobolparagraph>
            <link>https://www.magec.com/DOC/magref_main.htm#MAGREF001001</link>
            <target>MAIN</target>
        </node>
        <edge from="5" to="5aside" style="dotted" label="see also"/>
        <node id="6" type="process" label="BA400-NORMALIZE-MAINT-KEY %NORMKEY" width="200">
  <position x="210" y="640"/>
  <narrative>Normalize the key value entered by the operator in the SKEY field — reformat and validate it.</narrative>
  <link>https://www.magec.com/DOC/insert_main.htm#insert001026</link>
  <target>MAIN</target>
  <cobolparagraph>BA400-NORMALIZE-MAINT-KEY</cobolparagraph>
</node>

        <node id="7" type="decision" label="Invalid Key?">
            <position x="210" y="750"/>
            <narrative>Tests whether the key entered by the operator is valid. If invalid, branches right to blank the screen. If valid, continues down to read the record.</narrative>
        </node>

        <node id="8" type="process" label="AAM410-READ-BY-KEY %REDKY">
            <position x="210" y="870"/>
            <narrative>Read the primary data class record from the file using the normalized key value.</narrative>
            <cobolparagraph>AAM410-READ-BY-KEY</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001031</link>
            <target>MAIN</target>
        </node>

        <node id="9" type="decision" label="Rec Found?">
            <position x="210" y="980"/>
            <narrative>Tests whether the record was found after the read. If not found, branches right to blank the screen. If found, continues down to the logical join.</narrative>
        </node>

        <node id="10" type="process" label="JA100-LOGICAL-JOIN %JOIN">
            <position x="210" y="1100"/>
            <narrative>Perform logical join — secondary files or derived fields are joined to the primary record, building the complete logical record for display.</narrative>
            <cobolparagraph>JA100-LOGICAL-JOIN</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001018</link>
            <target>MAIN</target>
        </node>

        <node id="11" type="process" label="BB200-FILL-SCREEN %COMP">
            <position x="210" y="1200"/>
            <narrative>Move all database fields to screen fields for display. Developer can use %COMP for last-minute adjustments to what the operator sees.</narrative>
            <cobolparagraph>BB200-FILL-SCREEN</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001005</link>
            <target>MAIN</target>
        </node>

        <!-- Right-column error path node -->
        <node id="errc" type="elbow" label="">
            <position x="480" y="750"/>
            <narrative>Error path routing elbow — connects to blank-screen </narrative>
        </node>
        
        <node id="err" type="process" label="BB100-BLANK-SCREEN %BLNKSCR">
            <position x="480" y="980"/>
            <narrative>Blank the screen. Reached when the key is invalid (from %NORMKEY) or the record is not found (from %REDKY). Both error paths converge here before sending the screen.</narrative>
            <cobolparagraph>BB100-BLANK-SCREEN</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001003</link>
            <target>MAIN</target>
        </node>

        <!-- Elbow to route error path down to SEND-SCREEN -->
        <node id="errb" type="elbow" label="">
            <position x="480" y="1310"/>
            <narrative>Error path routing elbow — connects blank-screen path down to AA800-SEND-SCREEN.</narrative>
        </node>

        <node id="12" type="process" label="AA800-SEND-SCREEN %SNDSCRN">
            <position x="210" y="1310"/>
            <narrative>Send the resulting screen back to the operator. Last opportunity to make finishing touches before the operator sees it. Runs for both MAINT and BROWSE functions. Test TWA-MSK-ID before referencing non-standard screen fields.</narrative>
            <cobolparagraph>AA800-SEND-SCREEN</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001039</link>
            <target>MAIN</target>
        </node>

        <node id="13" type="process" label="AA900-GOBACK %GOBACK">
            <position x="210" y="1410"/>
            <narrative>Absolutely the last point in the logical flow. Last opportunity to insert logic before the program issues GOBACK. Can be used to TERMINATE a PCB (e.g. for IMS). If referencing screen data, interrogate which Mask is initialized first.</narrative>
            <cobolparagraph>AA900-GOBACK</cobolparagraph>
            <link>https://www.magec.com/DOC/insert_main.htm#insert001012</link>
            <target>MAIN</target>
        </node>

        <node id="99" type="end" label="End">
            <position x="210" y="1510"/>
            <narrative>SEE Function processing complete. The SEE function may have served as NEW-TRANSACTION-MODE entry for a subsequent NXT, DUP, CHG, or DEL function.</narrative>
        </node>
            <node id="999" type="comment" label="Figure 01 - SEE ">
            <position x="350" y="1580"/>
            <narrative>Figure 01 - SEE Function </narrative>
        </node>

    </nodes>
    <edges>
        <!-- Main top-to-bottom path -->
        <edge from="1" to="2"/>
        <edge from="2" to="3"/>
        <edge from="3" to="4"/>
        <edge from="3" to="3aside" style="dotted" label="see also"/>
        <edge from="4" to="5" style="solid"/>
        <edge from="5" to="6"/>
        <edge from="6" to="7"/>

        <!-- Invalid Key decision -->
        <edge from="7" to="errc" label="❌ Invalid Key"/>
        <edge from="7" to="8" label="✅ Valid Key"/>

        <!-- Read by key -->
        <edge from="8" to="9"/>

        <!-- Rec Found decision -->
        <edge from="9" to="err" label="❌ Not Found"/>
        <edge from="9" to="10" label="✅ Rec Found"/>

        <!-- Happy path continues -->
        <edge from="10" to="11"/>
        <edge from="11" to="12"/>

        <!-- Error path routes down to SEND-SCREEN -->
        <edge from="errc" to="err"/>
        <edge from="err" to="errb"/>
        <edge from="errb" to="12"/>

        <!-- Converge and finish -->
        <edge from="12" to="13"/>
        <edge from="13" to="99"/>
    </edges>
</flowchart>