What is Legacy Code? I’ve always thought LEGACY it was the correct terminology for old fashioned RPG source code. For years I’ve been focused on refactoring old column based RPG “legacy” code into new “modern” RPGLE code. But it seems that I’ve been guilty of using the wrong words all this time. I just read

Read More

Ever wanted to validate or syntax check JSON from within RDi? It’s easy using the free JSON editor from the Eclipse marketplace. This JSON Plugin for RDI will validate, syntax check and polish your JSON layouts with ease. To start you have to go into RDI and get into Eclipse’s Market Place. That will bring up

Read More

Ever had to populate the *LDA in correct layout for JBA ERP Modules (aka GEAC aka Infor System21? Here is a simple RPGLE program knocked up to setup the *LDA priot to running a few little INFOR SYSTEM21 extraction routines: WEBSETLDA // ——————————————————————- // Service Name – WEBSETLDA // Function – Populate *LDA with Dummy

Read More

For any RPG programmer, writing RPGLE code (sometimes called RPG4) is fun. But, upgrading older RPG programs to the latest free form program layout is even more fun! The joy experienced when the Project is to “Modernize RPG” always puts an inane grin on my face. So lets look at a simple example: Get Sysname

Read More

Back in the olden days – RPG was this column based thing that looked magical and quite unlike any other programming language. But, it’s a new age and RPG has evolved, added a sprinkle of ILE pixie dust and now lets us code fully backwards compatible programm calls in a much neater format free’d from

Read More

Upgrade old RPG source code — aka refactoring — is a fun past time There are frequent little code snippets that I refactor over and over again. Some look similar but some look very different in modern language style. It’s perhaps worth documenting them in case someone else is trying to figure out alternative ways

Read More

The wonderful IBM RPGLE programming language: What is Chain(N) and Chain(NE) Overview For file I/O requests in RPG (ie: Chain, Read, Reade, Setll, etc) we can add some options using (N) – No Lock (E) – Error Logging (NE) – No Lock and Error Logging Writing code in RPG the CHAIN operation code is used

Read More

RPG is not a Rocket Propelled Grenade RPG2 is that Logic Cycle Thing RPG3 is the System/38 version RPG400 is the revamped RPG3 that came with AS400 ​everything after that is RPG… unless its ILE then its RPGLE or sometimes RPG4, or its free format so its RPGLE /Free… or its SQL so its RPGSQL

Read More

SQL Tables with Indexes and Views are faster than DDS Phsyicals and Logicals. #HONEST SQL is a wonderful beast for quickly getting data from huge tables (aka Files). The trouble with SQL is that it’s so very simple to use; programmers get lazy and sometimes forget to do the analysis to make it as simple

Read More

IBM Rational Developer (RDi) is good but bloody expensive! If you are reading this blog then chances are you are (a) an RPG Programmer and (b) using SEU to edit your code and (c) you are frustrated that SEU wont syntax check new RPG anymore! It’s time to leap into an RPG EDITOR or be pushed… RDi

Read More

EXTPRC – External Procedures Question: How do I promote External Procedure using Turnover and get them to automatically *REPLACE on the destination machine? Answer: Like this! The problem here, is that SQL Stored Procedures have no equivalent of *REPLACE on the CREATE PROCEDURE statement! That’s easy – “just add a Drop to line one of the

Read More

RPG CODE EXAMPLE – “Write to joblog” in RPG with Qp0zLprintf Write to joblog lets us send messages from inside a running RPG program. It’s simple using one of IBM’s API’s – Qp0zLprintf Qp0zLprintf() — Print Formatted Job Log DataThe Qp0zLprintf () function prints user data specified by format-string as an information message type to the

Read More