This is sample code I used or did write myself for learning COBOL using GnuCOBOL, formerly known as OpenCOBOL. I learn COBOL using the book Beginning COBOL for programmers from Michael Coughlan. You can find the excerices from Michael on the Beginning COBOL For Programmers repository here on GitHub. I also added some code I wrote myself. The Author section in the information division of the code states the original author.
I compile the code with GnuCOBOL and you can find the compilation instructions in the make.sh file.