As I said earlier you already have the information you want in the file
# Function Name: <-PROMPT~FuncName Enter Function Name>
it is found after the string “# Function Name:”
# Function Prefix: <-PROMPT~FuncPrefix Enter function prefix>
it is found after the string “# Function Prefix:”
When you create a file you use your template so the data is in the file. When you add a function some of the data is already in the file, some new data may be added. If the file has multiple functions then multiple globals can be used filename-functionName. I assumed the other templates that need to reproduce information are used within the function. Thus the macro used in the smaller templates searches backwards for the correct existing comment, adds that to the filename and extracts the value (from the global var) needed to expand that template, and places it where needed. If that macro stores the value in a global variable named the same as the globals used in LastPrompt then you can just run the macro at the beginning of the template and then add lastprompts were ever the value is needed, no more macro’s needed for that.
Since the prolog (comment block with all the info in it) is no doubt required for your work, you add nothing to the code that is not approved. All the extra stuff is in your templates and macros in your editor, not the source code. If you are hit by a bus, your replacement can return to whatever manual method used now, unless he inherits your copy of ME and your machine.
Since the data needed for these templates has to be entered at least once, why not take advantage of what is in the file for later entries. Since the data is read from the file, or must be added by the programmer, it does not matter if you do not return to the file for a year. It is there already or does not exist. Seems that you want to avoid entering the data over and over when it is in the file, so get it when the file is opened, or when you enter the data for the first time using your big template with the prompts (ala running the post open macro at the end of the template that initially gets the info from you, so that it is the same as if the file was re-opened).
KISS says parse the text, ME’s CMAC makes that easy. Store while working, globals make that easy. Take advantage of a known naming convention within ME, makes reusing the value mutiple times within a template easy.