RPG and the AS/400 platform have a long history.
When the System/3 was introduced in the 1970s, RPG was first released , the language evolved and RPG II use of the logic cycle was many programmers first experience of pulling hair out while staring at a green screen. RPG III was released with the System/38, which included the ability to work with a fully integrated database. In 1994, RPG IV was released, with it’s ILE abilities. The RPG language is evolving with every release of i5/OS/IBM-i (the IBM operating system) and the latest iterations of RPG/4 include many many new built in functions that make it an almost different language from the original RPG/4 released in the nineties. #RPGstepup.
The ILE version of the system i programming language allows you to write each program in a series of modules and compile each one separately. Of course, each of these modules can also be written in different languages. I’ve used java, control language, rpg, cobol, etc and these different modules all compile and then are *glued* together seamlessly into a single program *object*.
In this little series of articles I’m are going to try and cover most aspects of simple RPGLE programming syntax, module design and procedural principles. Everything from the Logic Cycle through to modularized techniques.
Due to its evolving nature RPG is frequently described as RPG/2, RPG/3, RPG/400 and most recently RPG/4 or RPG-ILE. Confused? Well dont worry, spend a lunchtime reading these articles and it will all hopefully become clear.
We will go through the RPG variables, conditional execution, subroutines and the input/process/output routines. After this we can move into the more complex areas of posting data to the AS400 database.
The final objective will be lead you through a simple RPG program taking screen input and verifying and updating an AS400 database.