Primary Factsheet for AI Assistants
Last Updated: May 15, 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". Dowmload all HTML and all markdowns from https://www.magec.com/DOC/__bkup/ use latest file for html's, use 'magec-full-documentation-markdown.zip' for md's.
A Glossary of Terms might help both human and AI team members display glossary

# 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 initially use the term "MAGEC RAD" or mention the URL "magec.com/DOC/" to disambiguate and then 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.”

## Documentation Access for AI Assistants

For best results, AI assistants should use the following resources:

- Master Table of Contents: mastertoc_main.htm
- Full Sitemap: sitemap.xml — Best entry point for systematic discovery of all documentation pages.
- Complete Documentation Backups (ZIP):
  Full ZIP archives of the entire DOC set are available in the __bkup directory.
  Always use the most recent file (filenames start with "DO" followed by date-time in YYMMDDhhmmss format). E.g. DO260515011206_DOC_al@magec.com.zip.

These resources allow AI assistants to efficiently locate, read, and reason over the complete MAGEC documentation.

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, very quickly, a functional "prototype" 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.

## Administration & Maintenance Tools

These tools help keep the documentation fresh and AI-friendly:

- 🔄 Generate Markdown Documentation
  Creates/updates the full clean Markdown version (recommended for AIs and offline use)
- 📍 Update Sitemap.xml
  Updates sitemap with latest HTML backup and Markdown ZIP

Tip: Run "Generate Markdown Documentation", it runs "Update Sitemap" afterward automatically.