Thread View: comp.lang.cobol
11 messages
11 total messages
Started by Arnold Trembley
Sun, 11 Oct 2026 03:25
codeconvert.ai
Author: Arnold Trembley
Date: Sun, 11 Oct 2026 03:25
Date: Sun, 11 Oct 2026 03:25
19 lines
1861 bytes
1861 bytes
Found this in a thread in the GnuCOBOL forums. It's a link to a website for creating a COBOL program using AI prompts. https://www.codeconvert.ai/cobol-code-generator And here's a link to the forum thread: https://sourceforge.net/p/gnucobol/discussion/help/thread/3ce4db5d3e/?limit=25#b8d4/8ea5/1624 -- https://www.arnoldtrembley.com/ -- This email has been checked for viruses by Avast antivirus software. www.avast.com
Re: codeconvert.ai
Author: docdwarf
Date: Sun, 11 Oct 2026 15:54
Date: Sun, 11 Oct 2026 15:54
9 lines
1040 bytes
1040 bytes
In article <hq6dnR6bKpYFnFb3nZ2dnZfqn_qdnZ2d@giganews.com>, Arnold Trembley <arnold.trembley@att.net> wrote: > >Found this in a thread in the GnuCOBOL forums. It's a link to a website >for creating a COBOL program using AI prompts. MAIN-PARA. Ain't seen one of those in a while. DD
Re: codeconvert.ai
Author: Vincent Coen
Date: Sun, 11 Oct 2026 18:48
Date: Sun, 11 Oct 2026 18:48
19 lines
2036 bytes
2036 bytes
Hello Arnold! 11 Oct 26 04:25, Arnold Trembley wrote to all: > Found this in a thread in the GnuCOBOL forums. It's a link to a > website > for creating a COBOL program using AI prompts. > https://www.codeconvert.ai/cobol-code-generator Pity it does not support Basic or CBasic etc. Vincent
Re: codeconvert.ai
Author: Arnold Trembley
Date: Mon, 12 Oct 2026 01:56
Date: Mon, 12 Oct 2026 01:56
42 lines
2652 bytes
2652 bytes
On 2026-10-11 1:48 PM, Vincent Coen wrote: > > Hello Arnold! > > 11 Oct 26 04:25, Arnold Trembley wrote to all: > > > > Found this in a thread in the GnuCOBOL forums. It's a link to a > > website > > for creating a COBOL program using AI prompts. > > > https://www.codeconvert.ai/cobol-code-generator > > Pity it does not support Basic or CBasic etc. > > > Vincent > > > If you scroll all the way to the bottom of the front page, you can see they support AI generation for 62 programming languages. Unfortunately, Basic and CBasic are not on the list, but VB.Net, VB6, VBA, and VBScript are supported. Some of the programming languages are completely unknown to me, like Julia, Kotlin, Scala, Clojure, Dart, Elixer, Elm, Erlang, Haskell, and Haxe. The Assembly language generator assumes the only assembly language in the world is X86-64. Popular programming languages like C, C++, Java, Javascript, Ada, Fortran, Python, and Rust are supported. -- https://www.arnoldtrembley.com/ -- This email has been checked for viruses by Avast antivirus software. www.avast.com
Re: codeconvert.ai
Author: Arnold Trembley
Date: Mon, 12 Oct 2026 02:11
Date: Mon, 12 Oct 2026 02:11
97 lines
4771 bytes
4771 bytes
On 2026-10-11 10:54 AM, docdwarf@panix.com wrote:
> In article <hq6dnR6bKpYFnFb3nZ2dnZfqn_qdnZ2d@giganews.com>,
> Arnold Trembley <arnold.trembley@att.net> wrote:
>>
>> Found this in a thread in the GnuCOBOL forums. It's a link to a website
>> for creating a COBOL program using AI prompts.
>
> MAIN-PARA. Ain't seen one of those in a while.
>
> DD
I asked it to create a program that performs a credit card Mod 10 check
digit validation using the Luhn algorithm, which is described in a
Wikipedia article:
https://en.wikipedia.org/wiki/Luhn_algorithm
The check digit algorithm is intended to detect digit transposition or
substitution when a credit card number is manually typed.
In this case it generated a "MAIN-LOGIC" paragraph instead of
"MAIN-PARA", but the generated COBOL looked pretty reasonable. I
compiled it with GnuCOBOL 3.2 and it appeared to execute correctly, and
I also tested it with different "card numbers" generated with difference
check digit values.
IDENTIFICATION DIVISION.
PROGRAM-ID. LUHN-VALIDATOR.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-INPUT.
05 WS-CARD-NUMBER PIC X(16) VALUE "49927398716".
01 WS-VARIABLES.
05 WS-I PIC 9(2) COMP.
05 WS-DIGIT PIC 9(2) COMP.
05 WS-SUM PIC 9(4) COMP VALUE 0.
05 WS-DOUBLED PIC 9(2) COMP.
05 WS-REMAINDER PIC 9(2) COMP.
05 WS-MOD-RESULT PIC 9(4) COMP.
01 WS-TABLE.
05 WS-TABLE-DIGITS PIC X OCCURS 16 TIMES.
01 WS-OUTPUT-MSG.
05 WS-RESULT-MSG PIC X(30).
PROCEDURE DIVISION.
MAIN-LOGIC.
PERFORM INITIALIZATION
PERFORM VALIDATE-LUHN
PERFORM DISPLAY-RESULT
STOP RUN.
INITIALIZATION.
MOVE WS-CARD-NUMBER TO WS-TABLE.
MOVE 0 TO WS-SUM.
VALIDATE-LUHN.
PERFORM VARYING WS-I FROM 16 BY -1 UNTIL WS-I < 1
MOVE WS-TABLE-DIGITS(WS-I) TO WS-DIGIT
IF FUNCTION MOD(WS-I, 2) = 1
COMPUTE WS-DOUBLED = WS-DIGIT * 2
IF WS-DOUBLED > 9
COMPUTE WS-DOUBLED = WS-DOUBLED - 9
END-IF
ADD WS-DOUBLED TO WS-SUM
ELSE
ADD WS-DIGIT TO WS-SUM
END-IF
END-PERFORM.
DISPLAY-RESULT.
COMPUTE WS-MOD-RESULT = FUNCTION MOD(WS-SUM, 10)
IF WS-MOD-RESULT = 0
DISPLAY "CREDIT CARD NUMBER IS VALID."
ELSE
DISPLAY "CREDIT CARD NUMBER IS INVALID."
END-IF.
Of course, this means the pointy-haired bosses will want all the new
programs written by AI bots, so they can pay us less.
Cheers,
--
https://www.arnoldtrembley.com/
--
This email has been checked for viruses by Avast antivirus software.
www.avast.com
Re: codeconvert.ai
Author: Stefan Ram
Date: Mon, 12 Oct 2026 09:34
Date: Mon, 12 Oct 2026 09:34
10 lines
1899 bytes
1899 bytes
"Vincent Coen" <VBCoen@gmail.com> wrote or quoted: >Pity it does not support Basic or CBasic etc. Nearly every chatbot can already convert most programs from one language into another, although the quality might be worse for languages that are less common. So, if you want to convert from a language called "Basic" to a language called "CBasic", I'd recommend to try it with some chatbot.
Re: codeconvert.ai
Author: docdwarf
Date: Mon, 12 Oct 2026 13:18
Date: Mon, 12 Oct 2026 13:18
23 lines
1753 bytes
1753 bytes
In article <yZqdneuIArRD3FH3nZ2dnZfqnPidnZ2d@giganews.com>, Arnold Trembley <arnold.trembley@att.net> wrote: >On 2026-10-11 10:54 AM, docdwarf@panix.com wrote: >> In article <hq6dnR6bKpYFnFb3nZ2dnZfqn_qdnZ2d@giganews.com>, >> Arnold Trembley <arnold.trembley@att.net> wrote: >>> >>> Found this in a thread in the GnuCOBOL forums. It's a link to a website >>> for creating a COBOL program using AI prompts. >> >> MAIN-PARA. Ain't seen one of those in a while. > >I asked it to create a program that performs a credit card Mod 10 check >digit validation using the Luhn algorithm, which is described in a >Wikipedia article: > >https://en.wikipedia.org/wiki/Luhn_algorithm It was the style of the naming convention that caught my eye, Mr Trembley, and the wry grin brought by memories of hours of 'paragraph coding, paragraph-thru EXIT coding and SECTION' coding style arguments that resulted. DD
Re: codeconvert.ai
Author: Mike Powell
Date: Mon, 12 Oct 2026 13:40
Date: Mon, 12 Oct 2026 13:40
8 lines
1094 bytes
1094 bytes
AT> Some of the programming languages are completely unknown to me, AT> like Julia, Kotlin, Scala, Clojure, Dart, Elixer, Elm, Erlang, AT> Haskell, and Haxe. I have heard of Haskell, but not the rest. ;) Mike
Re: codeconvert.ai
Author: Arne Vajhøj
Date: Mon, 12 Oct 2026 15:26
Date: Mon, 12 Oct 2026 15:26
39 lines
2875 bytes
2875 bytes
On 10/11/2026 9:56 PM, Arnold Trembley wrote: > Some of the programming languages are completely unknown to me, like > Julia, Kotlin, Scala, Clojure, Dart, Elixer, Elm, Erlang, Haskell, and > Haxe. Julia is high level language primarily used for scientific computing. Dynamic typed but AOT compiled to native. The language you want if Python is too slow and Fortran is too cumbersome. :-) Kotlin is a JVM language. Consider it how Java would have looked like if Java had been invented in the 2010's instead of 1990's. Widely used in Android development, but also some server side. Scala is also a JVM language. A language based on the "more features is better" philosophy. It is used some places for advanced stuff. Including some widely used frameworks: Akka, Spark and the core of Kafka. Clojure is a Lisp dialect for JVM. Pretty hot 15 years ago. Rarely used in real life. Dart is Google not so successful attempt to create what MS successfully did with TypeScript. A better language than JavaScript transpiled to JavaScript. Erlang is a weird language invented by Ericsson a long time ago for HA applications. Still used in telecom and a few very widely used applications including RabbitMQ. Elixir is a higher level language than Erlang but running on same platform. Hot but not widely used. Haskell is (together with OCaml) one of those finer FP languages taught at finer CS studies. And almost unused in the real world. Elm and Haxe I don't know. Arne
Re: codeconvert.ai
Author: Stefan Ram
Date: Mon, 12 Oct 2026 15:36
Date: Mon, 12 Oct 2026 15:36
11 lines
2021 bytes
2021 bytes
=?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk> wrote or quoted: >Haskell is (together with OCaml) one of those finer >FP languages taught at finer CS studies. And almost >unused in the real world. I think before Haskell, there were many different functional languages like Miranda or Hope, and then Haskell became /the/ mainstream/default functional language. It /is/ used for at least one application of high practical value: pandoc.
Re: codeconvert.ai
Author: Arnold Trembley
Date: Wed, 14 Oct 2026 09:14
Date: Wed, 14 Oct 2026 09:14
34 lines
2741 bytes
2741 bytes
On 2026-10-12 8:18 AM, docdwarf@panix.com wrote: > In article <yZqdneuIArRD3FH3nZ2dnZfqnPidnZ2d@giganews.com>, > Arnold Trembley <arnold.trembley@att.net> wrote: >> On 2026-10-11 10:54 AM, docdwarf@panix.com wrote: >>> In article <hq6dnR6bKpYFnFb3nZ2dnZfqn_qdnZ2d@giganews.com>, >>> Arnold Trembley <arnold.trembley@att.net> wrote: >>>> >>>> Found this in a thread in the GnuCOBOL forums. It's a link to a website >>>> for creating a COBOL program using AI prompts. >>> >>> MAIN-PARA. Ain't seen one of those in a while. >> >> I asked it to create a program that performs a credit card Mod 10 check >> digit validation using the Luhn algorithm, which is described in a >> Wikipedia article: >> >> https://en.wikipedia.org/wiki/Luhn_algorithm > > It was the style of the naming convention that caught my eye, Mr Trembley, > and the wry grin brought by memories of hours of 'paragraph coding, > paragraph-thru EXIT coding and SECTION' coding style arguments that > resulted. > > DD Good times! -- https://www.arnoldtrembley.com/ -- This email has been checked for viruses by Avast antivirus software. www.avast.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads