Infor LN & BaanGlossary

What Is Baan 3GL and 4GL?

Also known as: Baan 4GL, Baan 3GL, LN 3GL/4GL

Definition

Baan 3GL and 4GL are the two programming languages of Baan and Infor LN. 4GL is the event-driven script attached to a session and its form fields, while 3GL is the C-like language used for libraries, DAL objects and standalone programs.

Baan 3GL and 4GL Explained

The 4GL language is what makes a session behave. A session script is divided into labelled sections that the runtime calls at defined moments: initialization before the program starts, logic before and after a field is entered or left, handling for each form command the user can invoke, logic around reading and writing the main table, and cleanup at the end. Developers do not write a main loop; they fill in the hooks the framework calls.

The 3GL language is a C-like procedural language used where session context is not appropriate: shared function libraries, data access layer objects that carry business rules for a table, conversion programs, and interface routines. Both languages are compiled into pseudo-code and executed by the bshell, so a 3GL function and a 4GL script section share the same runtime, the same database abstraction and the same embedded SQL-style syntax for selecting and updating rows.

Data access layer objects deserve particular attention because they changed the customization model. When business rules live in a DAL attached to a table rather than in the session script, every path that writes that table - the session, an exchange scheme import, an integration or a custom program - inherits the same validation and defaulting. This is why Baan V and LN moved logic downwards into DALs and why bypassing the DAL during a data load is such a reliable way to create corrupt records.

Development happens against a specific VRC, and code compiled into a derived VRC shadows the standard object beneath it. That is powerful and dangerous in equal measure: it is how a site customizes without touching standard source, and it is also how upgrade projects discover that a standard fix has been silently overridden for years. Modern LN pushes teams towards the extension framework instead, so that standard objects stay untouched and updates apply cleanly.

Why It Matters

  • Almost every legacy Baan customization is written in these languages, so migration cost is proportional to how much of it exists.
  • Business logic placed in a DAL protects data across every write path, while logic buried in a session script protects only that screen.
  • The scarcity of 3GL and 4GL developers is now a staffing risk, not just a rate issue, for organizations on older releases.
  • Understanding VRC shadowing explains why standard patches sometimes appear to have no effect on a customized environment.

In Practice

A classic 4GL bug pattern is putting validation only in a field-level hook. It works perfectly for users typing into the screen and fails completely for the same table updated by an exchange scheme, an integration or a batch program. If a rule must always hold, implement it in the DAL for the table, not in the session script.

Frequently Asked Questions

What is the difference between Baan 3GL and 4GL?

4GL is the event-driven scripting language bound to a session and its form: you write logic into predefined sections that the runtime calls at specific moments. 3GL is a C-like procedural language used for shared libraries, data access layer objects and standalone programs where there is no form or session context. Both compile to pseudo-code executed by the same bshell runtime.

Are Baan 4GL skills still relevant for Infor LN?

Yes. Infor LN still runs on the same language and runtime foundation, so a developer who can read and write Baan 4GL and 3GL can work productively in LN. What changes is the tooling and the customization model: development moves into LN Studio, and new work should target the extension framework rather than modifying standard sessions in a derived VRC.

Working with Baan 3GL and 4GL in a live environment? Our engineers do this every day - and our AI agents automate most of it.