How to use ‘Conditional Selection in RPGLE and CLLE’ Way back in 2008, I wrote this blog about how to do various condition selection in RPG. So, I suppose it time to modernize those code examples in modern RPGLE Free, tidy it up, and add the same code examples in CLLE. In RPGLE (and in

Read More

Playing with a RPG Subfile Poking around on the filthiest corners of the IBM i Programmers internet this morning, I stumbled across someone else’s sample subfile template for an RPG program. This is quite an old-style RPG program (it looks like it’s from around 2012) but should still work well today. It looks quite nice,

Read More

Built-In Functions in RPGLE – %EOF & %FOUND %EOF(filename) This built-in function is used to detect end-of file, beginning of file, or subfile full conditions while performing a file operation. Rather than using indicators, we should use %EOF to check if the end of file is reached. %EOF returns ‘1‘ if end-of file, beginning of file,

Read More

Retrieve the Jobs Program Call Stack – RPGLE Example The RPG IV provided in this tip uses a simpler method to provide this function. The program sends messages up the call stack one at a time (to a maximum of 10 entries) until the top is reached. For each send, a retrieve is also performed

Read More