FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Off Topic / Otros temas WebXCOBOL
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
WebXCOBOL
Posted: Wed Feb 25, 2026 06:01 AM

Hi everyone,

It seems like WebXCOBOL, a Cobol to C++ transpiler, is moving faster than our WebXPHP, but all of them are moving strong.....
It comes with Forensic source tracking, especifically designed for Banking, Credital, Institutional and Goverment code.
Tonight's test:

Unfortunaly we lose some indentation...

       IDENTIFICATION DIVISION.
       PROGRAM-ID. INTEREST-CALC.

   DATA DIVISION.
   WORKING-STORAGE SECTION.
   01  WS-CALC-DATA.
       05  WS-PRINCIPAL       PIC 9(9)V99 COMP-3 VALUE 10000.00.
       05  WS-RATE            PIC 9(2)V999 COMP-3 VALUE 0.052.
       05  WS-PERIODS         PIC 9(4) COMP VALUE 365.
       05  WS-INTEREST        PIC 9(9)V99 COMP-3.
       05  WS-TOTAL           PIC 9(9)V99 COMP-3.

   01  WS-DISPLAY.
       05  WS-DISP-PRINCIPAL  PIC $ZZZ,ZZZ,ZZ9.99.
       05  WS-DISP-INTEREST   PIC $ZZZ,ZZZ,ZZ9.99.
       05  WS-DISP-TOTAL      PIC $ZZZ,ZZZ,ZZ9.99.

   PROCEDURE DIVISION.
   MAIN-LOGIC.
       DISPLAY "--- INTEREST CALCULATION BENCHMARK ---"

       COMPUTE WS-INTEREST = WS-PRINCIPAL * WS-RATE * (WS-PERIODS / 365.25)
       COMPUTE WS-TOTAL = WS-PRINCIPAL + WS-INTEREST

       MOVE WS-PRINCIPAL TO WS-DISP-PRINCIPAL
       MOVE WS-INTEREST  TO WS-DISP-INTEREST
       MOVE WS-TOTAL     TO WS-DISP-TOTAL

       DISPLAY "PRINCIPAL: " WS-DISP-PRINCIPAL
       DISPLAY "RATE:      " WS-RATE
       DISPLAY "PERIODS:   " WS-PERIODS
       DISPLAY "INTEREST:  " WS-DISP-INTEREST
       DISPLAY "TOTAL:     " WS-DISP-TOTAL

       STOP RUN.
/* WebXCOBOL Enterprise Output */
/* SOURCE-FILE: interest_calc.cob */
/* SOURCE-LINES: 35 */
// IDENTIFICATION DIVISION.
// PROGRAM-ID. INTEREST-CALC.

#include <iostream>
#include <string>
#include <cstdint>
#include <array>
#include <limits>
#include <cmath>
#include <iomanip>
#include "libwebxcob.h"

class interest__calc {
private:
	bool cob_stopped = false;
	enum ParaID { PARA_STOP = 0, PARA_INTEREST__CALC, PARA_MAIN_SECTION, PARA_MAIN_LOGIC };
	/* ENVIRONMENT DIVISION */

// DATA DIVISION.
// WORKING-STORAGE SECTION.
struct {
	CobPacked<11, 2, true> ws_principal = 10000.00;	/* PIC 9(9)V99 */
	CobPacked<5, 3, true> ws_rate = 0.052;	/* PIC 9(2)V999 */
	int16_t ws_periods = 365;	/* PIC 9(4) */
	CobPacked<11, 2, true> ws_interest;	/* PIC 9(9)V99 */
	CobPacked<11, 2, true> ws_total;	/* PIC 9(9)V99 */
} ws_calc_data;

struct {
	CobDecimal<11, 2, false> ws_disp_principal;	/* PIC $ZZZ,ZZZ,ZZ9.99 */
	CobDecimal<11, 2, false> ws_disp_interest;	/* PIC $ZZZ,ZZZ,ZZ9.99 */
	CobDecimal<11, 2, false> ws_disp_total;	/* PIC $ZZZ,ZZZ,ZZ9.99 */
} ws_display;

/* LINKAGE SECTION */
CobString<1> xml_namespace;	/* PIC X */
CobString<1> xml_namespace_prefix;	/* PIC X */
CobDecimal<0, 0, false> xml_nnamespace;	/* PIC N */
CobDecimal<0, 0, false> xml_nnamespace_prefix;	/* PIC N */
CobDecimal<0, 0, false> xml_ntext;	/* PIC N */
CobString<1> xml_text;	/* PIC X */

// PROCEDURE DIVISION.
public:
	int run (int argc, char *argv[]) {
		ParaID next = PARA_INTEREST__CALC;
		while (next != PARA_STOP && !cob_stopped) {
			switch (next) {
				case PARA_INTEREST__CALC: next = para_interest__calc(); break;
				case PARA_MAIN_SECTION: next = para_main_section(); break;
				case PARA_MAIN_LOGIC: next = para_main_logic(); break;
				default: next = PARA_STOP; break;
			}
		}
		return 0;
	}
private:

ParaID para_interest__calc () {
	return PARA_MAIN_LOGIC;
}

ParaID para_main_section () {
	return PARA_STOP;
}

ParaID para_main_logic () {
	// DISPLAY "--- INTEREST CALCULATION BENCHMARK ---"
	std::cout << "--- INTEREST CALCULATION BENCHMARK ---" << std::endl;
	// COMPUTE WS-INTEREST = WS-PRINCIPAL * WS-RATE * (WS-PERIODS / 365.25)
	ws_calc_data.ws_interest = ((ws_calc_data.ws_principal * ws_calc_data.ws_rate) * (ws_calc_data.ws_periods / 365.25));
	// COMPUTE WS-TOTAL = WS-PRINCIPAL + WS-INTEREST
	ws_calc_data.ws_total = (ws_calc_data.ws_principal + ws_calc_data.ws_interest);
	// MOVE WS-PRINCIPAL TO WS-DISP-PRINCIPAL
	ws_display.ws_disp_principal = ws_calc_data.ws_principal;
	// MOVE WS-INTEREST  TO WS-DISP-INTEREST
	ws_display.ws_disp_interest = ws_calc_data.ws_interest;
	// MOVE WS-TOTAL     TO WS-DISP-TOTAL
	ws_display.ws_disp_total = ws_calc_data.ws_total;
	// DISPLAY "PRINCIPAL: " WS-DISP-PRINCIPAL
	std::cout << "PRINCIPAL: " << ws_display.ws_disp_principal << std::endl;
	// DISPLAY "RATE:      " WS-RATE
	std::cout << "RATE:      " << ws_calc_data.ws_rate << std::endl;
	// DISPLAY "PERIODS:   " WS-PERIODS
	std::cout << "PERIODS:   " << ws_calc_data.ws_periods << std::endl;
	// DISPLAY "INTEREST:  " WS-DISP-INTEREST
	std::cout << "INTEREST:  " << ws_display.ws_disp_interest << std::endl;
	// DISPLAY "TOTAL:     " WS-DISP-TOTAL
	std::cout << "TOTAL:     " << ws_display.ws_disp_total << std::endl;
	// STOP RUN.
	cob_stopped = true; return PARA_STOP;
	return PARA_STOP;
}
};

