Migrating Clarion App using AI to a new tech stack like Java/Angular

Hi everybody,

We have an old, minimally documented Clarion 6 app that we are gradually migrating to a new Java/Angular tech stack.
We are using the same MS SQL DB for both the old and the new app, so no changes there.

We’ve made a code generator that can generate basic browses and forms in the new tech stack based on the DB to speed things up, but it’s still a relatively slow process.

Now we are looking for a way to use AI tools, ideally GitHub Copilot, which we have licenses for, to speed up the migration.

Does anyone have experience with using AI to migrate Clarion to a new tech stack?
What approach, and concrete steps would you recommend in this scenario?

One observation I saw with CoPilot last year, it was quoting my own code in its answers from a hidden github repo of mine that was work in progress and thus buggy. That didnt help me at the time.

It doesnt matter too much if its Ai or a new team of coders proficient in Java/Angular, the same points and issues relevant when porting to a new code base apply regardless.

The difference between Ai or a team of proficient coders, is the Ai will suggest something you have to try to see if it works, the team of proficient coders will suggest something they already know works.

Good luck and keep us informed of progress if you dont mind.

2 Likes

Well, I don’t, but tell us a little more about the project.

Do you have the source code? I suspect AI will work better with the generated appname.clw files which AI should be able to read, but I don’t know if it will make any sense of it?

If you don’t have the source code then I think you are SOL, you may as well just work with the client and rewrite the app.

Yes, we have the Clarion source code, and I also believe that AI will have a much better chance of understanding .clw files (textual) than .app files (binary).

Our devs are proficient in Java and Angular, and they know how to read and understand Clarion code.

Well I guess you can be trailblazers then and let us know how it goes.

@Mark_Sarson is the resident Clarion AI guru here, he might be able to provide some detailed help. There are also weekly on-line Clarion meetings where you might be able to get personal advice and share your experiences.

1 Like

I’d be careful about trying to use AI as a “convert my Clarion app to Java/Angular” button. That’s not where it shines, and you’ll probably burn time cleaning up half-correct output.

Where AI does help a lot in this scenario is two things: understanding legacy behavior and accelerating repetitive scaffolding.

If I were in your shoes, I’d approach it like this:

First, use AI to extract behavior from the Clarion side. Export procedures (TXA if possible) and feed them in chunks. Don’t ask it to convert the code. Ask it to:

  • Summarize what the procedure does
  • List tables read/written
  • Extract validation rules
  • Identify calculations and defaulting logic
  • Note side effects

You’re basically using AI to generate the documentation your Clarion 6 app never had. That becomes your migration spec.

Second, migrate in functional slices, not layers. One browse + form. One workflow. One process. Keep the SQL DB stable like you’re doing, but replace behavior one slice at a time.

For each slice:

  • Produce a short behavior spec (AI-assisted, human reviewed)
  • Define the API contract
  • Implement cleanly in Java/Angular
  • Compare behavior against the legacy app

AI works much better when the target is clearly defined.

Also, build one really clean “golden example” module in the new stack. After that, Copilot becomes far more useful because it can mirror your established patterns instead of inventing structure.

The biggest risk in Clarion migrations isn’t SQL, it’s hidden business rules:

  • Validation buried in ACCEPT loops
  • Browse filters enforcing rules
  • Default values in embeds
  • Implicit locking assumptions

AI can help you find those, but you still need to confirm intent.

The bottom line is that AI won’t magically migrate the app for you. But if you use it as a documentation extractor and a scaffolding accelerator, it can meaningfully speed up the process.

That’s where I’ve seen it provide real leverage.

Good luck on your project!

Charles

4 Likes