Tag Archives for " #sample "

Jun 01

RPG example: store webservice reply XML or JSON in IFS

As an RPG Programmer you are probably writing a ton of code to talk to remote webservices out there in internet land. If you are just learning webservice programming, it can seem like a daunting exercise. So, to help you with your first steps on the journey, here is a simple RPG CODE EXAMPLE which […]

More Waffle
Sep 13

RPG Evolution, Modernization and Refactoring – Step 4 of 4 – Setting RPG Free

Setting RPG Free Convert RPG from Column to free format So, if we take the code and actually upgrade it to be the current style of RPG/Free we can see all the mainline specs are now written in freeform code style and it looks yummy: h datfmt(*iso) timfmt(*iso) option(*nodebugio) debug //——————————————————————- // system name: fix […]

More Waffle
Sep 13

RPG Evolution, Modernization and Refactoring – Step 3 of 4 – Paroling RPG4

Upgrade RPG4 to use free-friendly code standards If we were using Rational Developer/i software we could do this automatically. But as a manual process its simple, if a little tedious. Basically when we are going to skim through the code and replace all indicators with the modern and preferred %FOUND BIF technique: H debug ***************************************************************** […]

More Waffle
Sep 11

RPG Evolution, Modernization and Refactoring – Step 1 of 4

I’ve recently been writing all my new programs in RPG Free format. Attending RPGWORLD earlier this year, gave me the impetus to finally commit myself to the new and improved style of RPG coding. I’m currently in contract at a shop that still has twenty year old programs running in production, the developers still write […]

More Waffle
Oct 10

RPG SQL: load all subfile has fixed size of 9999 records

What is a load all subfile? A load all subfile is one in which we generally specify the subfile size as 9999 in the record format itself. However, you may define the subfile size to be less than 9999 in the record format and still load all your subfile at a time. In that situation […]

More Waffle