Programming language RPG on the AS400 

 October 10, 2008

By  NickLitten

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.

Programming language RPG on the AS400 1

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.


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

Get In Touch

Iā€™m always looking for awesome input, feedback and critique!