What is an RPG language HELLO WORLD program? A “Hello, World!” program is a simple computer program that outputs or displays the iconic phrase “Hello, World!” to a user. This humble program serves as a fundamental introduction to programming languages and illustrates their basic syntax. Let’s explore this tradition further: The “Hello, World!” program typically

Read More

RPG Subprocedure Tips and Techniques The use of subprocedures in your applications should be on everyone’s “to do” list this year. You don’t need to drop everything and rewrite your applications to take advantage of subprocedures and many other benefits that the Integrated Language Environment (ILE) offers.  However, when writing new applications or performing major

Read More

Rules for good coding style I started this with the idea of writing a blog about “Rules for good RPG coding style”, I was discussing this with an old friend and colleague yesterday. He moved away from the AS400 machine, just as it was being replaced with the old iSeries machine. He’s now spent nearly

Read More

Free Form RPG ILE Logic Example I was recording a screencast about modernizing some old RPG400 to ILE RPG this morning and had to knock up this little code example showing the difference between legacy RPG400 code and modern RPG ILE code. Note, this is not an example of good code (it’s crappy old RPG

Read More

Let’s look at a quick little example RPG email validation program – SQLRPGLE ILE There are lots of code snippets, example programs, and long waffling discussions in internet land filled with pointy-headed AS400, Series, and IBM i programmer chaps (and chappettes) arguing about the best way to “validate an email address in RPG”. I know

Read More

Do Loops in RPG Whenever I find myself editing some old RPG3 or RPG400 code, I try to spend a coffee* cleaning the code up to a more modern and readable form. * A ‘coffee’ is the amount of time it takes to drink a regular cup of brew. This is slightly shorter than the

Read More

This is purely a little memory jogger for me. Nothing to read here move along move along….. I just upgraded an old program that had a piece of code doing this: C  DS#POS Div 256 POSLIN C         Mvr POSCOL This old RPG400 code is reading the cursor position from the display

Read More

This morning I had an email from a blog subscriber ( Hi Rick! ) asking for a code tips on how to cleanup IFS file names to remove erroneous characters and/or malformed directory name slashes. Rather than reply with a plethora of programming options — here is an old, but functional, RPG code snippet that

Read More

Upgraded our IBM i systems to IBM i V7.3 yesterday and so far everything is running nicely except for this one weird little glitch: some of the existing DDS WINDOW SCREENS are bombing with CPF4169 The device file does not contain an entry for screen size when they seem to have been quietly working for years,

Read More

RPG INDICATORS are switches Just like car indicators (or ‘blinkers’ as my American cousins call them) they can be switched *ON or *OFF in a program to indicate the state of a certain piece of logic. In the IBM RPG language, it used to logically flick the switch of a numeric indicator 01-99 to “indicate”

Read More

AKA – writing a new DSPLY opcode that shows more than 52 characters Using the DSPLY opcode to quickly debug a program has long been a staple of us RPG keyboard whackers. The DSPLY operation lets us “display the data in a variable” onto the screen. Everyone uses this quick and dirty technique and everyone

Read More