Modern ILE RPG now (finally) supports “fully free form” RPG Source code This means, we can write RPG code from column 1 to the end of the line — just like other languages. No more jumping to character 10 to get passed the old reserved (H,F,D,I,C,O) specification column. You must code **FREE in column 1

Read More

CTRL + D = Duplicate a line of code Yes – Forget COPY/BEFORE/AFTER and quickly duplicate a line in RDi with CTRL/D. It’s really that simple. If, like me, you grew up with SEU as your terminal based editor choice – you will be used to Copy and Before or After. You might even get

Read More

Ever had to populate the *LDA in correct layout for JBA ERP Modules (aka GEAC aka Infor System21? Here is a quick and easy JBA System21 *LDA – RPG Example written in RPGLE **FREE format. Here is a simple RPGLE program to setup the *LDA priot to running a few little INFOR SYSTEM21 extraction routines: WEBSETLDA

Read More

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

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

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

I’m in the final stages of a fun project writing web-services to interface INFOR System21 (on an IBM i aka AS400) with ACSIS Visitrack (on Windows Server), we are consuming (receiving) and serving (sending) all data in a standard alphameric layout But… as any RPG programmer will know… the conversion between alpha to numeric is

Read More

Example RPGLE web service programHere is a quick little example RPGLE web service – it’s written in RPG, the SQLRPGLE flavor and simply reads a file (the System/21 Stockroom master file — INP20) and returns a multi-occurrence data structure (array) of the stockrooms that the user is authorized to use. #hopeithelpssomebodyWEBGETSTR – get all stockrooms for

Read More

RPG CODE EXAMPLE – “Write to joblog” Write to joblog lets us send messages from inside a running RPG program. It’s simple using one of IBM’s API’s – Qp0zLprintf I’ve used this little technique for ever. Simple define a procedure calling the API (in this example I call it “writejoblog”) and then in your mainline code

Read More

Numeric Data Areas are a little trickier than Alphameric Updating any numeric DTAARA in RPGLE is slightly different in RPG /FREEFORMAT than in the good old fashioned column based RPG/400. Using RPG ILE, data structures are treated as mixed-character data. The subfields making up a data structure can be a mix of all data types:

Read More

RPG Programmers are a strange breed of Human If you are a software developer then you will know that RPG is an IBM programming Language. It’s also a Rocket Propelled Grenade. It’s also an acronym for Role Playing Games. This blog will have lots of waffle about being an RPG Programmer and just the occasional

Read More

IBM RPG is a lovely language. RPGLE (as the latest version is known) has got some heritage. Some might say its an old language, but I say it’s kept young by its constantly evolving syntax! Testing numeric values has evolved over years, lets look at two examples. The current version of RPGLE (IBM i V7R1 at

Read More