224
questions
0
votes
1
answer
41
views
How to pass a long by value?
I'm trying to understand how to (or if it is possible to) pass a long to a C function by value. Here's my simple test C function:
#include <stdio.h>
long addone (long x) {
printf("c ...
0
votes
2
answers
67
views
GnuCobol file not found
I am looking for a solution for the following problem.
I run a very simple cobol program to read a file.
I use the following code :
IDENTIFICATION DIVISION.
PROGRAM-ID. GADGETS.
...
0
votes
0
answers
49
views
GNUCobol 3.2.0 Copybooks
I am working with GNUCobol cobc version 3.2.0
It seems that COPYBOOKS do not work during the compile step? The source code is going through the esqlOC precompiler first. I have these to lines
COPY ...
1
vote
2
answers
66
views
in gnucobol, sub programs of one parent can't invoke each other
I'm currently trying to achieve a pattern to write modest these days' programs in cobol.
By these days' programs I mean a source file with a few variables and procedures visible to each other.
The ...
0
votes
3
answers
199
views
gnucobol failing to open/create an indexed file
Following a course in COBOL, I'm trying to create an indexed file.
Many times the file reading chapter precedes the writing one, so I had no file to read, and an indexed file is not just a file.
...
0
votes
2
answers
150
views
Invalid memory address error in my COBOL application
I wrote this COBOL application to perform a prime factorization, it is not yet completed.
When I run the code, I get this error/output:
Programm zur Darstellung der Primfaktorzerlegung mit einer ...
1
vote
2
answers
117
views
Segmentation fault error in my COBOL application
I wrote this COBOL application to perform a prime factorization, it is not yet completed.
When I run the code, I get this error:
unknown (signal)
cobc: aborting compile of jdoodle.cobc at line 68 (...
0
votes
1
answer
55
views
Multiple PROGRAM-ID's without matching END PROGRAM
I am trying to implement a simple calculator in COBOL and struggling with a particular issue.
My compiler, GNU Cobol 3.2.0 is always giving me this issue and I do not know how to fix ist.
The error is:...
0
votes
1
answer
46
views
How to setup GixSQL connections
I am working on a prototype for a COBOL application in a container. Now I wanted to connect it to a database and I found ODBC. But it did not work our because I got the following error during docker ...
1
vote
1
answer
249
views
Resolving MinGW Error with GnuCOBOL on Windows
I am not certain whether this is a MinGW issue, or if there's some problem with the way that GnuCOBOL's cobc is calling the C compiler. I've looked through the manual, but I'm not seeing anything ...
0
votes
1
answer
63
views
Decimals are not stored in a numeric variable
I’m just starting with COBOL, and I’m testing storing and displaying values on the screen. When the user enters the value 10.5 in the terminal, the program stores it as 10.0. I’m using the GnuCOBOL ...
0
votes
1
answer
72
views
Foreground color doesn't work in Gnucobol for Windows
I am using GnuCobol for Win 10. I need to display a console screen with black background and green foreground but doesn't work, It doesn't using the foreground color, neither the background color does....
0
votes
1
answer
33
views
Unwanted underscore using filler displaying from screen section
I am using GnuCobol for Win 10. When I use filler with spaces in a normal display the screen shows the spaces, but when I use filler in screen section I get unwanted underscores (_____). Is ther any ...
1
vote
1
answer
420
views
How to connect to a MYSQL Database in cobol using Gnucobol (Via Dockerfile)
I am working on a prototype for a COBOL application in a container. Now I wanted to connect it to a database and I found ODBC. But it did not work our because I got the following error during docker ...
0
votes
2
answers
88
views
Keep trailing spaces when writing to file organization line sequential
I'm using GnuCOBOL and writing to a file, organization is line sequential, and I need to keep trailing spaces. Line sequential appends the [CR][LF] characters, but does so after removing trailing ...