IBM i, RPG and mainframe
We write about the systems that banks, insurers and factories have run on for decades: IBM i (AS/400), RPG, COBOL and mainframe. We show how to modernize them without a rewrite from scratch, connect them to new applications and the cloud, and where to find people who know them.
18 articles · B2Bnetwork team
18 articles
- 01IBM i (AS/400): why companies still run on itCompanies still run on IBM i because the system keeps doing its job: an integrated Db2 database, stability measured in years without downtime, and programs from decades ago that run on new hardware without being rewritten. IBM i is the current name of the operating system that started as AS/400 in 1988 and today runs on IBM Power servers. The problem is usually not the platform but the lack of people who know the applications and the RPG language.6 min
- 02RPG today: free-form and modern toolsToday's RPG is a procedural language with a readable free-form syntax, procedures, modules, and SQL written directly in the code. You write code in VS Code with the Code for IBM i extension or in RDi, keep it in git, and compile from sources in the IFS. Old fixed-column RPG and the SEU editor still exist in many companies, but new code does not have to look like that, and a Java or C# developer can read it without a translator.6 min
- 03The RPG developer: how to find one and keep them on a projectYou will find an RPG developer faster if you search in the IBM i community and among engineers ready to move to this platform, and if the role description says plainly what code awaits on the project. You will keep them with modern tools (VS Code, git, SQL), sensible modernization instead of constant firefighting, and a team where knowledge does not hang on one person. The market is small, so every missed interview costs weeks.6 min
- 04IBM i modernization: refactoring, APIs, or migrationIBM i modernization is chosen by what actually gets in the way. When the problem is unreadable code, in-place refactoring is enough: free-form RPG, procedures, SQL instead of DDS. When integrations and a new interface are missing, you build an API layer over the existing logic. Migrating off the platform makes sense only when the company is changing its processes or system anyway and the business rules stored in the code are known and documented.6 min
- 05COBOL and the mainframe: how to pass on knowledge before the experts leaveKnowledge about a COBOL system on a mainframe is passed on by plan, long before the experts leave: through a map of batch runs and transactions, pair work on real changes, recorded code reviews, and tests that capture the system's behavior. Documentation alone is not enough, because the most valuable knowledge concerns exceptions: what to do when the nightly run stops, and why a certain program is run twice. The plan starts with a list of people and areas that only they know.7 min
- 06IBM i and modern applications: integration through REST APIsIBM i connects to modern applications through REST in both directions. You expose RPG programs and procedures as REST services through IWS (Integrated Web Services) or through your own service in Node.js or Python running on the same server. When IBM i has to call someone else's API, you use the HTTP functions in Db2 for i SQL and the JSON support in SQL and RPG. The business logic stays in one place, and the web shop or mobile app gets an ordinary API with JSON.7 min
- 07Db2 for i: SQL instead of DDS and a migration planMoving from DDS to SQL in Db2 for i means describing database files with CREATE TABLE, CREATE INDEX, and CREATE VIEW statements instead of DDS specifications. It gives you primary and foreign keys, constraints, long names, data checks on write, and access to new database features. You can do it file by file, without rewriting RPG programs, if you keep the record format name and the field layout. Start by generating DDL from existing files and by testing on a copy of the data.7 min
- 08Automated tests for IBM i applicationsIBM i applications are tested automatically at four levels: unit tests of RPG procedures in service programs (for example in RPGUnit), tests of batch runs by comparing output data with an SQL query, tests of REST services exposed from IBM i, and tests of 5250 screens where there is no other way. Data comparison usually gives the most, because it needs no changes to old code. Tests run in a separate library with a copy of the data, selected through the job's library list.7 min
- 09Mainframe batch processing in the cloud: is it possibleYes, mainframe batch processing can be moved to the cloud, but not in one move. There are three paths: running existing COBOL and JCL programs in a mainframe-emulating environment, automatic code conversion to another language, or rewriting the runs as new batch jobs, for example in Spring Batch on Kubernetes. The most work goes into the data (EBCDIC, packed decimals, VSAM), the processing window, and restart after an error, not into the code itself.6 min
- 10Documenting a legacy system when its authors are goneThe documentation of a legacy system without its authors is reconstructed from the system itself and from the people who use it. First an inventory: which programs, files, and jobs exist and which are really used. Then a dependency map from system tools (on IBM i, for example DSPPGMREF and DSPDBR), a description of processes from conversations with users, and tests that capture current behavior. Documentation is written starting with the processes most important to the company, not with the first program in the library.7 min
- 11CL on IBM i: job control programs and how to maintain themCL (Control Language) is the IBM i command language used to write control programs: they call RPG programs in sequence, prepare files, set the library list, submit jobs to a queue and react to errors. Business logic usually lives in RPG or SQL, while CL handles the order of steps and the state of the job. In maintenance, most trouble comes from MONMSG error handling, hardcoded library names and job logs that do not tell you what happened.7 min
- 12IBM i security: user profiles, object authority and auditingIBM i security rests on three pillars: user profiles with special authorities, authority to every object (library, file, program) and the QAUDJRN security audit journal. The minimum is QSECURITY level 40 or 50, *ALLOBJ only for a few named administrators, public authority to data at *USE or *EXCLUDE, and auditing turned on. Most gaps appear not at the 5250 sign-on screen but in public authorities and in access through ODBC and FTP.7 min
- 13Git and CI/CD for IBM i: how to bring version control to RPGVersion control on IBM i comes in four steps: moving source from source physical files (such as QRPGLESRC) to the IFS and git, building the whole application from source automatically, a pipeline that compiles and tests every change in a separate library, and deployment from an approved version instead of copying objects by hand. The RPG and CL compilers accept IFS files, so git works here as in any other project. The hard parts are dependencies between objects and database changes, not the tool itself.7 min
- 14IBM i high availability: replication, backups and recovery testingHigh availability on IBM i has three layers: backups (GO SAVE, BRMS), replication to a second system (logical replication through journals, or PowerHA with an independent auxiliary storage pool, IASP) and regular switchover and recovery tests. You choose the solution based on two numbers: how much data the business can lose (RPO) and how long the system can be down (RTO). Replication protects against a server failure, but a faulty batch run or deleted data reaches the copy within seconds, so backups always stay.6 min
- 155250 screens and web interfaces: paths to modernizing the UIYou can modernize a 5250 interface on IBM i in four ways: a better emulator, a refacing layer that turns screens into web pages (for example IBM HATS), RPG Open Access, which routes display file operations to your own handler program, or a new web application over APIs. The first two paths are fast but do not change the process. The last one requires separating logic from screen programs. The choice depends on who uses the screen: an operator entering data, or a customer and partner.6 min
- 16JCL and job scheduling on the mainframe: the basics for new team membersJCL (Job Control Language) is the language you use to tell z/OS which program to run, which data sets it should work with and what to do with the results. A job consists of a JOB statement, EXEC steps and DD data set definitions. A job scheduler, such as IBM Z Workload Scheduler, decides when and in what order jobs start and enforces the dependencies between them. A new team member first learns to read return codes and ABENDs, the DISP parameter, GDG data sets and restart rules.7 min
- 17CICS and mainframe transactions: how to expose them as APIsYou expose a CICS transaction as an API by calling, through a REST layer, the same COBOL program that a 3270 screen or other systems use today. The most common tool is IBM z/OS Connect, which maps JSON to COBOL structures and describes the API in OpenAPI; less often, teams use the built-in JSON services in CICS or their own Java application in CICS. The prerequisite is logic in a program called with LINK, separated from screen handling. After that, security, idempotency and performance decide the outcome.6 min
- 18Integrating IBM i with Kafka and message queuesIBM i connects to Apache Kafka in three ways: change data capture (CDC) from database journals, events the application writes to an outbox table or a data queue that a separate producer sends to Kafka, and IBM MQ with a Kafka Connect connector. CDC requires no changes to RPG programs, but it publishes row changes rather than business events. Whichever path you choose, you have to plan ordering by key, redelivery of the same event and conversion from EBCDIC to UTF-8.7 min
Didn't find the answer to your question?
Tell us what you're dealing with. An engineer who has worked on a similar system will answer.