Three Ways AI Can Transform Your IBM i Development Today
AI is already transforming how smart IBM i shops approach development challenges. This session explores three immediately applicable AI techniques that can multiply your team’s productivity and dramatically shorten onboarding time for new developers.
First, we’ll demonstrate AI-assisted RPG code generation that can handle complex business logic while maintaining your coding standards. You will see how this allows non-RPG programmers to become immediately productive while it significantly increases the productivity of your existing staff.
Second, you’ll see natural language processing applications that can automatically generate documentation from existing code and translate business requirements into technical specifications.
Third, we’ll show intelligent code analysis tools that identify optimization opportunities, security vulnerabilities, and modernization candidates in legacy applications.
Each technique includes live demonstrations using real IBM i codebases, practical implementation guidance, and honest assessments of current limitations. Whether you’re skeptical about AI or ready to embrace it, you’ll leave with concrete next steps to start leveraging these tools in your development workflow.
Transcript
Dan Magid
Great. Thank you, Patrick. I appreciate it. That’s fantastic. Yeah. So we’re going to get into a little bit of. All right, I love it. I just see in the chat that somebody’s mind is already blown, so I’m in perfect position to get started now. Right. So. All right, so we’re going to talk a little bit about AI and using AI. And so I’m going to give you a quick introduction into some of the real use cases we’re seeing people use AI for. So some of the things that people are using things for today, a little bit of how you can integrate AI into your day to day processes. And then Aaron’s actually going to going to spend most of the time giving you a demo of using AI for your development. So, so real quickly, let me go ahead and share my screen.
Dan Magid
Okay. And you guys should see the PowerPoint screen. Okay, great. Let’s go get into it. We’re going to talk a little bit about some of the ways you can use AI. In fact, we’re going to throw in some more beyond these three here. But one is just application generation and code transformation. We actually had one of our developers who decided just for fun, to create an entire application just with AI. He started with zero and created an application that had database tables and views, that had screens, that had RPG programs, CL commands and. And he created it all simply by dictating to the AI what he wanted it to do. We’ll talk a little bit about automated documentation. So taking one of the things that programmers do in their spare time, of which they have none, and say, let’s just get that documentation done for us automatically using the AI and then we’ll talk about looking at your code to figure out are there optimization or modernization opportunities in our code so we can move things forward and have AI help us in that process. And as we’re going, as Susan said, if you have questions, please put them in the Q and A. Aaron’s going to be monitoring it while I talk and I’m going to be monitoring while he talks to make sure they go in the QA rather than in the chat. So just a couple of things that people have told us why they have adopted AI in their organization. One is that they’re able to just move so much more quickly now with AI. They’re able to generate more features more quickly. And they’re able to actually hand off a lot of the repetitive, boring kinds of coding tasks that they don’t want to do anymore. They give it to the AI, the AI does it. The other thing is you can start taking your knowledge about how you do development, what are the best practices that you use in your organization. And you can have the AI generate the code using your standards so that you’re getting code that’s being built according to the standards you have. And you can quickly learn the purpose of obscure programs, programs you don’t get to very much. And you now need to make a maintenance change. You can ask the AI to tell me, what is this program doing and how does it do it and what else does it interact with? If you’ve got new developers coming on, maybe they’re not RPG programmers. You can allow them to start maintaining and working with RPG code. We have one of our developers was working on a project, he’s a JavaScript programmer, never worked with RPG, but we got a support call from a customer, had to do with some RPG RPG code, and he was able to get in and actually fix the RPG code and get them up and running using AI to do that work for him, and then your ability to accelerate delivering production benefits to your end user. So what we’re seeing are 30 to 50% increases in the speed with which you can deliver new features. These are some of the things that people are doing that we’ve worked with. People are doing so doing code translations. Turn my code into RPG free, or change this module that I’ve got currently written in cobol into a JavaScript program, or create wrappers around the IBM I code for me. So there’s lots and lots of things you can do with the AI. I talked about documentation generation. You can create test cases, you can have the system automatically generate test cases for your application, and you can use it to help you understand where problems might be occurring. And you can integrate that with tools that actually use AI in your environment. So a lot of the tools out there in the marketplace today are currently integrating AI. So this is just an example of SonarQube. SonarQube is a tool that will examine your RPG code. So it has RPG support in it and it’ll tell you information about your code. Are there vulnerabilities in it? Are there problems? Are you using things that are not standard ways of doing things? So it’ll actually analyze your code and give you a lot of information about your code. In fact, I have an example here. Here. This is actually a sonarcube report coming out of RPG code. So looking at the RPG code and giving you information about what might be wrong inside your RPG code. And again, it’s using AI to understand the code. Of course, one of the problems was if you are doing those tools, you need to get your RPG code into directory structures because most of these tools want to work in directory structures. They want to work with tools like Git. You want to be able to get your code into those environments. Again, you can use tools to get you there. So you can have, if we go back over here, I can have all my RPG code sitting here in a Git repository that, that, the, that that those tools can access.
Dan Magid
So we’re going to take it. So, so I’m going to turn things over to Aaron now to do some demos to show you this stuff. He’s going to show you, you know, code transformation. How do you do that with, with AI? We’re going to look at documenting the, the what’s in the code using AI and then looking at some other ways of generating test cases and then looking at explaining your code. Aaron, I’m going to go ahead and turn things over to you to show people that.
Aaron Magid
All right, cool. Well, thank you for that introduction. If anyone’s been watching my face while Dan was going through that stuff, you probably see me with an ear to ear grin because I am very excited about this technology. It’s definitely disruptive. Things have changed very much. I’m actually going to go a little bit farther than, than, than what? I guess maybe a little bit stronger or a little more blunt than, than Dan goes in his presentations in saying that I basically don’t write code anymore, which is strange for me because I’ve been writing code since I was a kid. But it’s, these tools are so phenomenally productive that what my role has transitioned into is really more designing and understanding business rules and understanding what my system needs to do than actually coding them. It’s more of a, of an architecture and explanation work than an actual coding. And so what I want to take you guys through here is, is some practical strategies that we can use in this AI age to actually take advantage of these technologies. Because I, I believe that they are, if not already at the point, then very, very soon at the point where we can’t ignore them and, and where we really are going to have to be using them all the time again just because they are so incredibly powerful. So let’s, let’s jump in, take a look at some, at, at some, some stuff here. So first thing that I wanted to bring up here, I saw a question in the chat and I wanted to bring this one up. This is actually not because of the question in the chat about, about older format rpg, but this was actually already planned. Just nice coincidence somebody asked about it. So what we’re going to talk about here is going to center primarily around this program. I like using this one for a couple of reasons. One is it’s relatively simple for us to see, so we can see, you know, we can wrap our heads around what’s happening here. One thing that I see with AI tools often when I’m working on them in project or working with them on projects is that they know more than I do and so they’ll go off and they’ll make large changes. It takes me a while to catch up to, to what they’re doing. So going to start with this program and this may bring back memories for some people. So we have a, we have an RPG program here, right? I’ve got a fixed format program here. That is, that’s for anyone who’s, who’s not familiar, right? Taking in a number, multiplying it by a hundred and returning the result, right? It’s basically what I’m, what I’m doing with this program and what we’re going to do here. I want to use this as an example of what I’ve seen grow in, in the tech, in the AI space around assisted development, around documentation and we will also touch on transformation for people who are looking at that kind of thing. So starting off here, right, if I want to work on this program, first thing I want to do is I want to establish an ability to call it in a way that we can all see. The way I’m going to do that is, is through an API interface. So I have a, an API that I’ve generated around this RPG program. If I hit my API, it’s going to call the program I passed in. The number is 938472 and it gave me back that number times 100, right? Relatively simple test case here. It went in, called the program, got me the result back. So the question here is, okay, now I need to make a change to this program, right? I’ve generated this interface and I need to actually do something. But I’ve got a problem. I’m not an RPG developer, right? I don’t, I don’t actually necessarily know how to work with this or potentially I, you know, I’m not familiar with the, with the column based format because I’ve been in free format, you know, for my entire career on the ibmi. So what I’m going to do here is I’m going to jump in to my assistant and I’m going to give it just one little simple thing for it to do. I’m going to start off by saying, can you convert my simple calc RPG program to free format, right? So I’m just giving it a relatively simple request. Go look at the code, understand what it’s doing and, and change how it’s working, right? Change, change the, the formatting. Actually, actually to correct that. Not changing how it’s working, I’m just changing the way that it’s coded, right? So it’s going to go through, it’s going to figure out, okay, how do I actually update this source code to work with the free format definition style? And then it’s going to go over and it’s going to actually ship that program up, it’s going to compile it on my IBMI and go make sure that that compilation is successful, right? So it went in. You can see, actually my log down here. I don’t know if that’s too small to see, but you can see that I’ve got a log down there that says, okay, my simple calc program has been recompiled, it is in my library, it’s ready to go. And if I go back and I hit that endpoint again, right? I come back, same result, right? Not particularly flashy, but definitely a useful tool, right? As I’m going through and working with these programs, I can have it just go make a change because it understands the language even if I don’t. Right now there are tools that’ll do that. There have been tools around that’ll do that kind of thing for a long time. So I’m going to give it something a little bit more complicated, something that, you know, I could have done this even though I’m not an RPG developer. I could have, you know, I could have figured this out. I’m going to give it something more complicated and I’ll explain what I’m doing once I give it to the, to the agent, because it’ll take it a minute. What I gave it now is I said, okay, great. Now can you update the simple calcrpg program so that it uses this small num as the input to read out of a physical file? And what it’s going to do is I want you to use that small num as the identifier to go locate the record, locate a customer record in the database. And then pull out the balance due in that database table for that customer. Right. So that’s basically what happened. Doing. I have it actually making a change to the program. Now. If we look at what it’s thinking about, it’s actually kind of cool that you can, you can see how the agent is thinking. It changed my code, realized that it wanted to do something through SQL and now it’s going back over to my compilation process here, to my, to my compile commands that I have in my environment and it’s updating them so that this program is going to be compiled with a Create SQL RPGI rather than, rather than a create bound rpg. Right. So it’s changing the command around and going through and compiling it. So I got my result here, compiled, done. Let me give this another shot to send that call again. And this time what I get back from that 938472 is 3700 and that is there because now it’s actually going to the database running a query which actually I can pull up here. We can see the old code here. You can see that it’s going in and it’s actually running that query, grabbing the result. It’s still multiplying it by 100, which is why we get 3700, because it’s actually 37 in the database. But that is an update to the RPG program. Right? The program is now doing what I asked it to do. And again, I’m not an RPG developer. This would have taken me a dramatically longer time to actually implement myself if I was, if I was actually trying to do this on my own. Right. And you know, Dan started to mention this kind of thing or this, this story, but we, we actually have a, a developer who works at Erdani who came onto a project, is an open source developer, you know, never worked with IBM I code before and he had a requirement that required building a series actually of RPG programs with, with screen interactions, with database interactions on his own in order to complete his project, in addition to the open source code that needed to be written. And he went in and he built it and we put that through testing. Obviously we went through and we reviewed it, we made sure everything was good. But he was actually able to, to work on the application and build a whole system from scratch without actually needing to be an expert in the language. Right. And that I think actually gets me into a major point that I’ve seen in the development of these technologies, which is actually, I can give you an example that’s not a technical example for Anyone who has a recent phone, I forget which lines do it, but I have a Samsung Galaxy phone. I know that they, that they do it. There are features coming out that do things like live translation, right? Where I can have a phone conversation with somebody in a language that I do not speak, right? Because I can express what I need or, or my thoughts in English. And the phone can translate it real time into another language that the other person speaks and then bring it back. Right? For all the Star Trek fans out there, it works. It’s, it’s, it’s very reminiscent of a universal translator, which is awesome. This is very similar, right? In that as engineers, we all know how to take a requirement and translate. You’re at a business level and translate that into what needs to happen in the application. What’s happening with these tools I think is, is a separation between the actual coding, the actual syntax of the language and the high level business rules. Meaning if I can explain what needs to be done, I can have that built even if I don’t actually know if I’m not an expert in the language that it’s actually being built in. Right? Case in point, I’m not an expert in rpg. I actually am not. I, I actually don’t know that I would have been able to write this myself. I probably could have hacked through. It might have taken me a couple hours to get there, but I could have tried, but I didn’t have to because what I did is I said at a high level, I need you to update this program so that it will use this variable, small num variable to read from this database table, pull out the record and then pull out the balance due. And I want to, I want you to return that. Right? So I gave it the business rule that I needed and it translated that into the actual programming language that’s present here so that I don’t have to be an expert in, in RPG syntax to make this work. And that actually goes the other way too, right? It doesn’t have to just be allowing me as someone with an open source background to edit RPG applications. We actually have seen this for a long time going the other direction. Meaning let’s say that I’m an experienced RPG developer and I have a use case that is not so appropriate to implement an RPG. It’s, it’s better to put it in something like JavaScript or Python. It’s going to handle that particular task more efficiently, right? And that’s a pretty common thing, especially when you get into web integrations, right? If you’re building. If you’re building integrations that go across the network, you’re probably going to find fairly quickly that languages that were built for network interactions, that were designed for the Internet are going to have better support for network operations than for example, rpg, which wasn’t designed for that. Right? Doesn’t mean you can’t do it, but you’re going to find that it’s more streamlined. And to give you an example of that, say I want to do actually I, I use this a lot.
Aaron Magid
Let’s say this is actually a real use case. I have a message from a user and I want to do some sentiment analysis on it. I want to understand how is this user feeling in this particular message, right? Manually. I can take that message, I can dump it into chat GPT and I can ask it how is this user feeling? How you know, what’s the sentiment behind this message? And I’ve actually personally done that before with emails that are somewhat. That if I’m not sure and want to make sure that I’m responding in the appropriate tone, that’s something that I do periodically. But let’s say I need to do this in an automated way. For example, I’ve got customer support messages coming in and I want to flag something if I got, if I have an angry customer, right, I might want to give them a little bit extra care. So what I’m going to do that is I’m going to take the data from my IBM application and I’m going to have to ship that out to an AI model to go do the sentiment analysis for me, which involves calling an API and building out requests and parsing responses in flexible formats like XML or JSON from that AI model. That’s a task that is a lot easier in a language like JavaScript. Right? But let’s say that I don’t know that language. What I’m going to do is I’m going to apply that same philosophy that I just used for me as the open source developer on the rpg. I’m just going to do it the other way around. So what I’m going to do here is I’m going to say, okay, I need to generate an integration and go through this pretty quickly.
Aaron Magid
All right, I’m going to go in here and I’m going to say, okay, generate this integration. It’s going to say, check the sentiment of this, of this user. And once I do that, just to help us move a little faster, I’ll give this to the AI to work on it while I explain it what I’M going to do here is give it a prompt for what I want it to do and it’s going to generate a whole bunch of open source code for me that’s going to actually perform this operation triggered from my RPG program. So what my process is doing is I gave it the specs for an RPG program. I gave the name, actually that I wanted to use, generated the RPG that’s bound to an open source program written in JavaScript, technically TypeScript for anyone who’s looking really closely at it. And now what I’m doing is I’m saying, okay, I don’t know how to work with this stuff, this, this language. Can you update it for me so that when I get a message from a user, my prompt says this endpoint should analyze the sentiment of the user’s message and rate their satisfaction on a scale of 1 to 10. So run this prompt, send it over to an LLM. The prompt is going to be, you’ve been tasked with analyzing the satisfaction of a user and rating in a scale of 1 to 10. So that’s what I’m going to send over to my, over to my LLM. I’m going to use claude, not GPT, but could do it either way. You’re going to rate it on a scale of 1 to 10 where 1 is completely unsatisfied and 10 is completely satisfied. The message from the user is here and I told it I want you to stick the user’s message in there, right? That’s, that’s what I’m asking it to do here. Return only the rating as a number between 1 and 10 in a set of XML tags, right? So I basically told it exactly what I wanted to do at a high level, but I didn’t actually write any of the code, right? And so if I pull this up, I have now a whole bunch more code in here, right? For example, you can see here, here’s my prompt, right? It says you have been tasked with analyzing the satisfaction of a user and rating on a scale of 1 to 10, right? So that, that’s that prompt that I was mentioning earlier. So this process generated my rpg, generated the open source code for me. I’m going to run some automations here to compile that program, ship it up, and I’m going to run a process to compile the open source code so I get those both ready to go.
Aaron Magid
Give that a second
Aaron Magid
and then I’m going to reset my application so that I can get, so that I can actually access that updated object. And then what I’M going to do here is I’m going to jump over to my 5250. Let’s maximize that so we can actually see it.
Aaron Magid
And I’m going to run this program that I just generated
Aaron Magid
and I’m going to give it a message, say something like,
Aaron Magid
right? Give it a sort of middle, you know, sort of middle sentiment message. And what my program is going to do is it’s going to give me this spool file output that’s going to say here’s your message. And I got an 8 back to my back in my RPG program, right? So my program just interacted with an LLM. It got the data out, it actually processed the response. It did some XML parsing, some JSON parsing, talked to the LLM, authenticated, ran the call, got everything back, parsed it out for the RPG and got it back in a, in a data structure in my RPG program. Which means that I’m ready to go, right? My RPG now has access to this functionality, right? So the key point here is whichever direction I’m going, whether I’m an open source developer and I need to get to the IBM I code or if I’m an IBM developer and I need to get to the open source code, if I don’t know the other side, I don’t actually have to. I just need to know what I need to do in the application in order to instruct the coding assistant to do exactly what I need it to do. And, and a key point here is that these coding assistants are getting smarter and smarter over time. Just, just to tie this back to the, to the intro that we got, you know, one thing that you’ll find is these tools also understand a lot of different coding paradigms, right? Meaning, for example, in this open source code, recursion is there all the time, right? These, these open source programming languages that is a staple in these languages. And if I have a high level understanding of what I need to do, I can tell it do this using recursion, right? And it’s going to do it, right? Obviously it’s good for me as a developer to understand what these terms are and to know what they are, I need to understand them from a high level perspective so that I can use them effectively. But I don’t actually in the open source language, right? I don’t necessarily have to know the exact syntax between different languages for a language I don’t use for how to do it because if I understand the high level, I understand how and when to use it, right? And I understand what it does, which is why a presentation, you know, like, like Patrick’s presentation is really important. If I have that, if I understand that concept, then I can, I can now use that, right, without, without having to worry so much about the, the particulars of the syntax. So this is a process that I’m seeing people use every day. It’s something I’m using every day. You know, like I mentioned primarily, I’m not actually coding anymore, right. I’m usually actually, even in the languages that I know, I’m frequently using these tools and, and what I found is that it’s, it’s making me a lot more effective in these technologies. So again, these are all things that you can do if you have, and you know, if you, the, the tools that I’m using here. I’ve got Visual Studio code, I’ve got Obviously my, my IBMI, my 5250, right. These are all tools that, that we can jump in and we can actually use. These are, these are things that are here now ready to go. So if you haven’t used them, I strongly encourage everybody to do it because I, I, I believe personally that these tools are now that they are, they were originally just a cool thing. Now they are encouraged in most organizations that I see. And I think that what we’re going to see soon is they’re going to start being required, you know, that it’s, it’s not going to be optional anymore pretty soon just because again, the, the speed with which we can do things is, is kind of absurd. Now there’s a blind spot here that I want to take a look at. And what that is is a fairly logical question, which is I have this AI coding system, right, that’s editing my application, okay? But, but Aaron, you just modified a five line RPG program, you know, that has, you know, a very simple business logic. How am I going to use this if I have a hundred thousand objects in my IBM application, right? So that, it’s a very important point and we’ve actually also seen some pretty powerful processes around that. So I want to make sure to give you guys a suggestion for what I’ve seen that has worked very well in this type of application. So what I’m going to do is I’m going to go back to my editor environment here. There’s, there’s a couple of use cases here for what I’m going to do here. What I’m going to do is have the system document my application, right? And the, the obvious, I think initial point there is let’s say that I have been working on my IBM application for a long time and we’re bringing on new developers, right? Expanding the team or potentially replacing people who are retiring. Right. I need to make sure that those developers are able to work with my applications. So what I’ve seen work very well is effectively what I’m going to do here. So what we’re going to do is I’m basically just going to say to my assistant, now that you’ve updated my RPG program to run as, as that SQL RPG format so that it can actually work with the database, can you go document that? Right. And my assistant knows exactly how I want my documentation done. There’s a couple of pointers that I want to put in here that I think are, are important that, that I. I learned the hard way. So hopefully you can learn them the easy way. Number one is we’re documenting module by module and also documenting the relationships between them. Right. If you’re working with an IBM application, there’s going to be a lot of interrelationships, right. We need to make sure that we tell the AI to focus on how the objects in our application interact. Right. Another piece is we’re focusing on interfaces. Right? How do I call this? How do I work with it? Because that’s the base point that we need to get started with a program, right? Once you can call and recompile a program, you can get a lot done just by trial and error. Right? And. But the most important part is I’m not actually generating documentation for humans. And I think this is a, this is a really important point that, that may be less intuitive. So I want to, I want to focus on it for a second. This documentation is designed for an AI coding assistant. I’m not making documentation designed for people. I’m making documentation that’s intended for an AI to consume. Because the assumption is that whether I am editing using an AI coding assistant or if I’m transforming automatically or, you know, letting it loose and letting it just do whatever it wants to do. Right. I’m going to need the assistant to understand my application. So this documentation is, while it is human readable, it is also, it is primarily designed for my assistant. Right? So what I can do now that it’s generated that documentation, do something along these lines. I’m going to clear its memory so it has no memory of any of the work that we’ve done before. And I’m going to say I need to call the Simple Calc RPG program, which it now knows nothing about, because I Started a completely different context. What parameters does it take and what library list entries do I need for it? Right, well, what it’s going to do is it’s going to jump in and it’s going to say, oh, there’s a documentation file here and actually sees this dot docs there that I had it create. So that’s this file. So it’s going to go read this and then looks like it had a question. So it’s going to go look at the source and try to understand if there’s anything that’s not clear from the documentation to make sure that all that’s accurate. And then it’s going to come back and it’s going to answer my question, is going to tell me about this program and give me, most likely, usually when I ask it this kind of thing, it also gives me an actual sample because I told it I need to call. The program usually gives me a call command and, you know, a CL example and an RPG example. Right? So it’ll think about that for a bit and then it’s going to go and, and do that. Right. So again, this is an example of what I do getting into an application that I may or may not have the information to work with. And there’s an important point here, which is that the recommendation that I make to shops that actually jump in and do this is you got to do it now. Meaning if you’re concerned about the knowledge about your application leaving, right? Whether it’s you who’s leaving or if it’s someone else on your team who might know the application deeply. You know, most shops that I work with, there’s, you know, one or two people, you know, who are kind of at the core of everything, who know the application better than anyone else. Right. And, you know, and, and when those people start talking about leaving, it’s sort of, you know, everybody panics, right? We gotta, we gotta make sure that we’re preserving their knowledge. Right? So this is a piece that’s very important. When I generate the documentation now, I can actually use this and have my existing experts look through that documentation as they’re working and make sure that the AI is doing things in a reliable way. Right? You can actually, while we still have that knowledge in house, we can actually use that to correct or improve or clarify what the AI is doing. You can teach it, you can talk to it to make sure that what you end up with is effective so that when that knowledge leaves the company, you can bring in developers who are good developers, may or may not be IBM I developers who can actually work with, with your application. So I see we have a bunch of questions, so I’m going to jump forward here. The last thing that I wanted to do here, since we’ve documented our program, we have called it from an API, we have changed the business logic with an AI assistant. Last thing that I’m going to do is I’m going to say this is actually a request that I get a lot and start another new task. And what I’m going to do here is I’m going to say, all right, I have been tasked, I have been asked to transform the Simple Calc RPG program out of rpg. Can you do that for me? Right. And the critical piece here is this is going to build on everything that we’ve done before, right. I have just to list out some of the pieces here. I have my assistant that can read the RPG code. I have all of my IBMI code in Git, which means that my assistant and my editor have access to the entire application to cross reference between other files. It’s actually what it’s doing right now. It’s actually looking at other, other files and other programs that relate to it so that it can update them. Right. I have documentation of the program that is AI centric, Right. So that it understands what needs to be done and when to update this program, what its business rules are. Right. And I have automated builds that allow my assistant to trigger a compilation of the program easily and read the results. Right. When you bring all that together, that means that my assistant is able to look at the code, make whatever changes are necessary, understand what the business logic requirements are, compile it, get feedback from the compiler. Right. And correct any issues that it might run into. Right. So, and, and I want to focus on that for a second before I jump into the questions. And while it works on this, that the, the build feedback is also very important. Right. Meaning I’ve got my assistant in an environment where it is actually able to test the code that it’s writing and it’s actually able to compile it so it can get feedback from the, from the compiler and from the IBMI so that it knows that what it generated is correct. Right. And it looks like actually it might be just about ready. Yeah, it’s going through and compiling it now. So what it did here, for anyone who’s not familiar with this language, is it generated some code here that is going to take in a number and then it’s going to go run the query that it pulled out of that simple CALC program, it’s got some error handling in here to deal with whatever result it gets back and to multiply it by a hundred, because that was part of the logic there. And then it’s going to return it. Right. And so this, this function is entirely available in my system. I’m give it one second to compile and then we’ll be able to go ahead and call it and see what it generated. That one more second.
Aaron Magid
All right, I’ll go ahead and restart it.
Aaron Magid
Okay. It’s generating some documentation of that while it does that, but. And I’ll leave that off for now. And so what I’m going to do here is call this program again, run this endpoint again, and what you can see if I look at this is I passed in the number, I got back that result again. This time if I look at my logs, I can see that it says I’m looking up the customer balance. And it ran this query. It didn’t call the program, it didn’t call Simple Calc anymore. It connected to the ibmi, it ran this query, got the result back, did some processing, and then return the result. Right. So this program has effectively been transformed. And I have seen companies actually use this strategy to maintain programs, to document them and if it’s in their plan to actually transform and decommission them. I’ve actually seen that process. And the last comment I’ll make about it is that process I used before where I allowed my RPG access to call out to other languages can be used in this environment to get this functionality that I just transformed accessible to rpg. Meaning in turning off this RPG program, I’m going to have other programs calling it. What I can do is I can direct them now at the new open source version. Right. And that means that I can actually take that program out of the flow if I need to. Right. I can actually pull that program or that segment of the application fully out of the process if, if I need to do that. And I’m doing that without, without fully knowing both of the technologies that I’m using here. So I’m going to jump into questions now. I hope that was useful, but there are a couple of questions I want to make sure that I, that I jump in here and I hope that some of those technologies are useful. So going through really quickly, first question, have I configured client to let it be aware of how to compile the code? How did it do to make file parts? Yeah, that’s actually a tool that I use. That’s actually my company’s tooling that basically allows me in VS code to trigger a build of the IBMi of the IBM I code. It generates that, that make file and generates all the build rules and all the automations so that I can compile the programs. So that’s, that’s, that’s a tool that actually, that, that took a while to, to get set up. But I, I think that actually touches on a critical point which is that our focus here is to build tooling is to set up tooling in our environments that allows our, that allows these industry standard tools like, like Klein, the AI that I’m using here to, to work with my, with my system. So the, the build tool that I’m using is not an open source tool that the, the compilation tool is is a proprietary tool that my company put together that I use in my, in my environments. And the, and the AI here is Klein
Aaron Magid
next one. The software you’re generating, you’re using to. Sorry, sorry. That was Jenny using to. To generate those endpoints. Yeah, so yeah, there’s a distinction here between. Yeah, between generating and calling. Yeah, I’m, I’m also using some proprietary tooling to generate the end. To actually create the endpoints. But for calling it. Yeah, I’m using Postman and yes, I see the discussion here. Thank you everyone who jumped in there. There. There are, there are a lot of alternatives to Postman and you know, tools that you can use to, to call endpoints. Great question, James. What does it do? What happens if the program the AI agent created didn’t compile? Happens all the time? All the time it does that. And what it does is that’s why that build tool is so important. The build tool allows it to compile it and get the feedback. So my AI has been instructed with a process here wherein it runs compilation anytime it makes a change, checks the results and then if it’s a failure, it attempts to resolve the issue and it actually has a further step where it actually attempts to reference other RPG programs in my, in my code base if it can’t figure out the error. Right. So it actually looks for examples throughout the entire code base of what it’s trying to do. If, if it can’t resolve the compilation error on its own, usually gets it sometimes for more complex things it needs to go look up what it’s doing or what it needs to do. All right. Open source programs. Great question, Nick. So in this particular case I’m generating open source programs in Typescript. I have just found that that’s a really complementary language to rpg. So I use it for building, for building rpg, for retrofitting RPG programs because I just found that it, the, the features that it has are, are neatly complementary to. To RPGs features. So that’s what I do. But, but I see people do this kind of thing in, in Python and C Sharp and other languages too. It’s. It’s also doable in there as to where they’re stored. They are. It’s actually running on my PC. That’s where I’m running it right now. Most people, when they deploy it, Node JS runs on the IBM I. So you can deploy it there, or I’ll see some people run it in Docker on Linux. See that a couple of times. The AI can in fact decide what language to use. I wouldn’t generally recommend that, though, because the more freedom you give the AI, the more room it has to hallucinate and make crazy decisions. So, you know, there’s a, there’s a sweet spot there for how much freedom you give it and how much you specify. In this case, I usually recommend telling it what language to use just because, you know, changing languages will massively expand the field of what it could come up with.
Dan Magid
Aaron, you just got a couple. I want to make sure we leave. Patrick?
Aaron Magid
Oh, yeah, sorry. Yes, thank you. Okay, so really quickly here. Modularization we can talk about separately if you’d like. I can document existing programs. That is something that we do. The LLM behind here is Claude. That’s the actual one that I’m using behind Klein, which I found gives the best results for coding. And the documentation was generated from. Yeah, so the documentation was generated strictly from the RPG program. That is everything there. I, I do have standards for how it should do the documentation. So yes, Ryan, I do have a model for how it should do the documentation, but that’s just structural. That’s just telling it how I want it to be formatted. And then all the information is being pulled from the rpg. All right, with that I will push. I will send it back over to Patrick to continue. Thank you very much for the, for the extra couple minutes there for the questions. Thanks to all three of our very talented and experienced speakers. Well, thank you for having us.
Dan Magid
Yeah, thank you, Susan. Thanks, John. Thank you so much for setting this up. And Patrick, thank you for a great presentation.
Aaron Magid
Thanks, everybody. We’ve got three more lunch and learns coming up next week, so there’s more to come. Hope to see everybody then.
