Simon Sobisch - 2026-04-02

We do have two different things here:

  1. io-status: depending on the COBOL standard and vendor/product version you have a different set; GnuCOBOL returns ISO 2026 codes
  2. runtime library callable functions like CBL_xyz: depending on the vendor/product version you have, the behaviour is slightly differently (especially how file and folder names are interpreted) and the return codes differ much more

For 1: we need a patch that allows dialect specific return codes; trunk has an implementation but that needs to be rewritten (we may could use the testcase) - see [feature-requests:#348].
This is a real issue for ports as you need to adjust the programs' value checks (making them portable is relative easy - but again that means a "recompile alone" is not enough - a state that we want to reach more and more).

For 2: I think we're more near to ACUCOBOL-GT concerning the return codes than MF, but in an ideal world we'd also have a dialect flag in cob_module for and check the current active module's dialect to return the expected code. But on the other hand, we get good away with "non-zero means an error" alone so far.

Patches welcome :-)

 

Related

Wish List: #348