Top 5 Things You Didn't Know You Can Do Using Open Source on Your IBM i
Call public web services right from RPG to quickly provide new capabilities
Enhance your RPG applications with freely available Open Source modules
Access your RPG Code, CL Commands and DB2 data directly from web browsers and web services
Manage IBM and Open Source development synchronously with Open Source DevOps tools
Take advantage of True Cloud offerings to significantly enhance and speed up your development and testing processes
Chief Executive Officer &
Dan has spent over thirty years leading companies that help customers implement new technologies in legacy environments. Previously, Dan led worldwide software development groups that built highly successful modernization and DevOps tools and was the CEO of Aldon, the leading provider of DevOps tools to the IBM i marketplace.
Vice President,Open Source Technologies & IBM Champion, Eradani
Aaron has been writing modern applications to leverage open-source technologies on the IBM i for more than 10 years. His applications are part of commercial products that are installed in thousands of IBM i shops. His work combines open-source languages such as PHP, Java, Node.js, and Python with traditional IBM i
technologies to create leading-edge IBM i solutions.
Hi, everyone, and welcome to our webinar today on five things you didn’t know you could do with open source on your IBM i. My name is Dan Magid, and I am the chief evangelist here at Eradani. And we work with customers to help them take advantage of open source and APIs on their IBM i. And so we’re going to talk about some cool things that you can do to take advantage of the latest technology with your IBM i systems. And I always like to start these presentations with this slide, because this is what I run into when I go out into the marketplace. I see so many people who think about the IBM i as existing on the left side of the screen, what I call the mythical IBM i, that the IBM i is a green screen system that is limited to RPG and COBOL and CL and DB2. And basically, that’s all you can do with it. And the reality is, you can do just about anything on the IBM i that you can do on any other platform. So you can do all the latest in open source. You can do all the latest in mobile and web development. And you can do lots of cool things with APIs, which is what we’re going to really focus on a lot today. So these are the things we’re going to cover in our presentation today. We’re going to talk a little bit about how you can do IBM i in the cloud, just like you can do any other platform in the cloud. We’re going to talk about calling out from your IBM i to open source and how you can do that very, very easily. And then how you can use free open source components as part of your IBM i applications. And some of the things that IBM has done recently in speeding up the connectors make it possible now to actually integrate open source components right into the main line of your RPG programs because they respond so quickly. And then calling into the IBM i from open source, so calling out from the IBM i and then calling into the IBM i. And then we’ll talk a little bit about how to set up a DevOps environment so you can manage all of this stuff together.
So in this example, what Aaron’s going to show you is a way to go right from your IBM i programs to something like a Zebra printer and print out your barcode labels, your QR code labels. These actually come up from our customers who have been using advanced function print utilities on the IBM i and are concerned that IBM after 7.2 isn’t supporting that anymore. And so they’re looking for what’s a new alternative. Well, it turns out that there are open source modules available that will create these barcode labels for you. And so you can simply wrap those open source modules into your application, call them from your IBM i, and generate these labels and even generate the ZPL language that the Zebra printers need in order to do that kind of printing or the EPL or the GPL, depending on which one of the printers you’re using. So Aaron is going to go ahead then and show you exactly how that works. All right. So let’s take a look at this one. So like Dan said, we’re going to go through and we’re going to print a label. And again, this is going to work the same way. And this is going to be consistent through every program that I show you today. It’s going to be basically three lines of CL code, and I’m doing this with CL personally, but I could do that with RPG or any other language on the IBM i if I wanted. It’s going to be basically three lines of code on the IBM i side, and then it’s going to be typing to an open source module, and that’ll handle it from there. So what we’re going to do here, first of all, let me just make sure my server is running. All right. It looks like I’ve got my barcode server running. Now what I’m going to do is I’m going to say PRTCDEC, which is my barcode program. And I’m just going to give it some information for the barcode, Eradani, Inc. And I’m going to say Berkeley CA 94707, and then subproduct, whatever. And I’m going to basically just print this label for a whole bunch of our 999 Reese’s Cups, because that’s what I’m feeling like right now. And I’m going to run my program. And that’s going to call out to an open source program, again, same thing. One line of code on the CL side to call out, one line to call back in. And what it got back, if you can see this window right here, what it got back is this file system path. It’s telling me where it saved the barcode to. So this is the key. This is the important part here is 350,000. So I’m going to open up that barcode, which I have here in my file explorer. Now that’s saved as a base 64 encoded image. So I’m going to put that into my browser, and it’ll render it. This is what the barcode looks like. Now this is something that is extremely customizable. One of the key points that I want to bring up here is about how fast we can build things like this. I’ll show you the code in a minute, but this entire system from scratch to fully functional and deploying to the IBM i took me a couple of hours to put together. I did it in an afternoon because these open source tools are so powerful. I have an open source tool for drawing the label. I have an open source tool for making the barcode. Everything that I need is in there. So this is, by the way, also, I just want to point out that this is a real barcode. If any of you happen to have a barcode scanner handy, you could actually scan this. It’s for a UPC code, and you will be able to scan that. Now let’s take a look at the code, just like last time. We’re going to hop over to this example. I’m going to show you the CL first. Now if we look at this program, you’ll see something very similar. Actually, the program is hardly any different from the last one. Basically what I’m going to do is I’m going to say, call ECC send request to the open source program. I’m going to put in a bunch of variables, this customer address, city, state, zip code, product, quantity, and code. When the open source program is done, I’m going to say receive response. That’s it. That’s my CL code.
Could you show them just the GitHub repository with the RPG code? Yeah, sure. Why not? All right. Let’s open that up. So that’s going to be github.com. Let’s open this up. All right. Now, actually, here’s a good thing. So I just went to this repository. It said, oh, this branch had recent pushes just two minutes ago. So I’m going to switch to that. You can see it has my message set electrification level to 35 characters. I’m going to go to my SRC interfaces. Actually, you know what? You don’t have to do that. Let me just click on this commit. And it’s going to say, look, length 15 was changed to length 35. All right. So this is all up in the cloud in GitHub. So this is all safe. I don’t have to worry about spilling water on my computer or a power failure or whatever, anything going wrong on my systems. This is all stored safely using Git. You want to show the RPG program? Yeah, sure. And we can hop into the program and then go into my SRC interfaces. Now, this was the display vehicle. So that’s this one. Here’s my CL code for this demo. And just like all the other ones, if you look at this, call PGM, ECC send request. Actually, let me zoom in on that. ECC send request right there, just like in all the other ones. And down here, ECC receiver response. And that’s it. Great. Terrific. Well, thanks, Aaron. I appreciate it. Let me get back and we’ll just wrap this up. So basically, what we covered today is we covered the IBM i in the cloud. We covered how you can call out from the IBM i to open source, how you can use open source free components in your IBM i applications, how you can call into the IBM i from open source and then open source DevOps for the IBM i. So I hope you’ve learned a lot about the kinds of things that you can actually do with the IBM i to extend your applications and to use the latest, most modern technology. So you keep your IBM i over here on the right side of the screen instead of the left side of the screen. And if you need any more information, you can visit our website at www.eradani.com or send me an email or send Aaron an email and we’d be happy to reply. Otherwise, thank you so much for attending the webinar today. Thank you all.