GnuCOBOL

GnuCOBOL
Original author(s)Keisuke Nishida, Roger While
Developer(s)Edward Hart, Sergey Kashyrin, Ron Norman, Simon Sobisch and many others.
Initial release25 January 2002; 22 years ago (2002-01-25)
Stable release
3.2[1] Edit this on Wikidata / 28 July 2023; 16 months ago (28 July 2023)
Repositorysf.net/p/gnucobol/code
Written inC, with a C++ branch
Size2 MB
Available inEnglish, German, Italian, Japanese, Spanish
TypeProgramming language
LicenseGPL with runtime libraries under LGPL
Websitegnu.org/software/gnucobol

GnuCOBOL (formerly known as OpenCOBOL, and briefly as GNU Cobol) is a free implementation of the COBOL programming language that is part of the GNU project. GnuCOBOL translates the COBOL code into C and then compiles it using the native C compiler.[2]

History

While collaborating with Rildo Pragana on TinyCOBOL, Keisuke Nishida initiated the development of a COBOL compiler designed for integration with GCC, which led to the creation of the OpenCOBOL project. Nishida served as the lead developer until 2005, up to version 0.31. Roger While succeeded him as the lead developer and released OpenCOBOL 1.0 on December 27, 2007. Development on the OpenCOBOL 1.1 pre-release continued until February 2009. In May 2012, active development transitioned to SourceForge, and the February 2009 pre-release was officially marked as a release.[3] In late September 2013, OpenCOBOL was accepted as a GNU Project, renamed to GNU Cobol, and then finally to GnuCOBOL in September 2014.[4] Ron Norman contributed a Report Writer module as a branch of GnuCobol 2.0, and Sergey Kashyrin developed a version that uses C++ intermediates instead of C.[5]

Transfer of copyrights to the Free Software Foundation over GnuCOBOL source code (including versions with GNU Cobol and OpenCOBOL spellings) was finalized on 17 June, 2015.[6]

The latest current release is v3.2, which was released on 28 July 2023.

Philosophy

While aiming to adhere to COBOL standards, including the COBOL 2014 specification and features commonly found in existing compilers, the developers do not assert any formal level of standards conformance.[7] Nevertheless, the 2.2 final release successfully passes 9,688 out of 9,708 tests (99.79%) from the NIST test suite, with 20 tests excluded.[8]

GnuCOBOL translates a COBOL program (source code) into a C program. The C program can then be compiled into the actual code used by the computer (object code) or into a library where other programs can call (link to) it. On UNIX and similar operating systems (such as Linux), the GNU C compiler is used for this process. On Windows, the C compiler provided by Microsoft's Visual Studio Express package is used. Although the two-step compilation process is typically performed with a single command, an option is available to halt the process after the C code has been generated.[9]

Documentation

From 2002 until 2012, the official home of the development team was the opencobol.org website, which served as the primary source of upstream development information.[10] However, more recent[when?] developments have shifted to a SourceForge project space under GnuCOBOL.

The GnuCOBOL Programmer's Guide, by Gary Cutler, was published under the GNU Free Documentation License.[9] It has been updated to include GnuCOBOL with Report Writer and is listed in the GnuCOBOL documentation overview page with latest versions in the code tree.[11] It is currently maintained by Vincent Coen and others as each new compiler version is issued and is available at GnuCOBOL - GNU Project.

Example programs

Historical

000100* HELLO.COB GnuCOBOL example
000200 IDENTIFICATION DIVISION.
000300 PROGRAM-ID. hello.
000400 PROCEDURE DIVISION.
000500     DISPLAY "Hello, world!".
000600     STOP RUN.

Compilation and execution:

$ cobc -x HELLO.COB
$ ./HELLO
Hello, world!

Modern, free format

*> GnuCOBOL Hello World example
id division.
program-id. hello.
procedure division.
display "Hello, world!" end-display
goback.

Compilation and execution:

$ cobc -x -free hello.cob
$ ./hello
Hello, world!

Shortest

The shortest valid COBOL program, with the relaxed syntax option in GnuCOBOL 2.0, is a blank file. Compilation and execution:

$ cobc -x -frelax-syntax ./empty.cob
./empty.cob: 1: Warning: PROGRAM-ID header missing - assumed
$ ./empty
$

For earlier versions and with relaxed syntax:

display"Hello, world!".

Compilation and execution:

$ cobc -x -frelax-syntax -free hello.cob
hello.cob: 1: Warning: PROGRAM-ID header missing - assumed
hello.cob: 1: Warning: PROCEDURE DIVISION header missing - assumed
$ ./hello
Hello, world!

