Fix done by @rumii available at https://github.com/OCamlPro/gnucobol/commit/dab76ce13ac305ed261ebbce47a37cca7885c5ea.patch - will be checked in "soon" (likely after copyright papers are finished).
Fix available at https://github.com/OCamlPro/gnucobol/commit/dab76ce13ac305ed261ebbce47a37cca7885c5ea.patch - will be checked in "soon" (likely after copyright papers are finished).
Thanks for posting an English version - but that should really be part of the same post as your Spanish one, also if it is an updated version - so let's keep any discussion to [56252239cf] (you may edit your post there, then we can also delete this additional topic).
Hi GnuCOBOL community, I'm sharing two Bash tools I built while learning COBOL with the examples in gnucobol-contrib. run_cobol.sh v4.0 Compiles and runs COBOL programs with automatic fixed/free detection. Supports --debug, -v (verbose), -I for COPY books, --std <dialect>, -O <n>.</n></dialect> New in v4.0: --check (syntax-only), --dry-run, --clean, --no-backup, --no-exec. Creates timestamped backups and logs. backup_masivo.sh v2.0 Finds all .cob and .dat files in a directory and backs them up, preserving...
Hi GnuCOBOL community, I'm sharing two Bash tools I built while learning COBOL with the examples in gnucobol-contrib. run_cobol.sh v4.0 Compiles and runs COBOL programs with automatic fixed/free detection. Supports --debug, -v (verbose), -I for COPY books, --std <dialect>, -O <n>.</n></dialect> New in v4.0: --check (syntax-only), --dry-run, --clean, --no-backup, --no-exec. Creates timestamped backups and logs. backup_masivo.sh v2.0 Finds all .cob and .dat files in a directory and backs them up, preserving...
If you are learning then I highly recommend to go through the worldcities example (step by step extension of a program with needs and coding similar to tasks in production) and if anything is unclear while doing so (you'll highly benefit from the "step by step" approach) check the Programmer's Guide next to it.
Hola a todos, Comparto dos scripts Bash que fui creando mientras aprendía COBOL con los ejemplos de gnucobol-contrib. Los probé con los archivos de samples/ y funcionan correctamente. run_cobol.sh Compila y ejecuta programas COBOL automáticamente. Detecta si el archivo es formato fijo o libre. Crea backup del ejecutable anterior antes de compilar. Genera logs con timestamp. Valida argumentos y dependencias (cobc). Maneja señales (trap) para limpiar temporales. backup_masivo.sh Busca todos los archivos...
Hola a todos, Comparto dos scripts Bash que fui creando mientras aprendía COBOL con los ejemplos de gnucobol-contrib. Los probé con los archivos de samples/ y funcionan correctamente. run_cobol.sh Compila y ejecuta programas COBOL automáticamente. Detecta si el archivo es formato fijo o libre. Crea backup del ejecutable anterior antes de compilar. Genera logs con timestamp. Valida argumentos y dependencias (cobc). Maneja señales (trap) para limpiar temporales. backup_masivo.sh Busca todos los archivos...
¡Gracias por la aclaración, Simon! Sí, soy consciente de que el prompt es un trabajo en progreso. Lo empecé cuando no sabía nada de COBOL y lo voy refinando a medida que aprendo. Tomo nota de tus consejos: Decir "LLM" en lugar de "IA". Incluir instrucciones para que el LLM consulte documentación real y use cobc -fsyntax-only para verificar la sintaxis. Explorar lo de graph-ql para acceder a la documentación. Justo estoy guardando tus mensajes para trabajar en una versión futura del prompt. Cuando...
It makes AI a senior expert in COBOL, Bash and banking Kafka. Reality check: It asks the LLM (we are far away from AI) to pretend to be that. Especially the COBOL part is hard for LLMs as their training data has commonly not many examples. It will therefore be "even more confident" to do things correct while inventing English sounding syntax that does not even exist. For programming languages it is commonly better for an LLM to be used as an agent with access (and instructions how to do so!) to a...
Hi Lucas and welcome to GnuCOBOL! Here's the review comment posted some minutes ago on GH, posting it possibly overlap with your post here. Thanks for the idea. Note that there is to be no ON OVERFLOW as all is DELIMITED BY SIZE - so the fixed size needs to be valid (we actually should have a warning if there is always an overflow and also use that to handle any exception code as "normal" condition in the compiler [= raise "always false/true" warnings - these and more musings in [feature-requests:#519])....
STRING / UNSTRING performance for literals + all DELIMITED BY SIZE
compiler config for USAGE in STRING / UNSTRING
Similar check is done in IBM Enterprise COBOL, I therefore deduce we should have an unconditional check -> error without dialect configuration here. Note that numeric-edited items are to be seen as USAGE DISPLAY, so they are allowed (while I see no reason that we should have a bug there, we may miss tests to check that they are handled correctly). Assigned to Ramy for "later" :-)
Hola comunidad GnuCOBOL, Soy Lucas, un programador que empezó a aprender COBOL hace poco. Durante mi aprendizaje, creé un "prompt" para asistentes de IA que me ayudó muchísimo a entender el lenguaje y a escribir código más seguro y robusto. Lo probé con los ejemplos de gnucobol-contrib. ¿Qué hace este prompt? Convierte a la IA en un experto senior en COBOL, Bash y Kafka bancario. Obliga a usar diagramas, pseudocódigo y buenas prácticas. Valida automáticamente seguridad, manejo de archivos y omisiones...
Hi Lucas and welcome to GnuCOBOL! Here's the review comment posted some minutes ago on GH, posting it possibly overlap with your post here. Thanks for the idea. Note that there is to be no ON OVERFLOW as all is DELIMITED BY SIZE - so the fixed size needs to be valid (we actually should have a warning if there is always an overflow [all lengths of DELIMITED BY SIZE > target size] and also use that to handle any exception code as "normal" condition in the compiler [= raise "always false/true" warnings,...
Hola, Soy Lucas, un programador nuevo en COBOL. Estuve aprendiendo con los ejemplos de gnucobol-contrib y encontré una pequeña mejora en samples/altkey/altkey.cob. Cambios realizados: Agregué ON OVERFLOW al STRING del párrafo sfo-show-file-operation para evitar desbordes silenciosos. Traduje los literales a español para consistencia con el resto del programa. Probado con: cobc -x -fixed samples/altkey/altkey.cob && ./altkey Sin errores. Adjunto el archivo .patch generado desde mi fork en GitHub....
Hola, Soy Lucas, un programador nuevo en COBOL. Estuve aprendiendo con los ejemplos de gnucobol-contrib y encontré una pequeña mejora en samples/altkey/altkey.cob. Cambios realizados: Agregué ON OVERFLOW al STRING del párrafo sfo-show-file-operation para evitar desbordes silenciosos. Traduje los literales a español para consistencia con el resto del programa. Probado con: cobc -x -fixed samples/altkey/altkey.cob && ./altkey Sin errores. Adjunto el archivo .patch generado desde mi fork en GitHub....
Hello Michael, it should run with BDB as well, but for license reasons it might be better to use VBISAM. And: if you have already downloaded the souce - pls. repeat it once again because I did not pick up the last version during my initial upload. This is my first GitHub project and I am still learning the tool. //Klaus
Hello Michael, it should run with BDB as well, but for license reasons it might be better to use VBISAM. And: if you have already downloaded the souce - pls. repeat it once more because I did not pick up the last version during my initial upload. This is my first GitHub project and I am still learning the tool. //Klaus
Thank you very much for this work. The GUI looks great. I'd love to give that a try . I'm currently learning COBOL, C and GTK3. Your example comes at just the right time. And Geany is nice, too :-) EDIT: Is vbisam mandatory or runs the example also with bdb?
Thank you very much for this work. The GUI looks great. I'd love to give that a try . I'm currently learning COBOL, C and GTK3. Your example comes at just the right time. And Geany is nice, too :-)
Hello, I have created a GitHub project demonstrating a proof of concept for a master data maintenance application offering CRUD (create/read/update&delete) functionality and multi-user support developed with GnuCOBOL, VBISAM and GTK3. Two screenshots: And the about screen: Here's the link to the GitHub project: vendorgui3 Have fun with GnuCOBOL Klaus
The diagnostic is issued with -Wadditional C:\GEDIT\COBOL>cobc -x screen01.cob -Wadditional screen01.cob:24: warning: 'nmbr1' has numeric VALUE without PIC; PIC will be imp lied [-Wadditional] 22 | 02 pic x(01) value space 23 | background-color white lowlight. 24 > 02 nmbr1 pic 9(01) value 1 25 | *> 02 nmbr1 pic x(01) value '1' 26 | background-color white lowlight
Nice to know - have you compiled with -Wadditional as well? That warning is not enabled by default.
When I compiled it with 3.3-dev all is good 0 warnings in compilation group 0 errors in compilation group
Dosbox emulates the beep (interrupt) with a speaker signal, GnuCOBOL will beep if the system provides that functionality. Do you build GnuCOBOL on your own? If not: where do you get it from? For esc and function keys -> see runtime.cfg - you can just add a line without a leading # at the place where you want to have a non-default setting - see ESC and function. You also can try to configure the beep to use a different approach and see which is supported by your environment.
When compiling screen01.cob using GnuCobol 3.2 (64 bit, Arnold Trembley package) I get this "false" warning : Q:\COBOL\SOURCE\screen01.COB:24: warning: 'nmbr1' has numeric VALUE without PIC; PIC will be implied [-Wadditional] 22 | 02 pic x(01) value space 23 | background-color white lowlight. 24 > 02 nmbr1 pic 9(01) value 1 25 | *> 02 nmbr1 pic x(01) value '1' 26 | background-color white lowlight When I replace line 24 by line 25 the program compiles without warnings. I know, it's only a warning,...
Thanks for the follow up. I installed dosbox and my program runs well on it, including the BEEP function which I use a lot. When entering the basketball play-by-play during a game, the stat guy needs to hear immediately if he enters something invalid. Gnucobol was not going to support BEEP as far as I could tell. I just read thru the previous posts and found the BEEP:BELL note so that may be handled now. It was also hard to identify usage of various function keys - I think ESC was not usable and...
Thanks for the follow up. I installed dosbox and my program runs well on it, including the BEEP function which I use a lot. When entering the basketball play-by-play during a game, the stat guy needs to hear immediately if he enters something invalid. Gnucobol was not going to support BEEP as far as I could tell. It was also hard to identify usage of various function keys - I think ESC was not usable and I also use that a lot. If that is not true, I would want to continue the migration project since...
So @stevemackinney - how is your migration project going? Did you stumble over anything where a better support from cobc would be helpful?
If building on a system with recent GCC you'll likely have to adjust CC/CFLAGS - see [bugs:#1214]. That is not different in GC32. If you have that covered and still get errors (and not build with another isam backend than BDB - see the NEWS comment about ISAM edge cases with other backends), then posting the resulting testsuite.log would be useful. And when you checkout a new version from gc3x branch, then yes, you'll currently get 3.3-dev which is much newer with more features and fixes than gc...
As noted we don't want to enforce C99 and some compilers even don't have that option - we'd want to check if the compiler setup as-is does compile the relevant code, and only if not - and no std is given - try to add it: Adding it to default CFLAGS will need a test in configure in any case - so we should first check if the void function declaration and pointer use works or not - and only try to work around that by specifying a std as-needed (and then try gnu17 / c17 / gnu11 /c11 / gnu99 / gnu89 /...
Thank you Simon When I did option #1. I got a mismatch of software. Looking at HACKING. I saw a option ./autogen.sh install. I invoked the command and i was able to run configure and make successfully. Ran make check and make test. There were a number of errors. I installed the compiler onto my Manjaro VM. When I checked the version it was gnucobol-3.3.-dev.0 I thought there was an update to gnucobol-3.2. I expected that version when I check it out. Am I missing something? Should I attach the log...
configure and other generated files aren't part of the repository since... GC 1.1 or so. You have two options: 1) build from version control -> after checkout/clone/download execute autogen.sh (creates the additional files, needs more tools - see HACKING for the list); this works with any version (also older ones or "tags") 2) get a nightly tarball (or even binary), the places to look for are https://sourceforge.net/projects/gnucobol/files/gnucobol/nightly_snapshots/ and nowadays also the OCamlPro...
Hi In the past I was able to use svn to checkout a version of GnuCOBOL. Here is the command line: svn checkout https://svn.code.sf.net/p/gnucobol/code/branches/gnucobol-3.x gnucobol-3.2 It downloads files, however; there is no configure file. Has something changed? I am looking to download the latest gnucobol-3.2. I also would like to download the latest of gnucobol-3.3-dev. I am working on Manjaro. I have been able to compile successfully vbisam2.2 and visam-2.2. I appreciate any help. Regards,...
Of course there are hallucinations and missing information in that LLM generated text... there is no libcob.conf but runtime.cfg there is no COB_EBCDIC_OVERRIDE runtime parameter, instead there is the CODE-SET clause in plain COBOL that can be used to do on-the-fly conversion the file part and the general post miss to note the different collating sequence - which again are both possible to explicit code in COBOL (and with GnuCOBOL 3.x+ also possible to pass on the command line / dialect configuration)...
I actually like Claude. I have a GAB subscription and that is good enough for me. Ralph, just a note, when I start a session about a cobol project or issue, I give AI my expectaions and specifications on coding. I usually just paste this Text or MarkDown file into the AI and then proced with my coversation... Here attached is the file I use, and it is a continuing process to add or subtract as I use AI. Note, I am trying to learn C so not much cobol going on these few months... Attahced:
I posted the one here, but the longer one would not let me post on linked in. I will include it here for the peoples ! ~~ Response to the WINCOBOL/zOS Migration Post This is a well-written and technically accurate critique. Let me engage with it honestly rather than defensively. What the Author Gets Right The EBCDIC problem is genuinely hard. The commingling of: EBCDIC character fields Packed decimal (COMP-3) Big-endian binary (COMP, COMP-4, COMP-5) Arrays (OCCURS) REDEFINES clauses ...in a single...
Hey Mickey can you post this as a comment to a post I made on LinkedIn? Url below: https://www.linkedin.com/posts/ralph-linkletter-0a1a6218b_ai-driven-mainframe-migrations-a-truthful-activity-7452777690849439744-wrlP?utm_source=share&utm_medium=member_desktop&rcm=ACoAACzUG_kBgHDzwjeXOhYmzGBLqRK7rRNH8Bo Also consider the longer Claude analysis that you emailed to me. It seems inappropriate for me to post these as comment to my own post - agreed ?
Claude agrees: You’re welcome. The post makes legitimate technical points that deserve honest acknowledgment rather than defensive deflection. The author clearly has deep hands-on experience with the actual mechanics of zOS - not just theoretical knowledge. The packed decimal / big-endian binary / REDEFINES / VSAM combination is genuinely a multi-layered problem that no AI tool is going to auto-solve at production scale. Anyone selling that story to a CIO who has never seen a hex dump of a VSAM record...
April 21, 2026 "Claude AI - COBOL" and rescuing the IBM mainframe. What nonsense! What is the source of this "magical thinking / wishful thinking”? "Mainframe”, in this document is defined as IBM zOS. The Linux / Unix operating systems running under zOS are not considered to be "Mainframe". Take a peek at why this Claude rescue is nonsensical. Linux and Windows are the target operating systems of mainframe migrations. This is a tiny slice of an actual mainframe VSAM data file. See attachment As an...
It all depends what license concerns you have (just my understanding, consult your lawyer if the business depends on it): if you use GnuCOBOL only for your in-house software - there's no problem with using AGPL ever, no matter how you use it (it is your code and you are your only customer for that software) if you use it to provide a web frontend to customers then you'd have to make the code ( everything using that) available via that frontend as well - no problem for BDB+GnuCOBOL+dependencies, but...
What if you build GnuCOBOL with BDB v5.3.28? Wouldn't that eliminate licensing concerns because it was the last release before the license was changed to AGPLv3? Anon
https://www.youtube.com/watch?v=FPR-aPZAhZ4
1222
The *CBL Directive is missing
I have corrected errors: Last param for the must be None Comment added for CBL saying that is it NOT implemented at least for v3.2. I am not so sure that it should be specified if it is not in use and the LIST and MAP is unlikely to ever be. So whats the point of it.
It seems this ticket has been "lost" on the way. We found out that there's no "very easy" solution as we have to consider both the DEBUG-ITEM stuff and same field names but a different reference (occurs). Do you want to come back to this or should we end our findings with "we'd generate one seldom (COBOL-code), but unnecessary memmove less - but need to add a bunch of code for doing so" and close this ticket? Even if we do so... do we have useful tests that we can add to cover the current code better...
@dhugonnard this patch is unrelated to this ticket - if we don't have it in another place please post it whereever it is appropriate
I had already tested @OPTIONS, which exists for both Fujitsu and AcuCOBOL (with different parameters !). The clause is detected and accepted, but the result is always: warning: ignoring unknown directive: '@options FREE APOST' [-Wothers] The clause *CBL or *CONTROL had been documented in Ed Hart's GRAMMAR.
Just a note: @OPTIONS directive from Fujitsu is also "kind of supported" (I think it currently is just ignored, but adding support for the ones we have CBL or $ or >> support for is "only some tedious work of mostly copy+paste" ) - you hopefully find something in our testsuite for that. ... speaking of where to get data: how was the CDF-CBL list info resolved? Does anyone know if the MF dollar list is complete? Checking for possible missing items likely means inspecting ppparse.y (and pplex.l).....
The *CBL Directive is missing
The *CBL Directive is missing
Tildes also don't exist on the Italian keyboard. (And neither do curly brackets). To create tildes, however, in SourceForge we have the </>button. If you mark a block of multiple lines, then using </> inserts three tildes at the beginning of the block and three tildes at the end of the block. If, however, you mark a block on a single line or even a single word and use </>, a backtick is inserted at the beginning of the word and one at the end of the word.
Ok . By the way i manage to have a version of cob_mpf_exp that on my pc is between 4 and 5 times faster .
Feel free to do so (note: having at least a "hint" here is always good, as GitHub will only be a mirror - but learning git + PR workflows is good, as that will be nearly identical when we migrate from here to codeberg late[r] this year). I hope to get back to the PRs (and other open issues) when some of the load at work is down again.
Thanks for letting me know - obviously default keyboard layouts on Windows for Italy don't have that character - but not even the tilde? Both are parts of ASCII 7 bit, so that comes as a surprise. Backtick is classically used on any *nix as that creates a subshell and the tilde is the home directory, so also used often. Seems like https://github.com/ilpianista/itlinux-win-keyboard fixes both with the expected AltGr shortcuts.
Hi Simon do you want me to integrate the patch for ln an for the ticjer #1206 in my github repo in order to create a pull request (now that i begin to use git & github serioulsy , may ba it would be good to have all in github) Denis
Okay, I get it, but this is really weird. I've never used the backstick character before ! I saw that you can only get it by typing Alt + 96.
three (or more) backticks `, but yes, it seems to work on the tildes ~ as well (it used to need a newline + : + name, something you may recognize in old posts)
I don't understand what characters you used before "cobolfree". Anyway, I used three tildes (using ther </> button ) and added the string "cobolfree" after first marker and it seems to work just the same.
ADD ... TO .... GIVING: a. In the ISO standard, the "TO" clause is mandatory. b. In IBM's COBOL documentation, the "TO" clause is indicated as optional. c. GnuCOBOL also allows the "TO" clause to be optional, and this is documented in the PG. see attached diagrams. The example program demonstrates that GnuCOBOL compiles without errors. It's unclear what the meaning of it being optional might be. >>SOURCE FREE IDENTIFICATION DIVISION. PROGRAM-ID. TESTADD2. DATA DIVISION. WORKING-STORAGE SECTION. 01...
side note: if you surround your code by the correct matching syntax marker, you get better highlighting - please edit your post to test that Instead of ~~~ ADD AAA 10 TO 22 GIVING GGG DDD *> comment here ADD AAA 10 22 GIVING GGG DDD ~~~ which renders as ADD AAA 10 TO 22 GIVING GGG DDD *> comment here ADD AAA 10 22 GIVING GGG DDD try ```cobolfree ADD AAA 10 TO 22 GIVING GGG DDD *> comment here ADD AAA 10 22 GIVING GGG DDD ``` which renders as ADD AAA 10 TO 22 GIVING GGG DDD *> comment here ADD AAA...
It is optional with ISO as well (the TO is not underlined), so we luckily don't have to add a dialect configuration :) ADD ... GIVING adds a list of elements (which may be only 1 element) to another element, stores the result in an intermediate result and then stores it into a list of other elements. It does make no difference to add a list of "one more" element to logical zero to - the result in the intermediate is still the same. ADD AAA 10 TO 22 GIVING GGG DDD ADD AAA 10 22 GIVING GGG DDD
Perhaps more details would be needed to know what the issue is?
1221
Some fixes on Chapter 2 and SUBTRACT
ADD ... TO .... GIVING: a. In the ISO standard, the "TO" clause is mandatory. b. In IBM's COBOL documentation, the "TO" clause is indicated as optional. c. GnuCOBOL also allows the "TO" clause to be optional, and this is documented in the PG. see attached diagrams. The example program demonstrates that GnuCOBOL compiles without errors. It's unclear what the meaning of it being optional might be. >>SOURCE FREE IDENTIFICATION DIVISION. PROGRAM-ID. TESTADD2. DATA DIVISION. WORKING-STORAGE SECTION. 01...
ADD ... TO .... GIVING: a. In the ISO standard, the "TO" clause is mandatory. b. In IBM's COBOL documentation, the "TO" clause is indicated as optional. c. GnuCOBOL also allows the "TO" clause to be optional, and this is documented in the PG. see attached diagrams. The example program demonstrates that GnuCOBOL compiles without errors. It's unclear what the meaning of it being optional might be. >>SOURCE FREE IDENTIFICATION DIVISION. PROGRAM-ID. TESTADD2. DATA DIVISION. WORKING-STORAGE SECTION. 01...
Some fixes on Chapter 2 and SUBTRACT
@sf-mensch what do you think about the following patch?
@sf-mensch what do you think about the following patch? ``` Index: configure.ac =================================================================== --- configure.ac (revision 5668) +++ configure.ac (working copy) @@ -714,6 +714,21 @@ AC_STRUCT_TM AC_CHECK_TYPES([sig_atomic_t], [], [], [[#include <signal.h>]])</signal.h> +curr_cflags="$curr_cflags" +CFLAGS="$CFLAGS -std=gnu99" +AC_MSG_CHECKING([for -std=gnu99 support]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ if !defined(STDC) || !defined(STDC_VERSION)...
@sf-mensch what do you think about the following patch? ```patch Index: configure.ac =================================================================== --- configure.ac (revision 5668) +++ configure.ac (working copy) @@ -714,6 +714,21 @@ AC_STRUCT_TM AC_CHECK_TYPES([sig_atomic_t], [], [], [[#include <signal.h>]])</signal.h> +curr_cflags="$curr_cflags" +CFLAGS="$CFLAGS -std=gnu99" +AC_MSG_CHECKING([for -std=gnu99 support]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ if !defined(STDC) || !defined(STDC_VERSION)...
This is all documented but little is always for standard Micros (there are exceptions for some with 64 and 128 bit CPU's). IT is hardware dependent. COMPUTATIONAL or COMP as against COMP-1 thru 15 and X etc. RTFM's. GC is NOT designed for use as standard with M/F's so mileage may vary. I did try and install it on a OS390 system ssome years back but underlining packages was not available to support it but that may now have changed but in any event use FREE format could well be an issue with PDSE etc....
"BINARY = COMP " Which COMP ? big or little endian ? "BINARY-CHAR, BINARY-SHORT, BINARY-LONG . . . Where did this syntax originate? All the above are little endian How confusing can it be made ? BINARY with a PICTURE CLAUSE is big endian BINARY-xxxxx without a PICTURE CLAUSE is little endian COMP-5 on zOS is big endian that infers implicitly NOTRUNC The screen shots are from AI ? Is there a "C" data type for big endian ? The screen shots identify the big endian formats as int / uint with scalar -...
"BINARY = COMP " Which COMP ? big or little endian ? "BINARY-CHAR, BINARY-SHORT, BINARY-LONG . . . Where did this syntax originate? All the above are little endian How confusing can it be made ? BINARY with a PICTURE CLAUSE is big endian BINARY-xxxxx without a PICTURE CLAUSE is little endian COMP-5 on zOS is big endian that infers implicitly NOTRUNC The screen shots are from AI ? Is there a "C" data type for big endian ? The screen shots identify the big endian formats as int / uint with scalar -...
BINARY = COMP defined by quantity of 9's and presence or not of S - see 6.9.52. BINARY-CHAR = 1 byte 0 - 255 depending on usage of SIGNED / UNSIGNED. See 7.1.6.3. On 12/04/2026 03:49, Ralph Linkletter wrote: COMP-5 and COMP/COMP- have the same "C" typing ? COMP / COMP-4 are big endian - is there such a "C" type ? I do not understand BINARY-CHAR (signed or unsigned) I guess it would be PIC 9(02) COMP-X. If so a compile would need -fbinary-size=1-8 PIC X(01) COMP-X If I recall correctly there is zOS...
COMP-5 and "COMP / COMP- 4 " have the same "C" typing ? COMP / COMP-4 are big endian - is there such a "C" type representing big endian ? I do not understand BINARY-CHAR (signed or unsigned) I guess it would be PIC 9(02) COMP-X. If so a compile would need -fbinary-size=1-8 PIC X(01) COMP-X If I recall correctly there is zOS BINARY as well. This BINARY form has no suffix - "-SHORT for example" The zOS form of binary is big endian. The above BINARY form is not provided for in any table on this thread....
COMP-5 and "COMP / COMP- 4 " have the same "C" typing ? COMP / COMP-4 are big endian - is there such a "C" type representing big endian ? I do not understand BINARY-CHAR (signed or unsigned) I guess it would be PIC 9(02) COMP-X. If so a compile would need -fbinary-size=1-8 PIC X(01) COMP-X If I recall correctly there is zOS BINARY as well. This BINARY form has no suffix - "-SHORT for example" The zOS form of binary is big endian. The above BINARY form is not provided for in any table on this thread....
COMP-5 and COMP/COMP- have the same "C" typing ? COMP / COMP-4 are big endian - is there such a "C" type ? I do not understand BINARY-CHAR (signed or unsigned) I guess it would be PIC 9(02) COMP-X. If so a compile would need -fbinary-size=1-8 PIC X(01) COMP-X If I recall correctly there is zOS BINARY as well. This BINARY form has no suffix - "-SHORT for example" The zOS form of binary is big endian. The above BINARY form is not provided for in any table on this thread. IBM COBOL is 90+ % of the universe...
*not verified
here is an AI version:
1220
PICTURE U is missing
PICTURE U is missing
PICTURE U is missing
Why was it an intermittent failure ? Should it not have failed all the time ?
And it works like a charm! Tyvm for the perfect explanation.
It would be great if someone also added the comp-? to the documents as well as the BINARY stuff. There is a set of arithmetic COBOL definitions missing from this document. I have no idea what a BINARY-CHAR is. PIC X(01) comp-x? The COMP-5 declarations have "C" counter parts with "C" scalars BINARY less any suffix is big endian - how are bytes allocated to BINARY (big endian) PIC9(04), 9(08, 9(15) comp. Indicating the number of bytes allocated to each Discuss -fnotrunc / -ftrunc and its effect on...
It would be great if someone also added the comp-? to the documents as well as the BINARY stuff. There is a set of arithmetic COBOL definitions missing from this document. I have no idea what a BINARY-CHAR is. PIC X(01) comp-x? The COMP-5 declarations have "C" counter part with "C" scalars BINARY less any suffix is big endian - how are bytes allocated to BINARY (big endian) PIC9(04), 9(08, 9(15) comp. Indicating the number of bytes allocated to each Discuss -fnotrunc / -ftrunc and its effect on computations...
Please have a look on my previous posts above (you may have missed it): https://sourceforge.net/p/gnucobol/discussion/help/thread/59e651b2c7/?limit=25#eb3e/0a15/fed0/0161 I figured out, how we can do it with the WinBGm-library with SuperBOL-AIO and provided a little howto with examples and the commands to compile it. Screenshot is also attached there. The second example opens a new window with the graphics output (lines, rectangle and circle) :-)
It seems the issue is getting complicated. I'd like to try to sort out and/or simplify what's emerged so far. A graphics library is required, and the one that works with both pdcurses (used by Arnold's GnuCOBOL) and ncursesw (used by SuperBOL AIO) is the Raylib library. It's unclear whether, as I hope, there's a ready-to-download railib.lib library for WINDOWS 11, or whether it has to be built by compiling from source code. If there's a ready-to-download raylib.lib library to use with GnuCOBOL (Arnold...
Yes, it is from the GnuCobol Programmers Guide. I called a C function with double parameter, and without to check the mapping in the documentation, I defined a COBOL variable with BINARY-DOUBLE data type. Analouge like the other mappings. But of course it didn't work. Only the "double" correspondes not to the "double". We need here COMP-2. Why it is so, I don't know? It took some time until I found it out. :)
See also attached image from: https://svn.code.sf.net/p/gnucobol/code/external-doc/GnuCOBOL_C_Interaction.pdf
As found in the GnuCobol Programmers Guide.
COBC signal SIGSEGV
Here is the patch for this issue. in cobc.c in the cobc_xref_set_receiving function added the following to check for a NULL field name and return if it is NULL. *** F:/GNUCOBOL-33-SVN/cobc/cobc.c Tue Dec 2 14:17:48 2025 --- F:/AA-minGW32-static/cobc-xref-fix.c Fri Apr 10 12:27:42 2026 *************** *** 6128,6129 **** --- 6128,6132 ---- target_fld = CB_FIELD_PTR (target); + if (!target_fld->name) { + return; + } target_fld->count++; Chuck Haatvedt