Have you ever wanted to extract some data out of an IBMi/AS400 file using SQL and then email that data to someone as an Excel Spreadsheet? Now you can… all from one IBMi command without having to write any CL code to do it. Projex4i: DSTDTA command now handles SQL STRINGS for selecting data I

Read More

Using SQL in RPGLE programs is easier than you think. Making the move from RPG native file IO to SQL database IO is really quite straightforward:  Changing from good old READE loops to SQL FOR Loops simply means using the SQL CURSOR function. SQL has a groovy way of referring to what the stuff that

Read More

Twenty years ago… I was typing on a dumb terminal, connected to a great big beige computer called IBM AS/400 with a thick grey Twinax cable. Screens were green on black, text only — or sometimes orange on black if you were posh. The internet was this thing we used to send emails (if you knew

Read More

Should RPG code be long form or short form? I’ve been working on an interesting project focused on taking some old RPG code and re-factoring it to make it more efficient. Fascinating work for a client that is focused on doubling its IBM i throughput and reducing the CPU load of all its old programs.

Read More

Find the IBM i System Name Three Ways Let’s look at three techniques to find the IBM i System Name A super easy technique using SQL in an SQLRPGLE Program Just as easy in a CLLE prograam Calling the IBM i *API to get the information, an RPGLE program Let’s dive straight in: (1) Get

Read More

Substring in RPGLE SQL This morning, I had to make a little change to an RPG4 program to let it respond to a new parameter being passed into it via JSON. This value had to be stored in the first character of a field in a physical file in the database. Simple Logic and we

Read More

USING COPYRIGHT in the RPG Header Following on from the COPYRIGHT PRIMER blog from a while ago I added a little extra function for CL as well. The extra function means that defining the copyright text in a variable as well as the COPYRIGHT means you can store the copyright statement at OBJECT level and

Read More

I wish I could take credit for this article. But I cant 🙂  It hits the nail on the head and the author (Daniel Gray) explains himself very clearly: Getting up to speed with PHP on the IBM I If I can, I’d like to offer my IBM I friends some advice on getting up

Read More

I have a NUMERIC in an RPG program that I want to move RIGHT into an Alpha field. In the old days of RPG3 I would use MOVE but in the new days of RPG4 I have a couple of more flexible solutions. So, lets say we have a numeric field containing the number 1234,

Read More

Pointing at Pointers and laughing aka “How to Display Pointer Data” RPG has all kinds of different data types. In the olden days of RPG, we only really thought in terms of character variables and numeric variables (signed numeric and packed numeric).  But as the language has advanced and adopted new technologies, methods of talking

Read More

Modernizing RPG Programs – Learn the RPG History first I had email email from an old work colleague this morning. He was a windows programmer, with limited exposure to RPG, but works in a company that is driven by a huge, old, complex RPG3 application that has changed little over the last decade. He is

Read More

Write Clean RPG Code This morning I was revisiting a program that I wrote last year and looking at my code thinking “Why the hell did I write it like that? #Ugly”. RPG code evolves and lots of code evolution starts in one direction and then branches off, drunkenly in another direction. This means that

Read More