Without relaxed syntax and with any version of GnuCOBOL, GNU Cobol or OpenCOBOL. (Note, there are 7 leading spaces to conform to FIXED layout COBOL source):

       program-id.h.procedure division.display "Hello, world!".

Compilation occurs without errors:

$ cobc -x smallest.cob
$ ./smallest
Hello, world!

Please note that these trivia listings are not to be regarded as good COBOL form; COBOL was designed to be a readable English programming language.

Implementation

The parser and lexical scanner use Bison and Flex. The GPL licensed compiler and LGPL licensed run-time libraries are written in C and use the C ABI for external program linkage.

Build packaging uses the GNU Build System. Standard tests with make check use Autoconf, ANSI85 testsuite run by make test use Perl scripts.

The configure script that sets up the GnuCOBOL compile has options that include:

  • choice of C compiler and its options for post translation compilation
  • database management system for ISAM support
  • inclusion of iconv

Availability

  • 1.0 release from SourceForge.[12]
  • 1.1 release from SourceForge[13]
  • 2.0 development release from SourceForge[14]
  • open-cobol Debian package.[15]
  • 2.2 Final, released 7 September 2017 from SourceForge[16]
  • 2.2 Documentation, released September 2017 from the SourceForge Code Tree.
  • 3.1 Released July 2020 along with the documentation.
  • 3.2 Released July 2023 along with the documentation.

References

  1. ^ Simon Sobisch (28 July 2023). "Release of GnuCOBOL 3.2". Retrieved 29 July 2023.
  2. ^ "README". ftp.gnu.org.
  3. ^ Tiffin, Brian (19 October 2013). "OpenCOBOL FAQ". What is the current version of OpenCOBOL?. Retrieved 13 December 2013.
  4. ^ Tiffin, Brian. "GNU Cobol is now a real thing". Archived from the original on 5 October 2013. Retrieved 1 October 2013.
  5. ^ Sobisch, Simon (6 November 2013). "Work in Progress". GNU Cobol 2.0 C++. Archived from the original on 10 May 2020. Retrieved 11 May 2014.
  6. ^ Tiffin, Brian. "State of the Project". Archived from the original on 7 March 2016. Retrieved 23 July 2015.
  7. ^ "OpenCOBOL FAQ". 17 October 2013. How complete is OpenCOBOL?. Retrieved 7 June 2014. While OpenCOBOL can be held to a high standard of quality and robustness, the authors DO NOT claim it to be a "Standard Conforming" implementation of COBOL.
  8. ^ "OpenCOBOL FAQ". Does OpenCOBOL pass the NIST Test Suite?. Retrieved 9 October 2013.
  9. ^ a b Cutler, Gary. "OpenCOBOL Programmer's Guide" (PDF). Opencobol.addltocobol.com. Retrieved 20 November 2012.
  10. ^ "An open-source COBOL compiler". OpenCOBOL. Retrieved 20 November 2012.
  11. ^ Cutler, Gary. "GnuCOBOL Guides". Opencobol.addltocobol.com. Retrieved 22 July 2015.
  12. ^ "GnuCOBOL - Browse Files at". Sourceforge.net. 27 December 2007. Retrieved 28 October 2015.
  13. ^ GnuCOBOL downloads at SourceForge
  14. ^ GnuCOBOL downloads at SourceForge
  15. ^ "Debian -- Details of package open-cobol in buster". packages.debian.org.
  16. ^ GnuCOBOL downloads at SourceForge

Read other articles:

Come leggere il tassoboxIctaluridi Ameiurus catus (in alto) Ictalurus punctatus e Pylodictis olivaris (in basso) Classificazione scientifica Dominio Eukaryota Regno Animalia Phylum Chordata Subphylum Vertebrata Superclasse Gnathostomata Classe Actinopterygii Superordine Ostariophysi Ordine Siluriformes Famiglia IctaluridaeGill, 1861 La famiglia Ictaluridi (Ictaluridae Gill, 1861) comprende 51 specie di pesci d'acqua dolce noti in italiano con il nome di pesci gatto, appartenenti all'ordine S...

 

 

InfliktedAlbum studio karya Cavalera ConspiracyDirilis24 Maret 2008 (2008-03-24)DirekamJuli 2007 di Studio UndercityGenreThrash metalGroove metalDurasi43:31LabelRoadrunnerProduserLogan Mader, Max Cavalera Inflikted merupakan debut album dari Cavalera Conspiracy dimana band ini dibentuk oleh duo Cavalera yang bersama kembali untuk pertama kalinya dalam 12 tahun terakhir sejak merilis album Roots milik Sepultura pada tahun 1996. Max Cavalera mengatakan kalau secara musik Inflikted terd...

 

 

