Mike Larsen is an associate of Central Park Data Systems and has been working with IBM i systems for over 20 years. He specializes in RPG, CL, and SQL. More recently, he’s been working with PHP and Python. Mike has successfully implemented many major systems in his role as a Project Manager/Developer. Although his main area of expertise is on IBM i, Mike has a passion for learning other languages and how he can integrate other platforms with IBM i.
April 29, 2019 Mike Larsen
Over the past several years, I’ve seen a growing demand to provide business data in Excel. Some shops are content to receive their data in .csv format and then manually apply formatting to make it presentable. Wouldn’t it be better if we could provide a spreadsheet that is already formatted?
In my opinion, the answer is yes. Most recently, I’ve been using PHP to accomplish this task. PHP works great for me, but I always like to have different options from which to choose. This is important to me because some shops may not have PHP installed. Based on that …Read more
October 29, 2018 Mike Larsen
Recently I worked on a process that required me to update records in a file based on certain criteria. Sounds like a common request, right? Well, there was a twist. The file had multiple members and the update needed to consider all of them. Suddenly, a “simple” request became a bit more challenging.
I knew of a few ways to work with multi-membered files, but I like to lay out all the options before deciding on a game plan. One method I considered was to perform an override of the file (OVRDBF command). That would certainly work, although I have …Read more
October 15, 2018 Mike Larsen
Lately, I’ve been using the merge statement in my programs to insert or update rows in a table. I recently came across a situation where a program using merge was running every few minutes and performing updates to thousands of rows each time it ran. Since this table was journaled, it was obvious some re-design was necessary.
For those unfamiliar with the merge statement, it is sometimes referred to as an “upsert.” That means it will either perform an update or an insert. In RPG terms, I like to compare it to a chain operation. With a chain, you check …Read more
February 19, 2018 Mike Larsen
IBM Integrated Web Services (IWS) makes it easy to create web services and deploy them to a web server. If you need to deploy the same service to multiple web servers, you could use IWS to manually create it on each server, but it would be time-consuming and error-prone. Simply missing a setting when creating the service can lead to unexpected results.
Or you could automate the process. That would ensure the attributes of the service carry forward from server to server. While I won’t get into the web service creation process, as there are already many articles that address …Read more
October 2, 2017 Mike Larsen
In my prior article, I showed how to consume a REST web service using the GET verb. This time, we’re going to continue to build our knowledge of web services by working with the POST verb. In addition to working with a different verb, I’m also going to demonstrate how to pass a header and body to the service.
The goal is to post information to an Amazon Web Service (AWS). I created a simple REST Amazon Web Service that accepts information about a pet which will be inserted into a pet store database. I pass a JSON structure …Read more
September 18, 2017 Mike Larsen
The use of web services in the industry continues to grow, and sometimes it can be challenging to find information on how to work with them on IBM i. So, what is a web service? In a nutshell, web services allow systems to communicate via the web using file formats such as JSON and XML.
This article demonstrates how to consume a REST web service using SQL. The example I’m working with uses the ‘GET’ verb to retrieve information from an Amazon Web Service (AWS). I created a simple REST Amazon Web Service that retrieves information about a pet from …Read more
July 10, 2017 Mike Larsen
In the first part of this series, I showed you how to load images from the IFS into a table that has a column defined as a BLOB data type. BLOB stands for Binary Large Object and is a collection of binary data that is stored as a single entity in a database.
Our final goal is to retrieve the images from the table we loaded in part 1 and write them back to the IFS. Once we complete this task, we should end up with the same five images we worked with in part 1. To keep everything …Read more
June 26, 2017 Mike Larsen
In the first part of this series, we’ll look at how we can store images (or other media) in an SQL table on the IBM i. To accomplish this goal, we’ll write an RPG program that reads a table that has the name and location of the images from a folder in the IFS, and writes those images to a table.
The images will be stored in a column that is defined as a BLOB data type. ‘BLOB’ stands for ‘Binary Large Object’, and is a collection of binary data that is stored as a single entity in a database. …Read more