Infor LN Process Variables: Meaning, Setting and Inspecting
infor ln process variables
Also searched as
- infor ln bshell variables
- baan process variables get.var put.var
- infor ln bshell environment variables BSE
Short answer
Every Infor LN session runs inside a bshell process that carries environment variables (such as BSE, the installation root) and in-memory process variables used by the 4GL code. Developers read and set process variables from code, commonly with the 4GL calls get.var and put.var, and inspect environment values from the shell or bshell startup options. Check how your version exposes them before relying on one.
Applies to: Infor LN 10.x and ERP LN 6.x, 4GL/3GL development and administration; verify function names in your tools documentation
How to inspect and set process variables
- 1Identify what you need: an operating system environment variable seen by bshell (such as BSE) or a variable inside a running session's 4GL code.
- 2For environment values, check the bshell start-up configuration and the user's shell or service environment on the application server.
- 3For in-session values, add a debug print or use the 4GL debugger to view the variable in the process you are testing.
- 4To read a variable from another process in code, use the documented get.var call with the process id and variable name.
- 5To change a variable in a running process from code, use put.var, and restrict this to tooling or approved customisations.
- 6Test in a development environment, then document the variable, its owner and its default.
Two kinds of variable
Environment variables are set by the operating system or the bshell start-up and describe the installation: where the software lives (BSE), temp locations and similar settings. They are read when the process starts and normally stay constant for its life.
Process variables are the 4GL variables inside a running session. They live in memory, differ per process and disappear when the session ends. They hold state such as the current company, the active record and form values.
Reading and setting from code
The tools offer calls to read and set a named variable in a given process, so one session can inspect or influence another. This is powerful and should be used carefully: changing a variable in a running process can alter behaviour in ways the original author did not expect.
Keep any such use isolated in a documented library and avoid depending on internal variable names, which can change between versions.
| Illustrative 4GL sketch: confirm exact signatures in your tools documentation long rc string val(100) rc = get.var(pid, "some.variable", val)
Troubleshooting differences per user or server
When a session behaves differently for one user or on one server, compare the environment of the bshell processes: different BSE values, different language settings or a different start-up script are common causes.
On Windows services versus interactive logons the environment can differ, so test with the same launch method as production.
Try it here, free
Infor LN 4GL Session Script Template
Generate a clean Baan / Infor LN 4GL session script skeleton with declaration, field, choice and table I/O sections.
Common pitfalls
- !Depending on internal variable names that change between versions.
- !Changing variables in a running process from production code without testing.
- !Assuming a user's shell environment equals the service environment bshell actually runs under.
- !Editing environment settings on one server and forgetting the others in the cluster.
How an ERP-grounded AI assistant handles this
Netray adds a private AI layer on top of the Infor LN you already run, including on-prem installs. ERPray answers questions in plain language over LN data read-only, shows the query it ran and respects LN roles, so a consultant can ask the question instead of hunting for the session. The model runs on your own GPUs, nothing leaves your network, and any write-back needs a human approval. Cloud-hosted LN works too, but the design is tuned for on-prem and air-gapped sites. For pure navigation questions, LN's own session search and help are often enough.
Frequently asked questions
What is BSE in Infor LN?
BSE is the environment variable pointing to the root of the LN (Baan) software installation. Most tools resolve their paths from it.
How do I read a variable from another session?
Developers use the get.var call with the process id and variable name. Check the signature and restrictions in your tools documentation before using it.
Do process variables survive a session restart?
No. They live in the memory of the process and are lost when it ends. Persistent settings belong in parameters or tables.
Why does LN behave differently on two servers?
Compare environment variables and start-up scripts of the bshell processes. Differences in BSE, language or temp paths are typical causes.
Related
Logic Deactivation Session in Infor LN
Infor LN enforces business rules through the Data Access Layer (DAL), which runs validation and defaulting logic on every insert, update and delete. Logic deactivation is the controlled way to switch selected logic off for a defined scope, typically for a data conversion or a one-off repair, and then back on. Use it sparingly, with a backup, because rows written without logic can break integrity rules.
AdvancedInfor LN Text Table: How Text Fields Are Stored
In Infor LN, long text on records such as items, orders and customers is not stored in the business table itself. The record holds a text number, and the text lines live in the text table (tttxt010, per company), keyed by text number and language. To read text with SQL join on that number; to copy it, use the standard text copy functions rather than raw inserts.
Error fixInfor LN 'unable to create a session': causes and how to fix it
This message means the client reached LN but the server could not start the session process (a bshell) or could not load the session. Work from the server side: check the bshell log, licence and user limits, the user's authorizations, and whether the session or its dependent objects exist and are compiled.
How-toHow to Check the Infor LN Version and Current Package VRC
An Infor LN installation has four separate version facts: the application release and feature pack, the porting set that carries the bshell and database drivers, the package VRC that each user or company runs, and the installed solutions. The release is shown in the Help > About dialog of the client, the package VRC in the Tools package administration sessions, and the porting set on the server through the installation tooling.
Error fixInfor LN bshell Process Stuck at 100% CPU: How to Diagnose and Fix It
A bshell process pinned at 100% CPU on the Infor LN application server almost always means one session is stuck in a 4GL loop, scanning an unindexed table, or waiting on a database lock. End the session from the Sessions Monitor first, then kill the OS process only if that fails, and check for a blocking database transaction before assuming it is a bug.
Error fixInfor LN Not Authorized to Run This Session: How to Fix It
Infor LN refuses to open a session with a not authorized message when the logged-in user's assigned role does not include that session, or when the session is blocked for the company they are logged into. Grant the session through Common > Authorization Management > Roles, or check the user's role and company context, and the session opens on retry. In most cases this is a permissions configuration issue, not a bug.
AI for ERPAI for Infor LN: Sessions, BODs, and Engineer-to-Order Work
Add grounded AI to Infor LN 10.x or CloudSuite: natural-language answers over sessions and BODs, agents for project and engineer-to-order work, on-prem options.
Stuck on Infor LN?
Talk to engineers who work inside Infor LN every week, and who build private AI that answers these questions from your own ERP data.
Keep exploring
Free tools
- Infor LN 4GL Session Script TemplateGenerate a clean Baan / Infor LN 4GL session script skeleton with declaration, field, choice and table I/O sections.
- Infor LN and Baan ERP Table List by PackageFilterable list of commonly used Infor LN and Baan tables by package, with the naming convention, key fields and where a Baan IV table differs from LN.
- Infor LN and Baan Customization Inventory WorksheetEditable worksheet to list every Baan or LN customization with type, owner, effort and a retire, keep or replace decision.
ERP fixes and how-tos
- Baan Error 10054 (and Error 206): What It Means and How to Fix ItBaan error 10054 is the Windows socket error connection reset by peer between the client and bshell. Learn the network, bshell and server causes plus error 206.
- Infor LN bshell Process Stuck at 100% CPU: How to Diagnose and Fix ItInfor LN bshell pegged at 100% CPU blocks sessions from responding. Here are the real causes, how to trace the hung process on the app server, and the fix.
- DB Error 100 in Infor LN and Baan: Record or End of Set Not FoundDB error 100 in Infor LN or Baan means a record or end of set was not found. Learn the causes, how to trace it in the bshell and debugger, and handle it in 3GL.
Guides
- Infor LN BShell Customization GuideMaster Infor LN BShell customization. 4GL programming patterns, session scripting, DLL extensions, and upgrade-safe customization techniques.
- Infor LN BShell Programming: Developer Fundamentals GuideMaster Infor LN BShell scripting with this developer guide covering 4GL syntax, database operations, session hooks, and debugging techniques for BAAN/LN ERP.
- Infor LN Report Development: Complete GuideCreate and customize Infor LN reports using BShell report sessions, Crystal Reports integration, and Infor Document Output Management for BAAN/LN systems.
Integrations
- How to build an MCP server for Infor LNHow to build a Model Context Protocol server for Infor LN: which read-only tools to expose, auth through ION API, stdio versus HTTP, permission scoping and audit.
- How to add WhatsApp to Infor LNHow to connect WhatsApp to Infor LN: ION BODs and APIs, template messages, opt-in rules, supplier confirmations and order status, including on-prem LN setups.