Football season in Indonesia Football league seasonLiga Indonesia Premier DivisionSeason1994–95Dates27 November 1994 – 30 July 1995ChampionsPersib(1st title)RelegatedPS Bengkulu Warna Agung PSIR PSIMAsian Club ChampionshipPersibAsian Cup Winners' CupPetrokimia PutraMatches played559Goals scored1,417 (2.53 per match)Top goalscorerPeri Sandria (34 goals)Biggest home winPelita Jaya 10–2 Persijatim(14 June 1995)Biggest away winPS Bengkulu 1–6 Pelita Jaya(15 April 1995)Persijatim 0–...

Стойка с магазинными карабинами Магазинное оружие, Повторительное оружие — разновидность оружия в том числе и стрелкового (винтовок, ружей, пистолетов и револьверов), конструктивно оснащённого магазином и упрощающего процесс перезаряжания по сравнению с однозарядн...

 

 

Shree Airlines IATA ICAO Kode panggil — SHA SHREEAIR Didirikan1999PenghubungBandar Udara Internasional TribhuvanPenghubung sekunderBandar Udara Surkhet; Bandar Udara PokharaKota fokusKathmandu, Surkhet, Lukla, Syangboche dan semua lokasi di NepalArmada5Tujuan10Perusahaan indukShree AirlinesKantor pusatKathmanduTokoh utamaBanwari Lal MittalSitus webhttp://www.shreeairlines.com/ Shree Airlines adalah maskapai penerbangan Nepal, mengoperasikan layanan helikopter sewaan.[1] Armada 5 × ...

 

 

جوزيف بلاك (بالإنجليزية: Joseph Black)‏[1]    معلومات شخصية الميلاد 16 أبريل 1728 [2][3][4][5][6]  بوردو[7]  الوفاة 6 ديسمبر 1799 (71 سنة) [5]  إدنبرة[7]  مواطنة مملكة بريطانيا العظمى[1]  عضو في الجمعية الملكية للكيمياء،  والجمعية الملكي...

Nama ini menggunakan kebiasaan penamaan Filipina; nama tengah atau nama keluarga pihak ibunya adalah Schramm dan marga atau nama keluarga pihak ayahnya adalah Cayetano. Alan Peter S. Cayetano Anggota DPR dari dapil I Taguig–PaterosPetahanaMulai menjabat 30 Juni 2019PendahuluArnel CeraficaPenggantiPetahanaMasa jabatan30 Juni 1998 – 30 Juni 2007PendahuluDante TiñgaPenggantiLani CayetanoKetua DPR Filipina 26Masa jabatan22 Juli 2019 – 12 Oktober 2020Wakil Lih...

 

 

Province of Argentina For other uses, see Mendoza (disambiguation). Province in Mendoza, ArgentinaMendoza Provincia de Mendoza (Spanish)ProvinceProvince of MendozaAconcagua, the highest mountain in America FlagCoat of armsLocation of Mendoza within ArgentinaCoordinates: 32°53′55″S 68°50′47″W / 32.89861°S 68.84639°W / -32.89861; -68.84639 (Casa de Gobierno)[1]CountryArgentinaCapitalMendozaDepartments18Districts205Government • Gove...

 

 

Міністерство оборони України (Міноборони) Емблема Міністерства оборони та Прапор Міністерства оборони Будівля Міністерства оборони у КиєвіЗагальна інформаціяКраїна  УкраїнаДата створення 24 серпня 1991Попередні відомства Міністерство оборони СРСР Народний комісарі...

Public secondary magnet school in Chicago, Illinois, United StatesVon Steuben Metropolitan High SchoolAddress5039 N. Kimball AvenueChicago, Illinois 60625United StatesCoordinates41°58′24″N 87°42′48″W / 41.9732°N 87.7132°W / 41.9732; -87.7132InformationSchool typePublic Secondary MagnetMottoTogether, we are Von strong.Opened1930; 94 years ago (1930)School districtChicago Public SchoolsPrincipalJennifer SuttonGrades9–12GenderCoedEnrollment...

 

 

Kota KutacaneKelurahanNegara IndonesiaProvinsiAcehKabupatenAceh TenggaraKecamatanBabussalamKodepos24651Kode Kemendagri11.02.04.2001 Kode BPS1104040010 Jumlah penduduk5.354 jiwa (2020)[1]Kepadatan0,92 jiwa/km² Kota Kutacane merupakan salah satu kute yang ada di kecamatan Babussalam, kabupaten Aceh Tenggara, provinsi Aceh, Indonesia. Kota Kutacane juga menjadi ibu kota atau pusat pemerintahan dari kabupaten Aceh Tenggara. Iklim Kota Kutacane memiliki iklim hutan hujan tropis (Af) ...

 

 

