bug-gnucobol
[Top][All Lists]
Advanced

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

Re: [Bug-GnuCOBOL] [Bugs] Support for


From: Michael Potter
Subject: Re: [Bug-GnuCOBOL] [Bugs] Support for
Date: Wed, 4 Jul 2018 07:38:16 -0400

The code is compiling fine after I removed the "DATE FORMAT ...", we won't know the run time issues until we resolve other compile problems.

I will post an update when I learn more.

On Tue, Jul 3, 2018 at 4:29 PM Michael D. Setzer II <address@hidden> wrote:
On 3 Jul 2018 at 13:55, J Leslie Turriff wrote:

From:                   J Leslie Turriff <address@hidden>
To:                     address@hidden
Date sent:              Tue, 3 Jul 2018 13:55:35 -0500
Subject:                Re: [Bug-GnuCOBOL] [Bugs] Support for

> On 2018-07-02 14:04:21 Michael Potter wrote:
> > I have the following code that originated on an IBM mainframe:
> >
> >        CBL DATEPROC(FLAG),YEARWINDOW(-90)
> >        ID DIVISION.
> >        PROGRAM-ID.   SOMEPROG.
> > ...
> >        01  X-CURRENT-DATE-68.
> >            05  X-MONTH                 PIC X(2).
> >            05  FILLER                  PIC X VALUE '/'.
> >            05  X-DAY1                  PIC X(2).
> >            05  FILLER                  PIC X VALUE '/'.
> >            05  X-YEAR                  PIC X(2)  DATE FORMAT YY.
> >
> > GnuCOBOL gives this compile message on the X-YEAR line:
> >
> > SOMEPROG.cbl: 31: error: syntax error, unexpected DATE, expecting EXTERNAL
> > or EXTERNAL-FORM or GLOBAL or IDENTIFIED
> > SOMEPROG.cbl: 31: error: 'FORMAT' is a reserved word, but isn't supported
> >
> > What are my options to get this to compile cleanly and run with the same
> > effect as what it ran on the mainframe?
>
>       What form of the ACCEPT statement is associated with this structure?  Need to
> know that in order to determine if DATE FORMAT YY is significant or can be
> removed.

Not familiar the option, but would imagine it is linked to the Y2K issue that
effected  the date problem. It would probable modify the value of the year to
change values of 00-89 or 90 to 100-189 or 190, so the calculation of
subtraction would result in a positive versus negative number.
In RPG used to just do the calculation and if result is negative add 100.

Would need to see more the exact code required could be figured.

https://www.ibm.com/support/knowledgecenter/en/SS6SG3_4.2.0/com.ibm.e
ntcobol.doc_4.2/PGandLR/ui/up4510.htm

Shows info, but not full code usage.
Seems to use the year in which program is run with the negative numbers, so
interesting to see more code.

>
> Leslie


+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)     
 mailto:address@hidden                           
 mailto:address@hidden
 Guam - Where America's Day Begins                       
 G4L Disk Imaging Project maintainer
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

address@hidden CREDITS

ROSETTA      65594841.390880 | ABC          16613838.513356
SETI        109409932.848087 | EINSTEIN    141189312.499240



reply via email to

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