RPG/CL program calls
from .NET

With NTi Data Provider, natively call your existing IBM i programs from your .NET applications, without rewriting or duplicating a single line of business logic.

  • Call existing programs (RPG, CLP, 36, …)
  • CL commands executed from .NET
  • Input, output, and input/output parameters
IBM Silver Partner logo Microsoft Partner logo

Reuse of existing developments

Your RPG programs represent an asset shaped over time to meet the needs of your business. They carry business logic, management rules, and an application identity that is unique to your organization.

NTi lets you call them directly from C# and integrate them into your new .NET projects, giving your business applications a long-term roadmap.

Cost reduction

Calling an RPG program from C# with NTi takes a few hours of integration. Rewriting it is a project in its own right, with its own cost and timeline.

Reduced operational risk

Your business processes are already running in production. Reusing them from .NET requires no additional validation.

Preserved expertise

Your business logic stays where it was built: you open it up to modern use cases with ease, without losing control over it.

A program call
in just a few lines

Standard C#. Connection, parameters, call, result.

conn.CallProgram(...)

Call an existing IBM i program from C#, passing its parameters.

new NTiProgramParameter(...)

Declare each parameter expected by the program: input, output, or input/output.

conn.ExecuteClCommand(...)

Execute a CL command directly from your C# code.

Example: IBM i customer management

A CLIENTS table and an RPG program CLIENTS2 (library MYLIB) handle validation, insertion, and data updates.
The web interface, built in Blazor (a .NET framework), calls the program directly, without rewriting the existing logic on IBM i.

using var conn = new NTiConnection(connectionString);
conn.Open();
// Add library
conn.ExecuteClCommand("ADDLIBLE LIB(MYLIB)");
// Parameter declaration
var parms = new List<NTiProgramParameter>
{
    new NTiProgramParameter("01", 2).AsInput(), // action code
    new NTiProgramParameter("", 2).AsOutput(), // return code
    new NTiProgramParameter("", 2).AsOutput(), // error code
    new NTiProgramParameter("", 10) // customer data structure (219 bytes)
        .Append(request.CompanyName ?? "", 20)
        .Append(request.PostalCode  ?? "", 5)
        .Append(request.Email       ?? "", 20),
    new NTiProgramParameter("", 10).AsOutput() // per-field validation flags
};
// Program call
conn.CallProgram("MYLIB", "CLIENTS2", parms);
Depending on the program signature, output parameters can carry return codes or business messages, directly usable for error handling on the .NET side.
View the full example.

IBM i side

Customer data entry on the 5250 screen Customer data entry on the 5250 screen, before validation by the RPG program.

.NET application side

.NET application displaying the new customer record returned by IBM i The new customer record, with its number generated by IBM i, is returned to the .NET application.

All of IBM i, from .NET.

RPG and RPGLE programs

Call any compiled program from C#, as long as its parameter interface is known.

CLP programs and CL commands

Automate your IBM i operations from .NET: library creation, object management, batch job triggering.

IBM i system APIs

Access IBM i system resources from .NET by implementing calls to the QSYS APIs documented by IBM.

Your programs
accessible anywhere

Deploy your .NET application wherever you want. NTi bridges the gap to IBM i.

100% .NET

A single NuGet package to reference in your .NET project, no client driver.

No IBM i installation

NTi uses the standard TCP/IP services already active on your system.

Deploy anywhere

Windows, Linux, ARM64, Docker, cloud. Anywhere .NET runs.

NTi also provides access to DB2 for i data via the standard ADO.NET or with the EF Core extension.

"With cloud-native, cross-platform solutions, the application adapts to the infrastructure. Not the other way around."

Use cases

Business API

Expose your IBM i processes as APIs, consumable from a web portal or mobile application, without rewriting the business logic.

Web interface

Build clean, intuitive .NET interfaces around your existing IBM i programs, without duplicating the business logic.

Automation

Trigger and control your IBM i operations directly from your .NET applications, without going through a 5250 screen or a third-party tool.

Frequently asked questions