sage-x3-l4g — reference index
Claude skill for writing, reviewing, and debugging Sage X3 V12 L4G (4GL / X3 script / Adonix) code. Every reference ends with the Sage online-help pages it is based on.
This site renders the same Markdown that ships in the skill. For installation, see the README (or README en français). For contribution guidelines, see CONTRIBUTING.
Skill entry point —
SKILL.md: when to use, verification discipline, mental model, V12 vs Classic idioms, canonical transactional Funprog.
Core language
language-basics.md— types, declarations, arrays andSorta, parameter modes, control flow,Break, subprograms,Gosub,Onerrgo/Resumedatabase.md—Read/For/Filter/Link,Update … With,Readlock,Rewritebykeyand UPDTICK,Execsql, fstat / adxuprec, the transaction idiombuiltin-functions.md— string, date, number and system functions (format$,gdat$,instr,vireblc,ctrans,pat,filinfo,System)sequential-files.md—Openi/Openo/Openio,Rdseq/Wrseq/Getseq/Putseq,Iomode, encodings,filpathdata-dictionary.md— tables (GESATB), a field on a standard table, indexes, validation, data types (GESATY), local menus (TXT), miscellaneous tables, SQL views (GESAVW), general parameters and reading them in L4Gconventions-and-naming.md— X / Y / Z prefixes, activity codes, message chapters, script and table naming, standard table abbreviations and primary indexesfunction-codes.md— verified list of GESxxx functions, and codes that do not exist
Object models and UI
v12-classes-representations.md— router: classes vs representations vs Classic objects, Classic → V12 migrationv12-classes.md— class dictionary, class scripts ($PROPERTIES/$EVENTS/$METHODS/$OPERATIONS), rules, events, instances,fmet,ASETERRORv12-representations.md— representations, facets, representation scripts and eventsclassic-objects.md— Classic objects: specific$ACTIONscripts, creation / modification actions,OK/GOKentry-points.md— entry points (GESAPE,GPOINT,GPE) to customise standard processes without modifying themscreens-and-masks.md— Classic masks,[M:...], field actions,mkstat, deprecated screen instructions
Integration
web-services-integration.md— router: REST vs SOAP vs outgoing HTTP vs files vs the X3 Services GraphQL API, integration log, publishing checklistweb-services-rest.md— exposing X3 through Syracuse REST (/api1/..., representations, facets, paging, authentication)web-services-rest-client.md— calling external HTTP / REST APIs (ASYRRESTCLI.EXEC_REST_WS), JSON withParseInstanceweb-services-soap.md— publishing Classic SOAP web services (GESASU, GESAWE, Syracuse pools, callContext)web-services-soap-client.md— calling an external SOAP service from X3: envelope, escaping, parsing, faultsimports-exports.md— import / export templates (GESAOE), running them from code, file exchange patternsreports-printing.md— reports dictionary, destinations, printing from codeworkflow-email.md— workflow rules (GESAWA), allocation rules, data models, sending e-mail (ASEND_MAIL)accounting-automatic-journals.md— automatic journals (GESGAU), formulas, link / journal subprograms, CPTAUTO entry points, accounting entry tables
Operations
development-workflow.md— where scripts live, script dictionary (GESADC), Safe X3 Studio (Eclipse), compiling, the write → compile → fix → test → patch loopbatch-scheduling.md— batch tasks (GESABT), recurring tasks (GESABA), calendars, request monitoring, restart safety, single-instance guard withLockpersonalisation-activity.md— activity codes (GESACV), folder hierarchy, patches (APATCH / PATCH), personalisationlocalization.md— messages andmess(), connection language, date and number formattinglocalization-formats.md— currencies, countries and address formats, character setsdata-migration.md— staging tables, idempotent loaders, reconciliation, cutoverdebugging-traces.md— log files (ALOGclass in V7+ code,OUVRE_TRACE/ECR_TRACEin Classic code), engine log, error variables, debuggerdiagnostics-postmortem.md— production incidents: locks, failed batches, logs, incident report template
Quality
performance.md— profiler (ASYRTIMING), index-driven access,Linkvs N+1 reads,Columns, transaction size, set-based SQLsecurity-permissions.md— function profiles, access control, web-service authentication, secrets, injectionaudit-compliance.md— audit table pattern, sequence numbers, GDPR access / erasure / portability, retentionunit-testing-axunit.md— AXUNIT test suites (QLF*scripts), assertions, running testscode-review-checklist.md— structured review pass, red flags ranked by blast radiuscommon-patterns.md— Classic / core recipes and an index of where each recipe livescommon-patterns-v12.md— V12 recipesversion-caveats.md— version-dependent behaviour and what to verify on your folder
Examples
Shipped with the skill — see the examples index.
| File | Topic |
|---|---|
YACCLIB.src |
Transactional YTRANSFER Funprog and ALOG negative-balance check |
QLFYAC_TRANSFER.src |
AXUNIT test suite for YTRANSFER |
YTRFPOST.src |
Batch posting of staging rows, per-row transactions, ALOG log |
SPEYCU.src |
Classic object actions refusing creation or modification with OK = 0 |
YSUBITM.src |
SUBITM entry point BEFWRIITF writing an audit row, GOK = 0 |
YCONTRACT_CSPE.src |
V12 class script: CONTROL rule, control events, ARET_VALUE method |
YRESTRATE.src |
Outgoing REST call with EXEC_REST_WS, JSON parsing, integration log |
YIMPLAUNCH.src |
Silent import with IMPORTSIL and archiving of the imported file |
Other resources
- GitHub repository — actouf/sage-x3-l4g
- Releases — GitHub releases
- Changelog —
CHANGELOG.md - Issues — GitHub issues
- License — MIT