[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem Writing to CSV gnucobol-3.2-1

From: Simon Sobisch
Subject: Re: Problem Writing to CSV gnucobol-3.2-1
Date: Thu, 16 Nov 2023 18:30:43 +0100
User-agent: Mozilla Thunderbird

Hi Andrew,

Am 16.11.2023 um 17:56 schrieb Andrew Zwieg:
I recently updated from GNUCobol  gnu-cobol-2.0 (RockyLinux 8) to
gnucobol-3.2-1.el9.x86_64 (AlmaLinux 9).


This code used to work on the  previous version i had compiled by
hand, the 3.2.1 version is provided  by Alma/RedHat.

cobc -x autorfc.broke.cob
autorfc.broke.cob: in paragraph 'Append':
autorfc.broke.cob:140: warning: inline PERFORM without imperative
statement used [-Wdialect]
   138 |                 OR
   139 |        LastIndex = 1
   140 >        END-PERFORM.
   141 |
   142 |         PERFORM VARYING FromIndex FROM 1 BY 1 UNTIL

Relevant Code Snippet (can provide more/all code if needed)

      PERFORM VARYING LastIndex FROM 50 by -1 UNTIL
        FromChar(LastIndex) NOT EQUAL SPACE
        LastIndex = 1

Note that this is only a warning, cobc still compiles that.

If I remember correctly only GnuCOBOL will compile that, COBOL requests
a statement in there, for example CONTINUE. Add that and you have
"compatible COBOL", which will also work with a previous version of
GnuCOBOL (and other compilers).

If you want to, you can also suppress this *along with every other
dialect related* warning using `-Wno-dialect`, but fixing is commonly
the better approach.

Note: If you are not restricted to not use functions, then FUNCTION TRIM
and/or FUNCTION STORED-CHAR-LENGTH may be quite useful and faster.

Kind regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]