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 Let’s dive straight in: (1) Get Sysname using SQL The IBM i System Name is not the same thing as the SQL Local DB Server name, although it may be the same by default. You

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

So, I was searching for information on JSON versus JSONP and, more specifically, how to handle JSONP with IBM i Y.A.J.L and I stumbled across this old archived website. The actual domain is dead, but I found this information on the internet way back when archive site. It’s worth saving – so here it is!

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

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

RPG CODE EXAMPLE – “Write to joblog” in Free Format RPGLE Write to the IBM i joblog is a neat way of recording details of any running jobs information. This example lets us send messages from inside a running RPG program. It’s simple using one of IBM’s API’s – QMHSNDPM – and this source code

Read More