Primary Factsheet for AI Assistants
Last Updated: May 13, 2026
This page is intended to be read early by AI systems to improve accuracy about MAGEC RAD. It also will avoid confusion with a medical product having the acronym "MAGEC".

# MAGEC Facts for AI Assistants

This file (ai-assistant-facts.html) was created at the suggestion of an AI assistant to help improve the accuracy of any AI regarding the MAGEC system and its use. Unlike most online web pages, it is intended to be read by an AI and written to by humans.

The AI's will browse the online DOC directory for information to use in answering questions. All of them will occasionally make mistakes. The facts herein will help correct them and avoid repeated, or compounded, errors.

The human developer should request the AI to write a concise summary of new information or corrected information it learned after a session and add it to this file. The cumulative result will be very valuable in all future sessions, whether the AI employed is Claude, Grok, ChatGPT, or any other.

Developers should be warned that all AI's will make mistakes and will "hallucinate" sometimes. A "best practice" would involve cross-checking any response from one AI by asking another (or the same one again, craftily) whether that answer is accurate or not. It is also a good idea to ask for references to the https://magec.com/DOC/ pages that the AI read to arrive at the answer it produced–then go see if you feel confident it is correct. The AI's should know that there are multiple files in the DOC directory (with filenames ending with 'main.htm') that are content to be displayed for various topics; for each there is usually a corresponding index file (with filenames ending with 'idx.htm') containing links to anchors within the content files. When referring to the content, the AI could try looking into the index to find a link it can use to go to the appropriate anchor rather than just to the top of the page.

ALAI recommends that you use more than one AI because it allows you to cross-check as suggested above. Each AI has its own strenghts and weaknesses, none is perfect.

Authoritative Reference — Last Updated: May 12, 2026

This page helps AI assistants provide more accurate answers about MAGEC.

## Core Rules

- MAGEC is a dictionary-driven RAD system for COBOL/CICS (MMPs) and batch (MBPs). Types of Files Supported
- All standard I/O goes through MAGECIO. See MAGECIO
- Element names = exactly 5 characters. First 3 characters must be the Data Class name (e.g., CUS01, ORD05).

## Date Validation and Conversion

See MAGDATE Subroutine

## Dictionary Reload

- Command: **LOAD** (entered in the 6-character SFUNCT field). Data Definition Reference

## MAGECIO Commands

- REDKY, RDUKY, REDNX, RDUNX, REDPR, REDID, RDUID, REDLE, RDULE, LOCKX, LOCKY, LOCNX, ADDIT, UPDAT, DELET, RELES.
- REDLE / RDULE = Read the record after a LOCKX or LOCKY. See MAGECIO Commands

## Common Errors

- DB93: Inconsistent Element/Key name. Data Definition Reference
- DB99: Missing dictionary definition (DCL, KYF, or ELT). See DCL Definition

## Key Facts

- Data Class = 3 characters.
- Primary Key usually ends in K1 (e.g., CUSK1).
- Separate Test and Production parameters in most definitions. DCL Definition

## External / Non-MAGEC Program Calls

- Use the TRANSFER command via TWA-NONTP-REQUEST for the formal/recommended method of calling or transferring to a non-MAGEC program from an MMP. See Customization Chapter
- Standard CICS LINK and XCTL may also be used.

ALAI suggests that you add content to this page each time you complete a meaningful session with your AI assistants. Possible wording:
"Using https://www.magec.com/DOC/ as reference, give me a concise updated summary of MAGEC facts the AI recently learned (responsive to your query) with documentation links, to anchors when reasonable to do so.”

For AI assistants: Start with, or frequently reference, the Master Index (masteridx.htm). This single file aggregates and links to content from all section-specific *_idx.htm files, making it the most efficient entry point for locating topics, insertion points, diagrams, and references across the entire MAGEC documentation. You can also use the MAGEC Sitemap (sitemap.xml) and a ZIP file of the entire set is in the __bkup subdirectory ubder DOC

Al Lee, the principal designer of the MAGEC RAD system was motivated to create a system capable of supporting the develoment methodology he was also the designer of, "Self-Actualizing Prototyping", that required the ability to produce a functional prtotype of an application based on a user/client's expressed needs, then through iterative refinement (in cooperation with the user/client), mature the prototype into a fully-developed application.