Omnis Classic β€” JACSoft Patterns

This page documents common patterns used in JACSoft Omnis Classic code.


🧠 General Style


πŸ’Ύ File Update Pattern

Centralised update procedure:

Call procedure MAg_Files/1 {Do update}

Underlying behaviour:

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

Cancel:

Cancel prepare for update

πŸ”‘ Primary Key Pattern

Typical pattern for new records:

Repeat
   Call procedure $createPrimaryKey
   Calculate [PK_Field] as LN_PKey
   Test for a unique index value on [PK_Field]
   Update files
Until LB_Test

πŸ“‚ File Context


πŸ” Find Pattern

Single record:

Find on FAC_Seq

Used before:


πŸ“‹ List Handling

<!-- -->
FL_List.FieldName
nam(FieldName)

πŸ”„ pick() Usage

Example:

Calculate PN_Value as pick(LB_Ok,ValueIfFalse,ValueIfTrue)

🧱 Reversible Blocks

Used for controlled updates:

Begin reversible block
...
End reversible block

πŸ§“ Final Rule

Follow existing JACSoft code patterns.

Do not modernise, refactor, or β€œimprove” syntax unless explicitly required.