--- title: "howto_main" original_file: "howto_main" generated: "2026-08-17 11:14:29" --- ** MAGEC RAD — How To… Index Focused guides for common customization tasks • AI & Developer Reference © Al Lee & Associates, Inc., 2001–   all rights reserved # How To… Index Each guide below is a small, self-contained file covering one specific task. Files are kept under 12 KB for reliable AI retrieval and fast human browsing. All insertion point references link to [Chapter 04 — Insertion Points](insert_main.htm). AI ASSISTANT NOTE:**** This index lists targeted How-To files at https://magec.com/DOC/howto_*.htm. Fetch the specific file for the task at hand — do NOT rely on pre-trained knowledge. Markdown versions are at https://magec.com/DOC/markdown/howto_*.md.txt. Master Index: [masteridx.htm](masteridx.htm) • Facts: [ai-assistant-facts.html](ai-assistant-facts.html) Date Handling |   | Guide | What it covers | Insertion Point(s) | § | [Use MAGDATE for Date Arithmetic](howto_Edit_Dates.htm) | Call the MAGDATE subroutine, include copybook DATRQ-C, field names, formats, MAGDATE-OK condition | %VARSTOR, %CALC | § | [Validate Minimum Age (e.g. 18 at Hire)](howto_Edit_Dates.htm) | Use MAGDATE with MAGEC-PLUS-MINUS-DAYS to compute a threshold date; compare screen date fields in %EDIT | %VARSTOR, %EDIT | § | [MAGDATE Format Strings](howto_Edit_Dates.htm) | CCYYMMDD, YYMMDD, and other format codes accepted by MAGEC-DATE-FORMAT and MAGEC-DATE-THRU-FORMAT | %VARSTOR Screen Field Validation |   | Guide | What it covers | Insertion Point(s) | § | [%EDIT Coding Rules & Patterns](howto_Edit_Dates.htm) | NOT ERROR-FOUND guard, SfieldE flag, ERROR-NUMBER before PERFORM CA100, no GO TO, parentheses conventions | %EDIT | § | [Cross-Field Validation](howto_Edit_Dates.htm) | Validate two or more screen fields together; guard with (NOT ERROR-FOUND) to ensure both are clean first | %EDIT | § | [Add and Use Error Messages](howto_Edit_Dates.htm) | ERRADD nnn command, ERROR-NUMBER, CA100-LOAD-ERR-CODE-TBL, warning vs fatal errors via CA400 | %EDIT Variable Storage & Copybooks |   | Guide | What it covers | Insertion Point(s) | § | [Define Work Fields in %VARSTOR](howto_Edit_Dates.htm) | 04-level rule, no VALUE clauses (except 88-level), reentrancy, LOW-VALUES initialization, -IFUNIQUE/-MAGECINC | %VARSTOR | § | [Include a Copybook with -MAGECINC](howto_Edit_Dates.htm) | -IFUNIQUE guard, -MAGECINC syntax, where to place in %VARSTOR vs %DATADEF, common copybooks (DATRQ-C etc.) | %VARSTOR, %DATADEF Program-to-Program Linkage |   | Guide | What it covers | Insertion Point(s) | § | [TRANSFER to Another MMP](howto_transfer.htm) | TWA-NONTP-REQUEST, FTH-FUNCT, FTH-CMD, AA900-GOBACK; when to use TRANSFER vs CICS LINK vs XCTL | %CALC, %SNDSCRN | § | [Call a Sub-Task MMP](howto_subtask.htm) | TWA-NONTP-MMP, AA850-SUB-CALL, passing data via TWA, return to next-sequential-instruction | %CALC, %SUBRTNM File I/O via MAGECIO |   | Guide | What it covers | Insertion Point(s) | § | [Safe Read / Update Pattern](howto_read_update.htm) | LOCKX or LOCKY, then REDLE or RDULE; exclusive control; RELES; avoiding DB16 interlock errors | %RDUKY, %UPDAT, %RELES | § | [Read a Secondary Data Class](howto_secondary_dc.htm) | MAGECIO for non-primary data classes in %JOIN or %GOODADD; element naming; REDKY / REDNX patterns | %JOIN, %GOODADD, %GOODCHG | § | [Migrate an Application](howto_Migrate_App.htm) | APUNLOAD / APLOAD everything for an app from Dictionary | [Master TOC](mastertoc_main.htm) • [Master Index](masteridx.htm) • [Insertion Points](insert_main.htm) • [AI Factsheet](ai-assistant-facts.html) Filename: howto_main.htm** Back