Webinar Icons Time

Session Time

1:19 Mins

Webinar Icons Date

Thursday, November 13th

12:00 PM - 12:45 PM CST

Recursion, Recursion, Recursion

with Patrick Behr
Why write endless loops when your code can elegantly call itself? Patrick will demystify recursion and show practical examples in RPG and SQL – perfect for cracking hierarchical data problems. With this superpower in your toolkit, you’ll be ready to replace clunky iteration with clean, powerful recursion.

Three Ways AI Can Transform Your IBM i Development Today

with Dan Magid and Aaron Magid

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

Susan

You want to put your chart.

Susan

Hello everybody. Welcome to today’s lunch and learn. Gonna still got another couple minutes to go, but welcome to the session. We’ll have you have the, the chat where a lot of people like to tell us where they’re calling from. Oh, Bour, Montreal.

Susan

Welcome. Welcome everybody.

Aaron

Wow, man, we got a lot of.

Susan

People coming in early today.

Patrick

Park uk. All right. Switzerland.

Dan

It’s getting late for you Europeans.

Susan

That’s right. India as well. So they may be watching the recording.

Aaron

You just think about like the insane level of infrastructure and technology that’s required to host a, a video session for people in this many places. It’s just to me is just mind boggling.

Susan

Incredible. Yeah, 6pm, not so late.

Aaron

I think we have more than, more than 200 people from outside of the USA. Everywhere from Australia to New Zealand to China to South America. You name it, they’re in there.

Susan

All those Canadians can.

Aaron

Sorry, I’m. I meant to say North America. May I told you.

Susan

All right. I do believe it is just about time to kick this thing up. So welcome. I see people still putting in their greetings from wherever they’re calling in from today. Calling. Good old fashioned terminology there. Welcome to the summit lunch and learn. I know most of you have probably been to a number of these already. Just this in this last two weeks. But just in case never hurt so much. A little bit of a reminder of how we do things here. First of all, you remember the format. The format is that we have the sandwich. We can use a sandwich analogy. I keep switching analogies, but we’ll say the sandwich analogy where Patrick is going to supply our bread on the outside of the sandwich. You’ll have the first part of the session and the last part of the session and in between we’re going to have the meat or the main part of the sandwich for those people who don’t eat meat, maybe we have the maggots. Dan and Aaron will be talking to us about AI and transforming our development with AI, which should be really interesting. Not that recursion isn’t interesting. Patrick. I’m looking forward to that one as well. So that’s the format. Another quick reminder that please, if you have content questions, I.e. questions to the speaker that’s actually showing slides or demos to you. Those should go into the Q and A tab. So Q and A for content, questions, chat for just what you’re doing now. You know, lots and lots of people writing in, saying hello or where’s the handout or you know, I can’t hear or you know, things like that. And, and actually a lot of good community discussion goes on. A lot of times people are just sort of chitchatting about, yeah, I’ve done that before, you know, and, and that’s cool too, you know. So it’s a good community place, the, the webinar chat. But just remember your questions, your actual content questions. The speakers are going to be looking in the Q and A for those. So please, if you want to get an answer, that’s the place to put them. And with that I am going to quickly introduce one of our other new system I developer partners in the Summit Lunch and Learn. Patrick Baer is joining us and he is, he actually did one of these lunch and learns for us last year as well. So some of you have probably seen Patrick before and I’m sure you’ve seen him before in other places as well because he is well known in the community for all his technical expertise and today he’s going to use all that technical expertise to talk about recursion. So take it away, Patrick.

Patrick