Water tower in Bankstown, Sydney, NSW Bankstown ReservoirThe pillared water towerLocation300 Hume Highway, Bankstown, New South WalesCoordinates33°54′19.78″S 151°02′22.74″E / 33.9054944°S 151.0396500°E / -33.9054944; 151.0396500Elevation20 metres (66 feet) AGLBuilt1920; 104 years ago (1920)Built forMetropolitan Board of Water and Sewerage, SydneyArchitectMetropolitan Board of Water Supply and SewerageArchitectural style(s)Federation Free C...

Чехи в Узбекистане Современное самоназвание Češi v Uzbekistánu Численность 94 (1989) Расселение  Российская империя СССР Узбекистан Язык чешский, русский, узбекский Религия христианство Входит в чехи Родственные народы русские в Узбекистане, украинцы в Узбекистане Че�...

 

 

Oh! YoungsimPoster promosiNama alternatifOh! Young-shim[1]Hangul오! 영심이 Alih AksaraO! Yeongsim-i GenreKomedi romantis[1]PengembangKT Studio Genie (planning)[2]Ditulis olehJeon Seon-young[3]Sutradara Oh Hwan-min[3] Kim Kyung-eun[3] PemeranSong Ha-yoonLee DonghaeLee Min-jae [ko]Jung Woo-yeonMusikKang Min-gukNegara asalKorea SelatanBahasa asliKoreaJmlh. episode6 (per 30 Mei 2023 (2023-05-30))ProduksiProduser eksekutifChoi ...

 

 

Este artículo o sección necesita referencias que aparezcan en una publicación acreditada. Busca fuentes: «Corazón (canal de televisión)» – noticias · libros · académico · imágenesEste aviso fue puesto el 20 de noviembre de 2018. CorazónEslogan La vida que sueñasTipo de canal Televisión por suscripciónProgramación TelenovelasPropietario TV AztecaOperado por TV Azteca Internacional TV de PagaPaís México MéxicoFundación 2008Fundador Ricardo Salinas Plie...

1808 Connecticut gubernatorial election 1808 Connecticut gubernatorial election ← 1807 April 14, 1808 1809 →   Nominee Jonathan Trumbull Jr. William Hart Party Federalist Democratic-Republican Popular vote 12,146 7,566 Percentage 60.85% 37.91% County results Trumbull:      50–60%      60–70%      70–80% Governor before election Jonathan Trumbull Jr. Federalist Elected Governor Jona...

 

 

Cahaya Rasul 9Album studio karya MayadaDirilis24 Agustus 2007 9 Juni 2015 (rilis ulang)Direkam2007GenreNasyid, ShalawatLabelWarner Music IndonesiaProduserHabib Husein AlaydrusKronologi Mayada Cahaya Rasul 8 (2006)Cahaya Rasul 82006 Cahaya Rasul 9 (2007) Seleksi Sholawat Cahaya Rasul (2007)Seleksi Sholawat Cahaya Rasul2007 Cahaya Rasul Vol. 9 adalah sebuah album religi kesembilan sekaligus project rekaman baru karya Mayada yang dirilis pada tahun 2007. Album ini merupakan album resmi dari ...

 

 

Cinder cone on the island of Iwo Jima, Japan For mountain in Antarctica, see Mount Suribachi (Antarctica). SuribachiMount Suribachi as seen in 2001Highest pointElevation169 m (554 ft)[1]Prominence169 m (554 ft)Coordinates24°45′01″N 141°17′20″E / 24.75028°N 141.28889°E / 24.75028; 141.28889GeographySuribachiIwo Jima, Japan Parent rangeVolcano IslandsGeologyMountain typeCinder coneVolcanic arc/beltVolcano IslandsLast eruptionM...

Лауреат Нобелівської премії І. І. Мечников (1845—1916), випускник Харківського університету і завідувач кафедри зоології Одеського університету Наукові дослідження в Україні вперше почали набувати систематичного характеру в XVII–XVIII століттях зі створенням і розвитко...

 

 

1972 aviation accident Braathens SAFE Flight 239Salvage of the wreckAccidentDate23 December 1972SummaryControlled flight into terrain due to navigational errorSiteVestmarka, Asker, Norway59°51′57″N 10°20′21″E / 59.86583°N 10.33917°E / 59.86583; 10.33917AircraftAircraft typeFokker F28 Fellowship 1000Aircraft nameSverre SigurdssonOperatorBraathens SAFERegistrationLN-SUYFlight originÅlesund Airport, VigraDestinationOslo Airport, FornebuOccupants45Pa...