News: 1692730450

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

IBM says GenAI can convert that old COBOL code to Java for you

(2023/08/22)


IBM is giving its mainframe customers a tool infused with generative AI to translate COBOL code to Java as part of application modernization efforts.

The [1]watsonx Code Assistant for Z is set to be available sometime in Q4 2023. Big Blue says it can speed translation of COBOL to Java on its Z mainframes.

As Reg readers will know, COBOL supports many vital processes within organizations globally – some that would surprise newbie devs. The language was designed specifically to be portable and easier for coding business applications. The good news is that it works. The bad news is it's been working for a little long. COBOL has [2]been around for over 60 years , and many of the developers who wrote those applications have since retired or are no longer with us.

Is the IT industry short on Cobolers? This could be your lucky day [3]READ MORE

"If you can find a COBOL programmer, they are expensive. I have seen figures showing they can command some of the highest salaries because so many mission critical apps are written in COBOL and they need maintenance," Omdia Chief Analyst Roy Illsley told us.

Migrating the code to Java means there are many more programmers around, he added, and if the apps run on Linux on Z then they can potentially be moved off the mainframe more easily in future. (Although that is not always as easy as it might seem.)

[4]

According to IBM, there are billions of lines of COBOL code out there as potential candidates for modernization (a report last year [5]estimated the total figure at 775-850 billion lines). For this reason, the generative AI features in watsonx Code Assistant for Z are intended to help developers to assess and determine the code most in need of modernization, allowing them to more speedily update large applications and focus on critical tasks.

[6]

[7]

IBM wants to provide tooling for each step of the modernization process, starting with its Application Discovery and Delivery Intelligence (ADDI) inventory and analysis tool. Other steps include refactoring business services in COBOL, transforming the code to Java code, and then validating the resulting outcome with the aid of automated testing.

Illsley was aware of companies that offer similar products, but which use a combination of static and dynamic analysis of the COBOL code instead of AI, and split up the code into microservices, still based on COBOL.

[8]

The resulting Java code emitted by watsonx Code Assistant for Z will be object-oriented, but will still interoperate with the rest of the COBOL application IBM claimed, as well as with key services such as CICS, IMS, DB2, and other z/OS runtimes.

"IBM is engineering watsonx Code Assistant for Z to take a targeted and optimized approach. It's built to rapidly and accurately convert code optimized for IBM Z, accelerate time to market and broaden the skills pool," SVP for Product Management and Growth Kareem Yusuf said in a prepared remark.

[9]New research aims to analyze how widespread COBOL is

[10]Google wants to copy-paste your mainframe applications into its cloud

[11]Is it time to retire C and C++ for Rust in new programs?

[12]TypeScript joins 5 most used languages in 2022 lineup

IBM is not the only IT outfit turning to AI tools to help developers code or maintain applications, however, the quality of AI-assisted output has been questioned. A [13]Stanford University study found that programmers who accepted help from AI tools like Github Copilot produce less secure code than those who did not.

Watsonx Code Assistant for Z will be joined later by another AI-based developer tool from IBM, watsonx Code Assistant for Red Hat Ansible Lightspeed.

Both are powered by the watsonx.ai code model, which Big Blue claimed has been trained on 115 coding languages. The watsonx Code Assistant product portfolio will be extended to other programming languages in future, the company said. ®

Get our [14]Tech Resources



[1] https://www.ibm.com/products/watsonx-code-assistant

[2] https://www.theregister.com/2019/09/16/cobol_at_60/

[3] https://www.theregister.com/2013/05/01/indemand_ancient_it_skills/

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2ZOUwBQr1ElK92yHRnUbzSwAAAII&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[5] https://www.theregister.com/2022/12/14/cobol_research/

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZOUwBQr1ElK92yHRnUbzSwAAAII&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[7] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33ZOUwBQr1ElK92yHRnUbzSwAAAII&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[8] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZOUwBQr1ElK92yHRnUbzSwAAAII&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[9] https://www.theregister.com/2022/12/14/cobol_research/

[10] https://www.theregister.com/2022/10/12/google_cloud_dual_run_service/

[11] https://www.theregister.com/2022/09/28/is_it_time_to_retire_c/

[12] https://www.theregister.com/2022/06/22/stackoverflow_survey/

[13] https://www.theregister.com/2022/12/21/ai_assistants_bad_code/

[14] https://whitepapers.theregister.com/



DJV

It will be interesting to see a side-by-side comparison between the original and converted code, along with a comparison of the speed of execution and the physical output generated.

Going by some of the more "interesting" output from various LLM/AI systems of late, I suspect it might be a case of "accounting software in" and "Vogon poetry out".

Skip the Java - go straight to Rust (or whatever the new flavor is today)

elDog

Java must be at least 30 years old already. The J2EE libraries that I worked with 15 years ago were creaking with their baggage.

Not sure I'd really like to see the output product from COBOL-68 (last version I knew) to a modern language. DATA DIVISION: OBVIOUS-123 meet obfuscation_xyz.

Curious choice

Kevin McMurtrie

Java doesn't support domain-specific languages yet, but other JVM languages do. A COBAL to Java translation is a drastic change. Maybe it's intentional, though. Some DSLs get out of control as they age.

I hope I never have to see COBOL that was written by a cheap contractor then fed through an AI trained by code from cheap contractors.

Meh

This is my handle

What's old is new again

We were looking at tools (no ML mentioned -- this was during the AI winter) to convert COBOL to Java back in the oughts. HP3000 & what would now be called a Z-class mainframe were the source systems, and clusters of blades running Linux as the target enviroment. A colleague and I even wrote some code to generate Swing User Interfaces from 3270 screen definitions as a POC. I wasn't there long enough to see it into production fruition but it was kind of fun.

Re: Meh

Doctor Syntax

I'd guess before that somebody must have had a go at COBOL to C using YACC and LEX.

MOH

Dunno where Omdia are getting their figures from , but Cobol developers aren't expensive. Competent ones who actually know what they're doing yes, but that's not usually an option for mid-level managers keen on hitting their bonus targets.

Should be a fair bit of work in a year or two when all the not-quite-right AI conversions start costing a small fortune and they need proper developers.

Programming is independent from language

Lil Endian

(A) COBOL supports many vital processes

So don't try to squish it through a mincing machine and trust it.

(B) The bad news is it's been working for a little long.

Longevity is not a sign of weakness, a lack of headcount knowledgeable in COBOL is the problem.

(C) "If you can find a COBOL programmer, they are expensive..." + there are billions of lines of COBOL code...

Sounds like a reason for learning COBOL for some, it's a supply/demand no-brainer.

----------------------

Programming consists of logic with one of three choices in program flow: sequence; condition and iteration. All programming logic follows this, and all languages accommodate it [1] . If you're a programmer, you can code your program in any language you know [2] .

Converting code autonomously is essentially starting from scratch, autonomous reverse engineering, without the human taking hands-on until testing - that won't leave any bugs. (Hugely impacts A)

If (A) is important, you really don't want to risk this approach, it creates a mind fuck.

(B) appears to be/is the case because of FOTM, it's chic to code in Python/Rust/Java... or whatever. It doesn't matter [2] .

If you combine (A), (B) and (C) it's clear that's what is "needed" is for more COBOL coders, not a farcical "AI" fix. (A) because the $Corps should stop fucking about and help themselves by not scrimping, and (C) benefits the programmer. They combine to (B).

[1] If that's not the case, it's beyond the scope of the significant context.

[2] If it's the right language for the job.

fortune: No such file or directory