Questions tagged [gnucobol]

GnuCOBOL is a free (like both in "free speech" and in "free beer") COBOL compiler, formerly known as OpenCOBOL. It implements a substantial part of the COBOL 85, COBOL 2002 and COBOL 2014 standards, as well as many extensions. GnuCOBOL translates COBOL into C and compiles the translated code using the native C compiler on various platforms, including GNU/Linux, Mac OS X, IBM z/OS, Unix, AS/400, and Microsoft Windows.

GnuCOBOL is an implementation of COBOL. For further information see:

An IDE explicit targeting GnuCOBOL is Gix-IDE, which comes with a source-level debugger, ESQL preprocessor and more. Editors based on vscode can also be setup for a "near IDE" experience to edit, compile and debug GnuCOBOL.

Please report bugs and raise issues you see with migrations to GnuCOBOL at either the discussion boards or in the feature request tracker.

Additional tools and COBOL source samples tested with GnuCOBOL are made available by the community.

See info pages for COBOL and COBOL85 for more information about the language.

201 questions
0
votes
1 answer

How to Select and display latest date (openCobol)

Im new to Cobol. A column of Date need to identify the latest date to be display. 8/9/2004 2/7/2016 24/04/1995 27/09/2016 And it able to identify 27/09/2016 as the latest date
0
votes
2 answers

Error: syntax error, unexpected "Identifier", expecting "end of file"

This is a sample program I am doing for my COBOL class and I had a few questions about an error code I am getting when I tried to compile through the command line. Please see below. Below the COBOL will be my terminal code. How can I fix the…
user5598040
0
votes
1 answer

COBOL Decimal Math/Business Logic

What am I missing? QualityPoints PIC 9v99 VALUE 4.00. XValue PIC 9v99 VALUE 3.00. Total PIC 999v99. outTotal PIC zz9V99. COMPUTE Total = QualityPoints * XValue. MOVE Total to outTotal. When I perform this compute my outTotal is…
CoryC
  • 11
  • 4
0
votes
1 answer

COBOL COMPUTE decimal values from a file

Trying to understand compute. Would it be correct to calculate the sum of the earned credits using FSemesterTotal which is a PIC 99V99 like this? COMPUTE FSemesterTotal = Earned + Earned. I think there is supposed to be a counter in my loop to check…
CoryC
  • 11
  • 4
0
votes
1 answer

COBOL File I/O Formatting

As the title may indicate, I am having some difficulty getting the desired output for my COBOL program. The program takes in data from a file and outputs in a specific format, this is for a homework assignment. When i run the program it works for…
CoryC
  • 11
  • 4
0
votes
1 answer

Cobol - syntax error, unexpected $undefined, expecting "end of file"

I have a problem with syntax in cobol. I'm using open-cobol package on Ubuntu 4.2.0-16-generic, and i've got error: ~/cobol$ cobc -free -x -o cal cal.cbl cal.cbl:6: Error: syntax error, unexpected $undefined, expecting "end of file" My cal.cbl…
Karol
  • 27
  • 6
0
votes
1 answer

How to resolve SQLCODE -805 in DB2 Express C, Windows 8.1, GnuCOBOL, OpenCOBOL IDE

I am trying to work with OpenCOBOL IDE and DB2 Express-C. A very simple program TEST0002.sqb is prep'ed and binded with DB2 creating - TEST0002.bnd and TEST0002.cbl files. Now when I execute the Program in OpenCOBOL IDE, I am getting -805. Following…
Amresh Kadian
  • 181
  • 1
  • 2
  • 11
0
votes
1 answer

Compiler Thinks Im Refering to Nonexistent Paragraph or Section

I am getting errors concerning my procedure division in one of my assignments for class. It is a COBOL Program that is supposed to keep a running total of the average height and weight of applicants, number of brown-eyed applicants, number of male…
0
votes
1 answer

GnuCOBOL program fails to compile after trivial changes in two lines

I have Ubuntu 12.04.5, I have installed the GnuCOBOL platform and I have programmed GnuCOBOL for a while without a problem. I am now doing something extremely trivial: I have a program MULT03.cob that I have compiled and run as below: …
0
votes
1 answer

How to download GNU COBOL 2016 and how does it work?

From what I understood from my researches is that GNU COBOL is a compiler and the input file has to be run under this compiler from the prompt command but what I have a hard time with is the right installation of GNU COBOL
hannah
  • 3
  • 2
0
votes
1 answer

Installing GnuCOBOL something missing

Hello Im trying to install GnuCOBOL in part of configuration I got that message configure: error: no acceptable ld found in $PATH if someone can help plz, thank u.
sacamoto
  • 55
  • 8
0
votes
1 answer

88 level on a particular digit in a numeric array?

I was working on a brute-force implementation of this RosettaCode challenge. I wanted to be able to handle numbers bigger than USAGE BINARY-DOUBLE so I wrote a dead simple bignum routine for adding. If I want to limit myself to a certain number of…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
0
votes
1 answer

how to form fields section in xfd file

I'm having problem to form the field section's structure into xfd files after analyse by issuing commnad "vutil32.exe -i -kx pogl.dad". I hope somebody could help me out how to form out field structure as highlighted in below. I've uploaded sample…
0
votes
0 answers

Getting last four (04) figures

Below is my code with the files and output file. The last four calculations are giving me the most trouble, mainly the DISCNT PRCNT. I'm not getting the correct output in discnt percnt; trying to figure out how to display it in the column; and if…
0
votes
1 answer

cobc: Invalid argument error when compiling

I'm currently taking up a course in COBOL and recently I have only been using an online compiler. When I decided to install the OpenCOBOL IDE. I keep getting the error "cobc: Invalid argument" whenever i try to compile. I tried multiple re-installs…