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 verify ISBN and calculate checksum digit in COBOL?

My problem is I get a different out put from what I am supposed to get: look very below for the output wanted. here is the output I get: 978-1734314502 (correct and valid) 978-1734314509 (incorrect, contains a non-digit) 978-1788399081 …
0
votes
1 answer

Are there any major differences between OpenCobol and NetExpress Microfocus Cobol?

I am taking a course in COBOL this semester and just got the syllabus, which requires the NetExpress Microfocus COBOL compiler. I'd rather use OpenCobol though, so I can stay on Linux or OS X. Are there any major differences between the two…
Scott
  • 302
  • 2
  • 11
0
votes
1 answer

Conflicting Functionality with COBOL-language-support extension in Visual Studio Code

I am trying to add the COBOL-language-support extension in Visual Studio Code. I am running Visual Studio Code in WSL-Ubuntu, and have already downloaded in gnucobol in Ubuntu. I am trying to add the cobol-language-support extension to Visual Studio…
0
votes
3 answers

A simple way to go back to the last statement COBOL

I am making a simple appointment program and I want to have a back function that allows the user to return back to the previous line. For example, the user typed in the wrong year and wanted to change it so they would need to have a back button to…
0
votes
1 answer

Invalid key error when compiling my code with COBOL

I am studying COBOL based on a handout. At the end of learning, I copied this code into a file called testerel01.cob. Then I installed gnucobol 3.1.2 by compiling from source. When compiling, several errors appeared. I fixed most of them, but this…
0
votes
2 answers

How to fix vscode GnuCOBOL setup "configuration error: default.conf: No such file or directory"

we are using cobol now, but this config error keeps on appearing and I do not know how to fix this thing. Any help would really mean alot. (Just a beginner and trying to learn vscode)
Pharaoh
  • 13
  • 3
0
votes
4 answers

Using GNUCOBOL, programs not outputting anything

I am trying to compile a simple program using COBOL and the gnuCOBOL cobc compiler. However, I cannot seem to get any sort of output for my program, error or otherwise. So I wrote a barebones "Hello World" program, and even that doesn't output as…
ABCDEF
  • 23
  • 1
  • 5
0
votes
1 answer

invalid level number 'EXEC' error in OpenCOBOL

this is my code Here : ****************************************************************** * Open Cobol ESQL (Ocesql) Sample Program * * FETCHTBL --- demonstrates CONNECT, SELECT COUNT(*), * DECLARE cursor, FETCH cursor,…
0
votes
1 answer

Trouble comparing hex values in COBOL

I'm trying to compare two hex values as in the code at the bottom. I was expecting that the IF statement, where I compare field A and field WS-FLD-X, would result in true, but it doesn't do it. In other words, when I move 12 to WS-FLD-A, the value…
NoChance
  • 5,632
  • 4
  • 31
  • 45
0
votes
0 answers

Clearing screen is making the input go over the output in GnuCOBOL

I am using OpenCobolIDE and just trying to play around with the external terminal to know how to use it for a later project but I am having a bit of trouble with trying to clear the terminal screen. What I am trying to do is: display anything ask…
0
votes
1 answer

How to search a simple table?

I'm trying to understand the SEARCH verb... Below I am reading sequential records from a file into a TABLE and then try to search it.. However it only matches when AIR-ID is 01 or 02, not 03. I must be missing something fundamental, and been trying…
0
votes
1 answer

Suggest improvement for simple Cobol program

I'm an "aspiring" programmer currently trying to learn Cobol. The code below is obviously a very simple Cobol program with hard-coded values. However I am curious to know how a more experienced Cobol programmer would improve such simple program.…
0
votes
2 answers

Why use VALUE HIGH-VALUES in 88 Conditionals?

I understand that HIGH-VALUES correspond to the highest in the collating sequence, however I do not understand why it may be a preferred method when using conditionals. Example: 01 StudentRecord. 88 EndOfStudentFile VALUE HIGH-VALUES. 02…
0
votes
1 answer

getting unwanted output in cobol program

Ok this is my first ever post here and this is the part where I am stuck. I am taking an input file and outputting a list of errors, One of the parts that I have to do is for a school district which is a string of 3. In the procedure division I…
0
votes
0 answers

Gnu Cobol in Mac os 10.9

I'm trying to install OpenCobolIDE on a Mac I get It is veerryyy old, it runs Mac OS Mavericks I ever used Windows, and I tried to install OpenCobolIDe, and the IDE itself works, but when I try to install Homebrew and running it…
aIDserse
  • 131
  • 8