sage-x3-l4g — reference index
Claude skill for writing, reviewing, and debugging Sage X3 V12 L4G (4GL / X3 script / Adonix) code — classes, representations, REST, workflows, reports, batch, security, audit, and more.
This site renders the same Markdown that ships in the skill. Use it to browse the references without cloning. For installation and overview, see the README (or README en français). For contribution guidelines and style, see CONTRIBUTING.
Skill entry point —
SKILL.md: mental model, V12 vs Classic idioms, canonical transactional subprogram, when to use the skill, how to respond to L4G requests.
Core language and conventions
language-basics.md— variables, scopes ([L]/[V]/[S]), types, control flow, subprograms,Onerrgodatabase.md—Read/Readlock/Write/For, theIf adxlognested-transaction pattern,UPDTICK,Link, embedded SQLbuiltin-functions.md— strings, dates,pat,System, sequential files,filpath/filinfoconventions-and-naming.md— Y / Z rule, three-letter aliases, message chapters, folder layoutcommon-patterns.md— core / Classic recipes (transactions, grids, error handling, action-on-field, sub-prog params, batch)common-patterns-v12.md— V12 recipes (class CRUD withUPDTICK, REST service, external REST consumption, import hook, scheduled batch + email)
UI — Classic and V12
screens-and-masks.md— legacy V6 / Classic masks ([M:...],Inpbox, standard actions, grids)v12-classes-representations.md— V12-native:Class/Method/this, representations, pages, business objects, REST surface
Integration and operations
web-services-integration.md— overview / router: protocol comparison, file exchange, integration logs, cross-cutting gotchasweb-services-soap.md— publishing classic SOAP from X3 (GESAWE/GESAPO, parameter grid, AWS pool)web-services-soap-client.md— calling external SOAP services: envelope, WS-Security, parsing, fault detectionweb-services-rest.md— publishing REST (Syracuse), consuming external REST APIs, JSON, OAuth, SDataimports-exports.md— IMP / EXP templates (LECFIC/EXPFIC), custom import hooks, delta syncreports-printing.md— launching reports viaIMPRIM, destinations (GESADI), Crystal / native states, Excel exportsworkflow-email.md— workflow rules (GESAWR), templates, recipients, sending emails (ENVMAIL), HTML bodiesdebugging-traces.md—ECRAN_TRACE,stat1/funfat, supervisor tracing, integration loggingperformance.md— indexes,Order By Key,Linkjoins, transaction granularity, profiling, anti-patternssecurity-permissions.md—GESAUT/GACTION/GESAFP, ACL on services, credential storage, audit logging, injection preventionbatch-scheduling.md—GESABA/GESAPL, recurrent vs one-shot, calendars, dependencies, monitoring, restart safetypersonalisation-activity.md— activity codes (GESACV,#Active), personalisation (GESAPE), folder hierarchy, patch generation / importlocalization.md— messages (mess,GESAML),[V]GLANGUE, date / time formats, decimal separators, multi-language templateslocalization-formats.md— currencies (GESCUR,GDEV.DEVISE), country addresses (GESACO/FORMAT_ADDR), RTL / CJK / UTF-8data-migration.md— staging tables, validation / load / reconcile / cutover, dual-write, schema migration, folder consolidationdiagnostics-postmortem.md— readingadxlog.log, stuck locks, hung AWS pool, batch failures, engine crashes, incident report templateaudit-compliance.md— audit log pattern, GDPR access / erasure / portability, financial audit trail, retention, consent
Meta
code-review-checklist.md— structured review pass with red flags ranked by blast radiusversion-caveats.md— primitives / helpers / URL shapes that drift across V12 patch levels
Examples
Compilable L4G fixtures — see the examples index.
| File | Topic |
|---|---|
YCUSTLOG.src |
V12 class wrapping a custom table with UPDTICK |
YSRV_RESERVE.src |
REST service class: stock reservation, transactional |
YCTRL_FIELD.trt |
Field-control actions: format checks, Luhn SIREN |
YIMP_HOOK.src |
Import template hooks: per-line validation + end-of-run logging |
YBATCH_ORPHANS.trt |
Scheduled batch: email report of orphan orders |
YBATCH_DAILY.trt |
Recurrent batch: drains an inbox, per-row tx, dry-run, pacing |
YPERSO_GESBPC.src |
Personalisation hook gated by activity code, with audit trail |
YMSG_MULTILANG.src |
Multi-language email helper, currency-aware amount, locale-aware date |
Tests
tests/triggers.md— 62 prompts the skill should trigger on, plus quality-check criteria.
Other resources
- GitHub repository — actouf/sage-x3-l4g
- Changelog —
CHANGELOG.md - Issues / feature requests — GitHub issues
- License — MIT