Count with SQLRPGLE Variable File Name Been having fun with SQL and RPG ILE this afternoon… the question was “How do I find out if and how many policies exist in one of the reservation files for a given customer code?” Obviously, we could write a little piece of RPGLE doing a READ LOOP and

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

What are single page subfiles? A single page subfile is a SCREEN OF DISPLAYED DATA, loaded one page at a time. The displayed data is equal to the maximum number of records that can be displayed at a time. In other words, in a single page subfile, all loaded records are displayed at a time.

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

Developerworks Connections is dead As I was waffling this morning about the sad demise of IBM Developerworks Connections Wiki – here is another excellent article that discusses various extensions to IBM Rational Developer for IBM i – How to Extend RDi (#RDi) So here it is, re-posted before IBM can hide this wonderful source of

Read More

I was discussing the benefits of RDi with a colleague this morning (I’m a bit of a Rational Developer fanboy) because he is trying to justify the huge annual cost of the tool with The Management: nearly $1000 per year per person! A price tag that is #bloodypreposterous. But, I will rant about that in

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 character data. The nature of a data area is that its a string of data that can

Read More

Going the (Levenshtein) Distance Over on the RPG Cafe website, a nice chap called Smit Dixit published a sample of his RPGLE code calculating the Levenshtein distance between two words. What is the Levenshtein Distance? The Levenshtein distance is a string metric for measuring difference between two sequences. Informally, the Levenshtein distance between two words

Read More

Fun with RPGLE Strings I was emailed a little IBM i programming question this morning: An input parameter @Account is a 100 character string for one to x number of 8 digit accounts separated with a comma (,). Each account can be entered with commas between each account. Example: The string @Account could be “123,00574,

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

+Happy New Year 2018. One of my new years resolutions was to write cleaner code, and in the spirit of out with the old and in with the new… I already use the RPG COPYRIGHT statement and the CL COPYRIGHT STATEMENT to store the copyright message and (more importantly to me) the Version or Release number

Read More