Omnis Classic — AI Safety Guide

This page exists to prevent AI (and humans…) from introducing non-Classic syntax or incorrect assumptions into Omnis Classic code.


⚠️ Do Not Invent Commands

If a command is not explicitly known from Omnis Classic, do not guess.

❌ Incorrect (not Classic)

✅ Correct approach


💾 File Updates (Classic)

In Omnis Classic:

Update files

Canceling an update cycle:

Cancel prepare for update

🔄 Prepare for Update Cycle

Typical pattern:

Prepare for update
... make changes ...
Update files

To cancel:

Cancel prepare for update

Notes:


📂 Single File Find Behaviour

Omnis Classic works on the current file and current record buffer.

Common pattern:

Find on FAC_Seq
Prepare for update
...
Update files

AI must not rewrite this as:


🖱️ UI Event Handling (Classic)

Omnis Classic uses hash events:

Do not introduce:

If unsure, refer to the event name only.


Debug Pattern: Safe Default with Conditional Breakpoint

In JACSoft Omnis Classic code, unexpected conditions may be handled by:

Example:

Default
  If kb_JAC_Logged_in
    Breakpoint
  End If
  ... safe fallback ...

This allows production systems to continue running while still exposing issues during development.


🛡️ Business Logic Safety

Not all defensive checks in Omnis Classic are purely technical.

Examples include:

These often enforce business rules, not just runtime safety.

Important:

Example pattern:

If LN_Factor=0
  ;; may preserve user-entered values or signal failure via #F
  ;; do not assume this should be replaced with recalculation
  

In many cases:

Rule of thumb

If a condition prevents a calculation, it is likely protecting a business decision, not just avoiding an error.

When in doubt:


🧠 General Rules


🧓 Final Rule

If it looks modern, it probably isn’t Classic.

When in doubt: