Moshix demonstrates that LLMs are effectively dismantling the "legacy barrier" by turning archaic COBOL development into a high-speed, accessible task. This shift proves that AI is no longer just for modern apps, but a vital tool for sustaining the world's oldest digital backbones.
Deep Dive
Voraussetzung
- Keine Daten verfügbar.
Nächste Schritte
- Keine Daten verfügbar.
Deep Dive
AI writes a gnuCOBOL transactional systemHinzugefügt:
[music] >> Hello everybody and welcome back to the Moshix Mainframe channel. This is Moshix. Over the last 3 4 maybe even 6 months I've been playing a lot with this new generation of LLMs.
Played a lot with the Codex on OpenAI but also lately more with Claude. And and I wanted to find out you know I've been writing some shell scripts bash scripts which it's very good at. I think it's also quite good at C. Maybe less good at I don't I I don't know about C++ or Go but I haven't tried that but maybe a little bit less with some of the older languages. And so today I wanted to find out how good it is with one of the oldest oldest languages out there COBOL. But I don't want to use any mainframe COBOL because obviously it's going to be easier to find z/OS related COBOL. Content out there on the web from which the models can learn but rather I wanted to go something that's a bit more obscure but it's still COBOL and that's new COBOL. So new COBOL is part of the new tool chain. It has it is a compiler that converts first to C and then compiles the C so it's not a true compiler.
But the C compiler the new C compiler GCC is an optimal is is a is a great compiler does great optimization. So so I I gave it a a try already started doing some stuff here so one of the things I'm doing for instance is I have a data set here.
And as you can see here and this is from an earlier project that I have done a video that I've done on this channel showing how to how to uh process an input data set for salaries with COBOL and then we use the same data set for an assembler program that did the payroll report. And I'll link to those two videos in the description below the video you're watching right now. And so it's the same data set so we have an employee ID then we have the name and then we have a monthly salary. So there is I don't know how many about oh it says here 113 entries. I only took part of it because it doesn't really you know whether we have one or 10,000 doesn't really matter. And and so I as you can see here in this window I have a Claude session going on that I I gave it I wrote the first few I don't know maybe 30 40 lines just to give it a framework because I wasn't sure if Claude knew about new COBOL. So and then I started to ask it different things. So for instance if I go here to the history um it's mostly okay so I'm using new COBOL I have an input data set in input.ds and search cob which is the early program that I have provided it in COBOL should allow for the user to search for a name and then show salary and employee ID. However F3 should exit the program and the search screen should use colors in a coherent way cuz my first inclination didn't use colors and you needed to terminate the program by nuking it with control C so I I told her to use F3.
And I really didn't know how to use function keys in new COBOL so that's something that I really wouldn't have known known how to do. And it's difficult to find a example programs that do this kind of stuff in on the web out there. And then I wanted it all to be like a CICS or a kicks application so you have a mask etc. So let me show you the program as it looks right now. You start it.
And then you look for let's say Mars. I know there's an employee called Mars and then it finds it. Now I can also just do M and then it finds 41 matches as you can see here and then I can use F8 and F7 to do that. Now I wouldn't have known how to do that because I really don't know how to handle AID or attention keys in new COBOL but there is a way to do it so let's see how it handles it. So you can see here this we tell it that it's free flowing source which you can tell this is like a meta information for the compiler.
And and then we give it here the input data set which is sequential so that's correct.
And I think that I actually [clears throat] had provided that already in my original and then we have some colors we define colors which have a numeric value.
And these are the typical mainframe colors so black blue green cyan red well it should be pink yellow and white not magenta but that's what the this is already something that comes from Claude. Obviously it doesn't necessarily know that on the mainframe we say pink and not magenta. But that's okay and then um Okay so it looks like it limits it to 200 entries found so that's already a limitation so we'll have to look into it later let's see.
I'm pretty sure that Claude knows how to fix that. For me it's interesting to find out how Claude learns to do for instance maps and screens for new COBOL because there's very little information out there.
Because I know that if I tell it to make it 400 or I I can even just do it manually.
But so here we define a screen.
So a screen section that's important part so here we define a screen basically that would be kicks map if we were using kicks.
And by the way you could also use new COBOL with with SQL light. In fact I have written I think it's here. Yeah. So I have here a little mapper or wrapper that can be called from new COBOL with the SQL command and then it passes it on to the SQL binary so very simple. Let's go back.
And I did write some SQL light programs with new COBOL so it works perfectly it's fast.
Everything is fast when you run it on Linux so on any modern machine you don't really have to worry too much about performance even when you have millions or hundreds of millions of records everything is fast enough. So here is the the screen that we're looking at.
So uh the foreground color so here we have the foreground color and the background color that's interesting. So first we have a blank screen background color is black foreground color is typically white.
But then we can have for each field we can specify a different color.
And again I wouldn't have known how to do that. But Claude knew somehow.
Really surprised how it finds out all this stuff.
Um Okay so and then it produces a a research a result screen which is what you're seeing here in this in this terminal window here.
And now let's see I want to tell it now to to to give me a selection a selector field to the left of every employee entry so that I can then press E to edit it.
So let's see how we would do it. First of all let me just make a backup of this.
Copy search because it overwrites.
I could just do a GitHub but repository I don't want to do that. Backup search cob okay. So and now we tell it when you show the results page with employees I want a single byte selector field to the left of each employee row and if the user then types an E or E in that in that selector field a new screen comes up to edit the salary.
There should be some plausibility check for the salary.
It can't be more than well we work in the real economy here I'm not a I we don't work in Wall Street so let's say it can't be more than 15,000 per month and not less I don't know what the minimum wages are but let's say they're not less than uh 900 per month.
Um the uh new salary shall be updated in the input yes data set and confirmed to the user.
Um use colors in a coherent manner.
Let's see what it does.
So um This This is interesting. Um the good thing is you can see here what it does as it changes things so you sometimes can still when you see it's going the wrong way you can stop it.
Um I should have gone to planning mode but I didn't anyway.
So um I know you can say use to use agents but I don't know if that's going to I'm not I'm not that great good yet with this cloud thing or the open AI thing I'm learning but um it's highly interesting um just to see what it's able to do here.
Um it's fascinating and um so um one thing that I was thinking of doing is uh rewriting my 3270 BBS uh with new COBOL and um and uh and then sockets and uh and uh SQLite as the database and see how far we can get using Claude um but I'm a little bit worried about how much it's going to cost so I'm not not doing that for now but it was would have been an interesting experience to do that.
Um I don't know maybe one day we'll uh make a video about that and and just maybe implement certain parts of the 3270 BBS uh such as uh such as um maybe um the chat uh or uh scrolling you know going through the topics that are in the 3270 BBS.
That could be an idea.
So it's taking it a while here so maybe I'll just uh pause the video and uh resume when we have uh first answers so that you don't have to uh wait for this. So for you it's going to be just one or two seconds so let's see how long it really takes. So we are at two minutes thinking now so let's see how long it takes.
So after about a minute and a half or so it's still thinking as you can see here.
It's quite slow and I don't know exactly which model I'm using here um not I don't know how to check that.
Uh but in the meantime let's go look at this idea of creating a new COBOL uh 3270 BBS so let's you know what I meant is if we go in here and um and we access and we access so maybe I could just do this first part where we can see um all the topics and browse the topics and you know F8 F7 look at every response um uh something something like that or maybe we just do the chat um that we have in 3270 BBS.
So um either one of those uh would be a good idea um you know maybe I have a long flight coming up just in a few days uh over the Atlantic Ocean so maybe I'll play with that uh even though actually now that I think about it Claude needs an internet connection. So I don't know maybe I'll just do see how far I can get without the internet connection during the flight.
I don't know would be could be a fun idea um but as you can see here it's still uh thinking after what almost 5 minutes. I don't know why it takes so long to think um what I like is that it tries the compilation so I'm really really pleased by that so not only makes changes then it compiles to check if it compiles cleanly. So that's um and then it tells you what it did.
So you can really follow.
And now it's still thinking. Hmm. So let's come back again when it's when it's done thinking.
Okay so after what 12 minutes uh it finally came back but it did quite a lot of stuff so no developer could ever um could ever do all this in 12 minutes.
That's what I'm sure and I couldn't do it. So why don't we try out what happened here?
Did it compile?
Yes it actually even did the compilation so we only have to restart.
And so let's see what happens. Oh yeah.
It put in the selector field Dave Shulman and I can put in here now at 1,000 10,000. Let's increase the salary.
Salary updated successfully.
Uh that's great there is one selector field here that doesn't make any sense. Can we get this fixed?
I don't know how to tell it but there is a selector field for an empty row at the very end of the list.
We only show a selector field if there is actual there's an actual content row not just an empty row.
But I think we're getting there. I mean this looks almost like a CICS transaction.
Um this could be better columnized here.
The function key and action key legend at the bottom of the screen needs to be properly tabulated and in organized columns.
Maybe we'll take a screenshot to tell it.
So it knows what we're talking about.
And then we put it here.
Okay.
So this is actually quite impressive. I mean it compiles.
Claude Yeah it's I mean it's much it's a much better COBOL programmer than I am.
Uh but let's look at the um Claude uh >> [snorts] >> Let's see what it did here.
No.
So this is the screen.
Oh okay so this is the screen now with the selector selector field.
Um Yeah.
So this is the screen that we're seeing up here in this in this terminal.
And then there's an edit screen.
It is so here this is the edit screen.
So if I put in here an E now this is the as you can see here edit salary.
It's actually quite simple. COBOL is at at the it can be a very difficult language but also a very simple language.
It's very similar to assembly.
Um so it's a very direct language because yeah I want to say almost every line of code is almost like an assembly line of code if you use micros but it's not like Python or Pearl or C++ where one line equals uh I I saw something about Hello World in Java is about 500 million instructions.
>> [laughter] >> So uh yeah.
And now it's been thinking again for two minutes or so.
Um let's see what it comes back with and if it fixes all these issues.
Um let's let it work a little bit. Let's come back in a few seconds in a few minutes.
Okay and we're back. So after how long does it Oh okay so after almost 8 minutes it made a few small changes. Let's see what it did.
Hmm.
So it put the columnized So let's see if it actually works.
Yes.
So it understood I mean I'm still quite mesmerized. It understood exactly what I meant. I really just only Let's see what I told it.
The function keys and action keys legend in the bottom, I mean, it's really amazing.
Um I can't get over it and it fixed the dangling um action key there.
Uh it came out with this color scheme on its own.
Um I I think it's amazing. I mean, if what if we asked >> [snorts] >> an experienced new COBOL developer to develop this application, it would probably take him to do it like this.
For an experienced person, I want to say a full day.
For a not experienced person, two or three days.
And then there would still be back and forth and I would have to be available when the when the person comes in and says, "Yeah, I did it." And I said, "Well, you know, you have to tabulate um the uh the function key legend."
And then they go back. So, and there's a lot always some time lost because the person may be ready, but then I'm not ready to look at it. And so, um it is a bit sad that now the LLM is the developer and I'm the QA person.
Um and so, uh there's going to be lots of people prefer to be the developer and not the QA person.
But there's also a lot of people who say, "Well, I I'm getting an application done in a 20th of the time it would take an experienced developer to do it. So, um I'm happy with that. It's It's a dawn of a new era.
And I don't know where this is going to lead, but um I don't know if this code could be uh optimized. Probably.
Um you know, you could probably do functions for a lot of things here.
Um but it works.
And if I have to change it, I don't need to go call the person who wrote it.
Um I can just ask the LLM to change it and you know, it doesn't matter who wrote it.
Um it's really quite amazing.
So, for me this is this is something special.
And I intend to use it more for the mainframe stuff I'm doing. As I said, you know, one idea I have is to have um to have this also uh rewrite basically a part of the 3270 BBS for for um um with in new COBOL. So, I don't even know if it's possible.
Uh can new COBOL uh handle TCP sockets?
Yes.
So, then, you know, the whole thing can be rewritten because right now 3270 BBS is written in Go. Maybe, I don't know, it's time to redo this in new COBOL.
Using an LLM, um I don't know uh how how it can deal with any more complex application. This I don't know.
This screen here, which is kind of a a Delta I call it Delta when it's like the uh Megamon, which measures the performance.
That's That's a challenging screen to write and uh Matthew Wilson, the person who developed the Go 3270 library, knows how much I worked on getting this to work um right.
Um with updating colors, the trend lines inside of all of this. There's a lot of stuff in here. And so, um yes, it was slow and I had to learn a lot. And and I don't know if if an LLM can even learn it all.
So, maybe I'll take on this project maybe during the summer and rewriting the 3270 BBS all in in new COBOL and make it kind of like a CICS application.
Um transactional with SQLite uh access. Could be fun.
Anyway, so I learned a lot uh in using this LLM for uh for something as uncommon as COBOL and then some even more so, something as uncommon as new COBOL.
Um and uh I I'm impressed. I hope you're impressed, too.
Um and uh why don't you let me know what kind of project you're working on with uh with this LLM thing.
And what's uh what the most surprising thing is that you've seen in working with LLM in with weird or uncommon languages.
Anyway, this This was a short video.
Thanks a lot for watching and goodbye.
Ähnliche Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
So What's Odin Lang Even Good For
TechOverTea
131 views•2026-06-01