Thank you Susan and thank you Dan and Aaron for sponsoring this is the system Ideaveloper Summit Lunch and Learn. And I am Patrick Baer and we’re going to talk about recursion. Recursion, Recursion. What the heck is recursion? Well, recursion is when a function calls itself and we’re going to look at a couple of ways to do that with RPG and SQL. In RPG it’s going to be a procedure that calls itself. And in SQL we’re going to use a common table expression that’s able to reference the data that’s in itself. We’re going to have in the first half, the first slice of bread, we’re going to have a couple of very simple examples. We’re just going to look at how to do counting and then we’ll also look at how to do factorials using recursion. And then after we hear from Eridani, in the second half, the second slice of bread, we’re going to look at some more complicated real world examples of report distribution and how to parse through a bill of materials. So first we want to look at what is recursion with rpg. Again that’s a procedure that calls itself. So when you call a program, we have just a regular RPG program here on the call stack over here you’re going to have two entries, the program entry point and the main line of the program. This program is calling a sub procedure called test proc. When that happens, that Procedure is going to end up on the call stack. It’s going to have its own space in memory. It’ll have its own input parameters, its own local variables. It’ll be its own little thing. Now, notice here that this test procedure is calling itself. And when that happens, we will end up with a second instance of the procedure on the call stack. And this second instance of the procedure will have its own input parameters, its own local variables, and its own little space in memory. And then it can call itself again. We’ll have a third instance. And then as these procedures begin to return, it will unwind and they will come off of the call stack until we’re back at the main line of the program. So let’s look at the very simple example of just simply counting. So I’m going to create an RPG program. I have a procedure interface or an entry plist, and I need you to tell me what number you want to count to. So that’s the input parameter is what number do you want to count to? Now, first, I’m just going to demonstrate how to iteratively do this with a for loop, because that’s the obvious way to just simply count these numbers. It’s just a for loop from one to whatever number you want to count with. And we’ll just display that. So when you call the program with the number three, you will get 1, 2, 3. Pretty clear. But I also want to demonstrate how to do this with a recursive procedure called recursive counting. What we’ll do is we are going to send in the number we want to start from and. And the number we want to count to. When we do that, we’ll get 1, 2, 3. 1, 2, 3. Now, this recursive procedure, excuse me, has a couple of input parameters. The number you’re counting from and the number you want to count to. And it’s going to simply display the count from variable first, and then it’s going to check if we are not at the number we’re wanting to count to. It’s going to recursively call itself. Here, it will increment the number by one and then call itself and display the next number. And it’ll keep going until we get to the number we want to count to. So that is how that recursive procedure is going to work. So when you call the program with the parameter of 3, we get the two entries on the call stack for the main line of the program, and then it begins calling that recursive procedure. Initially, it’s going to call it with the number one. So this instance of the procedure has its own input parameters of one here. And because we’re not at the end, the number we want to count to, it’s going to increment the number and recursively call itself, which will then display the number two. We’re still not at the end yet. So we’re going to increment the number and call one more time. Now, the count from and count to are equal. So they’re going to begin to return and then finally go back to the main line and end the program. So that’s an example of simple counting. The second example we want to look at is factorials. And the factorial of a whole number is the product of all whole numbers between one and that number, and it’s denoted by the number with an exclamation point. So Here we have five exclamation point. This is five factorial. And you calculate that by multiplying 5 times 4 times 3 times 2 times 1. Now, what is this useful for? Well, you can use this to find the number of permutations. And permutations are combinations where order matters. The best example I could think of is if you have a choice of 4 cookies, how many different orders could you eat them in? Well, when you first get the plate of cookies, you have four choices. But after you eat the first cookie, you only have three choices, and then you only have two choices, and then finally you’re left with only one cookie and not really any choice at all. This would be 4 times 3 times 2 times 1 or 4 factorial. But now we all know the correct answer is that you eat it in the deliciousness order. Okay, but let’s see how many combinations we can come up with using rpg. So again, I have a procedure interface or an entry plist. I need to know what number you want to calculate the factorial of. And again, I’m going to just demonstrate the iterative version using a for loop. Now, this for loop goes backwards from the number down to one, but it’s still just using a for loop to do the calculation. Okay, I’m also going to show the factorial recursive function and how you can do this with recursion. And this is what that function looks like. We have the procedure interface with N. N is the number you’re calculating the factorial of. Now, if n is 1, I just simply return 1 and this will stop the recursion. You always have to make sure, no matter how you’re doing the recursion, that there’s always an escape escape valve and a way to get out so that it doesn’t continue on forever and blow up your system. Okay, so once we get to the number one, it’s going to simply return back the number one and be done. But if we’re not at one yet, we’re going to take that number and multiply it by the factorial of that number minus one. So this function right here is where we are recursively calling the procedure and it’s going to continue to recursively call itself until n minus 1 finally equals 1, where it will return back 1. Keep in mind there is overhead in calling procedures. The system has to manage the call stack. There’s local variables and those sorts of things. So for these couple of examples that we looked at, the iterative version was very simple and much more efficient. In the second half, in the second slice of bread, we’re going to look at some more complicated examples where recursion kind of makes more sense. So how do we do this recursion with SQL? Well, we’re going to use what’s called a common table expression. And a common table expression is kind of like defining a table in qtemp without the overhead of actually creating a physical file. In qtemp, we have a table identifier, that’s this name here. I called this dummy. We use the with keyword to define our common table expressions. And, and then what we are able to do is use this table expression in select clauses down below. So here what I’m doing is I’m creating a temporary table or a common table expression called dummy. And I’m defining the columns. It has the source column and an IBM required column. And I’m simply defining this as select the string sysdummy1 and IBM required from sysdummy1. When we run this SQL, unsurprisingly, we get two columns, source and IBM required. And the values for that is sysdummy1, the string and the value of IBM required field from sysdummy1. What’s cool about these common table expressions is that it can also select from itself. So here what we have is the first part of the statement that we were just looking at. This is called the prime read or the C seed data. And what’s going to put the data into this CTE initially. So this selects the string sysdummy1 and IBM required from sysdumy1 and that is now in the dummy table that we’ve created. Then I use the union all and I can select from dummy right here, this dummy CTE is selecting from itself where IBM required equals Y. So that record that we put in with the prime read is now being selected back in. And I’m going to return the strings CTE and the letter N. So when we run this, it’s going to put that data in there, and the result set that we get back will be both the prime read or the C data and anything that we we added with the union all. So in order to do simple counting from 1 to 10, my prime read or seed data is going to just be the value one. But then I want to union all and select out of the table the number incremented by 1 until the number is less than 10. And what that will give us back is the numbers 1 through 10. Excuse me, the factorial version. I’m going to begin my prime read or see data is going to start with the number one. And the factorial of one is one. Then what I want to do is select all of the records from the recursive cte. I’m going to increment the number by one to keep track of what number I’m on. And then I’m also going to calculate the factorial of that number. Here’s the incremented number, and I multiply that by the factorial of the previous number and I put that record back into the recursive state CTE. So when we run this, what we get is 1 and 1. This is the prime read or seed data. Then I increment one by one to get two. And I calculate the factorial of two by multiplying it by the factorial of the previous number. So 2 times 1 is 2. And then we increment to 3. 3 times 2 is 6 increment. 4 times 6 is 24. So the factorial of 5 is 120. And so that is all that I have for these very simple examples of recursion. And so now it’s time to take a break from that and we get to hear from Eridani. And Dan and Aaron are going to talk about three ways that AI can transform your IBM I development today. I’m very much looking forward to this.

Dan

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. 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 spend most of the time giving you a demo of using using AI for, for your development. So real quickly, let me go ahead and share my screen.

Dan

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 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 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. There are 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. A lot of the tools out there in the marketplace today are currently integrating AI. 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? It’ll actually analyze your code and give you a lot of information about your code. In fact, I have an example here. This is actually a sonarcube report coming out of RPG code, 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 kinds of 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. And 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

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 ways of generating test cases and then looking at explaining your code. So Aaron, I’m going to go ahead and turn things over to you to show people that.

Aaron

All right, cool. Well, thank you for that introduction. So 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, 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 we 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 100 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 through an API interface. So I have 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, it’s 938472 and it gave me back that number times 100. Relatively simple test case here. It went in, called the program, got me the result back. 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 IBM. I, 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 calc RPG 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 I’ve been 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 and 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 actually have 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.

Susan

It.

Aaron

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, that I think actually gets me into a major point that I’ve seen in, in the development of these technologies, which is actually, 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 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 programing language that’s present here so that I don’t have to be an expert 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, let’s say I want to do. Actually, I, I use this a lot.

Aaron

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, 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, it’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. Let me go through this pretty quickly,

Aaron

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 gonna use claude, not GPT, but could do it either way. So 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

Give that a second

Aaron

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

And I’m going to run this program that I just generated

Aaron

and I’m going to give it a message, say something like,

Aaron

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 aid 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 IPMI 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 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, 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, it’s going to make sure that all that’s accurate and then it’s going to come back and it’s going to answer my question. It’s 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 gonna 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

All right, I’ll go ahead and restart it.

Aaron

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 IBM I, 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, 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 the 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 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 comp. 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

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 has a. 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 complimentary language to rpg. So I use it for building, for building RPG or for retrofitting RPG programs because I’ve 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

Aaron, you just got a couple. I want to make sure we leave. Patrick.

Aaron

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 extra couple minutes there for the questions.

Dan

And by the way, I assume Susan will be able to respond to any other questions we got to in writing or via email or something.

Susan

Sorry, couldn’t find the mute button there. Yeah, yes, certainly you can do that. Or at the end of, at the, also at the end of Patrick’s session, you know, if. When he’s done his thing and answered his questions, you guys are welcome to hang on. Seems like there’s a lot of people really interested in this.

Dan

Great.

Patrick

All right, so I, I would give that a sentiment rating of at least 9.8. You guys, that was, that was terrific. So than you. So very much. All right, so now back to recursion. In the first part of the session, the first half, the first slice of bread, we looked at some really simple examples of recursion for counting and doing factorials. So now we want to dive into some more complicated real world examples. So example number three is going to be a report distribution program. So I have a table called Report Distribution. And in here I just have distribution list entries, right? So I have one for sales, where the sales 1, sales 2 and sales 3 email addresses are listed in there. So if you send a report to that distribution list, those folks would get that email. What’s interesting about this though, if we look down here in the office list down here, I can have emails in here, Office one, Office two and Office three. But I can also include distribution lists in here. And if we look down at the bottom with this all distribution list, I distribution list in here that also contains distribution lists. So you can see where recursion is going to be a really handy way to deal with this. So what we want to do first, a disclaimer. I’m not actually going to create any reports. I’m not going to generate PDFs from spool files or generate a spreadsheet or anything like that. And I’m not actually going to send emails. If you’re interested in those topics, please let systemy developer know so that we can include those in future lunch and learns. But this one is about recursion. So all I’m going to do is simply log into this email log the report that we’re sending, and the email address. So with that out of the way, let’s look at how we can do this with a recursive RPG procedure. I’m going to call my procedure Distribute Report. What I need to know from you is which report to send and which distribution list ID to send it to. So that’s my procedure interface or entry plist list. I’m going to set lower limits to the report distribution table and read equal with that distro ID that you provided. If I get to the end of the file, I will iter that gets me out of the loop and returns out of the procedure. If the record I just read is an email address, I will send the report to that email recipient. Now, if it’s a distribution list, what we want to do is recursively call the procedure with this new distribution list. Now, all of these instances of the procedure are going to be sharing a single F spec at the top of the program. So there’s only one open data path. And what I need to do in this procedure, each instance needs to keep track of where it was so that it can chain back to the file to reset the file pointer. When it gets returned, control returns back from the recursive call. So that’s the entire recursive Procedure. And now let’s see what happens. If we call Distribute report. We want to send the company newsletter to everyone to the distribution list of all. So what’s going to happen? Excuse me. We’re going to set lower limits and read equal with all. And I’m going to get this first record, which is the distribution list of Office. This is going to recursively call the distribute report procedure with the office distribution list. I now have a second instance of the procedure on the call stack. And we’re going to be reading equal on the office. The first record we get is an email. So we send, we email the report to office oneompany.com we then read equal. Now we have a distribution list again and it’s going to request recursively call itself again with this sales distribution list. This is the third instance of the procedure. So now it’s going to read equal with sales. I get the email sales one. So it’ll send an email, I read equal and it will send an email to sales 2. I read equal. It will send an email to sales 3. Now when we read equal, we are at the end of the file reading equal with sales. And if this instance of the procedure is going to return back, control goes to the second instance of the procedure on the call stack. And now this guy needs to reset the file pointer back to where he was. And then he begins reading equal again. So this third record is an email. So we send an email to Office 2, we read = and get another distribution list. So it will recursively call the procedure with the payroll distribution list. And it goes through the same process again. And then we read equal. We get an email of Office 3 and then we’re finally at the end of the file and it Control returns back to the first instance of the procedure where we then read equal. We now have the warehouse distribution list and the whole process goes through again where it will recursively call itself for that distribution list and any distribution list it finds along the way. And then eventually this procedure will get to the end of the file and return. And so if we look at the email log, we can see that we sent this to Office 1, Sales 1, 2 and 3, Office 2 and Payroll 1, 2, 3, and then Office 3. Those emails came from this office distribution list here where we have Office 1 and then everyone from sales, Office 2, everyone from payroll, and then Office 3. And then the process happened again for the warehouse distribution list list. And now what we could, we could also do this recursively with SQL again, the contents of the report distribution table. The first thing I need to do is get all of the records from the distribution list for the all distribution ID that’s going to give me these two records. Now what, what we need to do is break down any of those distribution lists. And so we’re going to select all of the records from the distribution list where the ID is office that will give me all of these records. And then we need to grab all of those distribution lists and get those records as well. And we keep recursing through until we’ve gotten all of the records. So for our recursive cte again I use the with keyword here to use recursive CTEs and a very unimaginative name of recursive CTE. I have three columns that I’m defining, defining and my seed data here is going to be that first read is going to give me all of the records from the all distribution list. Then what we want to do is break down any of those distribution lists that we just selected. So I’m going to select from the recursive CTE any distribution list that were just fetched in and then take that information and go back back to the report distribution table and fetch all of those records. Then I need to get any of those distribution lists and go back to the report distribution list again. So when we run this recursive SQL, we get all of the records in here. And now for this example, I don’t need the distribution list in the result set, so I’m just going to add a where clause down at the bottom so that I only fetch back the email addresses. And these are all of the folks who are on the the all distribution list. So now in our last example, I want to look at a bill of materials and what we’re going to do, we’re going to pretend like we’re a company building the Cyberdyne Systems T800. Okay? And the we’re going to assume that the price of titanium screws has gone up by 5 cents. And we need to know how much do we need to increase the price of a terminator in order to cover our costs. So we want to know how many titanium screws are there in A Cyberdyne Systems T800. Right? So now we have a head. The head has a skull. The skull has six screws. It has a jaw with a jaw bone which has four screws. And it has 32 teeth. Each tooth has a screw. So what we need to do is recursively go through these. This is what the table Looks like. All right, it’s an actual physical file where we have the parent product, the component product, and the quantity. So first thing we’ll want to do is get all of the component parts. For a T800, we have one head, one torso, and two legs. It’s not a complete bill of materials. I forgot to include the arms and feet and other things like that. But I think you get the point. Then we need to look in the head and find out how many screws are in there. The head consists of a skull, a jaw, and two eyes. The skull has six screws. So we are keeping track of this. We’re up to six titanium screws. The jaw contains a jawbone. The jawbone contains four screws itself. So now we’re up to 10, and it contains 32 teeth. Each tooth contains one screw. So now we have 42 titanium screws. Then we also have two eyes, and each eye has a screw. So in our bill of materials, our titanium screw count is at 44. So let’s see if we can figure out how to do this. Using rpg, I have an entry plist or a procedure interface where you tell me the parent part number that you’re looking for and the component that you want to count. In that component, I have a logical file bom L1 which is keyed by the a parent part number. And I have a variable and I’m just going to use a recursive procedure to get the count of components in a particular part. Now this rpg, I also have a message and I’m going to display the message that it’ll read out. There are x number of component parts in the parent part number. The component parts procedure, it needs to know what is the parent part number you’re looking at and what component part are you looking to get. Count has a local variable called part count. And when it’s finished, it will return that value. So here we have a data structure defined like the record format of the file. And all we’re doing is going to set lower limits and read equal on that parent part number into the data structure. If we get to the end of the file, we iter out of the loop and it will return out of the procedure. If this part that we just read is the component part that we’re counting, we’re going to increment the part count. If it’s not, what we need to do is look to see if this part number has other components in it where that those titanium screws might be. So this is where we are recursively calling count components here. This is going to recursively go in with the component part and look to see if it’s a parent of other parts. And when this returns back, we’ll multiply it by the quantity and keep track of that. And then just like we did with the report distribution, we then once it returns from the recursive call, it chains back to the file to reset the pointer back to where it was. So this is the recursive procedure to read through the bill of materials. And if we call this, we can see that there’s 44 screws in the T800. All of them happen to be in the head because I didn’t include any screws in the torso or legs or anything. Each eye has one screw. There are 36 screws in a jaw. We can also do this with our recursive SQL. I am declaring a recursive cte. It’s going to return back the columns of parent, component and quantity. The initial read is going to be looking for everything out of the bill of materials where the parent product is the T800 itself. If we run that, we can see that it has one head, two legs, and a torso. We also want to then break all of those down into their component parts. So we’re going to select from the recursive CTE and then look to see if that part number in the CTE is a parent of other components in the bill of materials. So when we run that, we’re going to get all of the component parts for the T800, but we’re only looking for titanium screws. So I will put that in the where clause there at the bottom. This is going to return back. Every place where it finds a screw is required in that bill of materials. So we’re getting pretty close, but it’s not quite what we want. Notice here that the tooth is only listed as having one screw, which is true. But we have 32 teeth in the T800. So what we need to do is multiply that quantity per tooth times the number of teeth that we have. And then the other thing that I want to do is I only want the sum of the quantity. I don’t want to see it listed out. So when we call that and we look for titanium screws in the T800, we get 44. We can also turn this into a function. So I’m going to create or replace a function called components in part. You send in the parent ID and the component part and it will run that recursive CTE and send that data back to you. So how many screws are in a T800 IS44. How many teeth does it have? It has 32 and it has two eyes in the head. And so that is how to read through a bill of materials using recursive SQL. And that is all that I have for recursion. Recursion. Recursion. Thank you very much from SystemInDeveloper and myself. And thank you very much to Dan and Aaron and Eridani for sponsoring today’s Lunch and Learn session. And I will now try to look and see if there are any Q and A in there that apply to me. You’re going to build material anywhere so that we can try it ourselves. So the, the bill of materials table that it’s in the slides, it has all of the information in there along with all of the code that was used with RPG and the SQL. Again, it’s a very simple example. It wasn’t complete. My Terminator does not have arms or feet or hands or anything like that, but it should get you started. Well, thank you, Dan. It’s good to see you.

Dan

All right.

Patrick

And check the chat

Patrick

slides. Slides. All right.

Susan

You had, you had lots of entertainment, provided lots of entertainment with your examples. Patrick.

Aaron

It might, it might be there was a.

Susan

There were comedians.

Dan

You know, it might be a bit.

Aaron

Of a relief that your Terminator doesn’t have arms or legs.

Patrick

Yes. Yeah. Especially with the AI stuff that’s going on. Yeah, no arms allowed on the Terminators.

Aaron

Hey.

Dan

Hey, Aaron, I got a quick question for you because we know we’ve been doing a lot with. Is, is this recursion thing also applicable to the EDI documents that in a segment will have multiple items?

Aaron

Yeah, actually. Yeah, that’s actually a really good point. Any. I mean, Patrick, feel free to comment, but I mean, anytime that you’re processing any kind of hierarchical data, it can be very, very powerful to work with that kind of thing because it’s really good for maintaining context as you’re, you know, churning through a structure like, you know, like the Terminator’s different parts or, or like a, you know, like a complex transaction over EDI or JSON or XML or any of those formats, really.

Dan

Yeah, I know an EDI documents will also, you know, will often have like a header record and then all kinds of item records, detailed item records, or, or with the trucking stuff, you have a, a tender and it has a bunch of different stops and so you have to iterate through the document.

Aaron

Yeah.

Susan

Yeah.

Patrick

Just trying to answer Some questions. So I, I apologize if you were waiting for me. That one was answered live.

Dan

Okay.

Susan

Dan, are there, are there any offerings or products that, that our attendees here might need to understand from your company? As opposed to a lot of the open source stuff that Aaron was talking about? He did talk about some proprietary stuff as well.

Dan

Yeah, so, yeah, so under, under the covers we, we actually use ed. We use AI a ton in what we do. And one of our, in one of Eridani’s main products is, is. It’s what we call Eridani Connect and Erdani Connect is designed to allow you to integrate your IBM I with other systems and it uses AI so you can generate an integration and then you can say I want to add some business rules to this integration and it will generate the code for updating that integration so that you don’t have to write that code so you can generate lots of the code that’s involved in integration. And the other big piece that we do is the integrated DevOps where we have a system that allows you to use Git as your, your version control system. And the importance of that is that then gives you all that access to all those other tools like Sonarqube, like the AI engines because they’re used to working with Git. So we get all your IBM I code into Git and it’s where that, where the make file is. So that where Aaron showed that it automatically knew how to compile. That’s actually as part of that DevOps system it has the database of all the dependencies and create options. You know how everything works under, under the covers in the ibmi.

Aaron

Yeah, I mean that’s, that’s one of the, one of the key points is to say we’re going to build all the supporting infrastructure that basically allows the usage of all these tools, you know, all these industry standard tools. That’s really the target.

Susan

Okay, good to know.

Susan

Okay, well, how we doing? Lots of thanks and other kinds of things going on in the chat here. I think we have probably answered all the questions we’re going to have time to, to go into for this session. So thanks to everybody. I don’t, I, I’m not sure I, you know, I thought recursion blew my mind until we got into the AI stuff and then, you know, just about. But it’s, it was all very interesting. So thanks to, to all three of our very talented and experienced speakers.

Aaron

Well, thank you for having us.

Dan

Yeah, thank you, Susan. Thanks John. Thank you so much for setting this up and Patrick, thank you for a great presentation.

Patrick

Thanks, everybody.

Susan

We’ve got three more lunch and learns coming up next week, so there’s more to come. Hope to see everybody then. Bye.