int main (int argc, char *argv[]) {
	(void)argc; (void)argv;
	interest__calc program;
	int result = program.run (argc, argv);
	std::cout << "\nPress Enter to exit...";
	std::cin.get();
	return result;
}

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: WebXCOBOL
Posted: Wed Feb 25, 2026 08:03 AM

IBM stock dipped more than 13% once Anthropic released a blog saying Claude can optimize legacy COBOL code.

IBM has a massive business built on “modernizing” old systems. It’s slow, expensive, human-heavy work.

When Anthropic shows that Claude can map out and fix that old code in a fraction of the time, serious question arising on IBM’s “army of humans” model to create per-seat revenue. Investors are terrified, the market is realizing that if the AI is the “worker,” the old software subscription models are basically broken.

“Hundreds of billions of lines of COBOL run in production every day, powering critical systems in finance, airlines, and government. Despite that, the number of people who understand it shrinks every year, AI excels at streamlining the tasks that once made COBOL modernization cost-prohibitive.”

Claude Code can help modernize COBOL codebases by mapping dependencies across thousands of lines of code, documenting
workflows and identifying risks that “would take human analysts months to surface,” Anthropic said.

IBM stock took a massive 13% hit, sinks the most since 2000.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: WebXCOBOL
Posted: Wed Feb 25, 2026 09:31 AM

Thank you, Antonio and Bayron. This example is a warning for the sluggish, but a massive opportunity for the small and the fast.

Best regards, Otto

Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: WebXCOBOL
Posted: Wed Feb 25, 2026 10:53 AM

Lo que hoy te ayuda mañana te arruina

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: WebXCOBOL
Posted: Wed Feb 25, 2026 04:29 PM

Hi everyone,

There is were the gap is, AI will give you a different answer on every prompt, even if you record all your prompts and try all over again, you will push in a different direction every time... There is were we fit in, we create dependencies, classes, assembly lines, specs, procedures, algorithms, etc, that are not negotiable, so the result is visible, dependability.... that's were im betting on, so im building a complete platform,

That code was not created by an Ai, was created by hard and pure software.... with resident and recursive verification.

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: WebXCOBOL
Posted: Wed Feb 25, 2026 04:40 PM
Antonio Linares wrote:

Claude Code can help modernize COBOL codebases by mapping dependencies across thousands of lines of code, documenting
workflows and identifying risks that “would take human analysts months to surface,” Anthropic said.

Thanks Antonio, I did use Gemini to build this one though...

Claude code max does it, but I only get 4 days of use a week on the $100.00 subscription, while I can do similar with Gemini, with the $20.00 subscription, all day long, although there is things Gemini can't do, and more than once has told me, I CAN'T DO IT....At least for now....

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: WebXCOBOL
Posted: Sat Feb 28, 2026 02:57 AM

IBM stock dipped more than 13% once Anthropic released a blog saying Claude can optimize legacy COBOL code.

Should I be worried??? i made the transpiler finally produce those samples the 21st,,,, then Anthropic comes out with those news the 22nd-23rd?????
I published here the 25th after cleaning up the output..... Funny stuff....
This transpiler did not take a couple of days to be made.. it took months, but finally worked the 21th....

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Continue the discussion