Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gsteixeira/havingfun-with-cobol
Fundamental and very basic stuff in Cobol
https://github.com/gsteixeira/havingfun-with-cobol
Last synced: about 5 hours ago
JSON representation
Fundamental and very basic stuff in Cobol
- Host: GitHub
- URL: https://github.com/gsteixeira/havingfun-with-cobol
- Owner: gsteixeira
- License: gpl-3.0
- Created: 2021-07-05T05:27:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-08T04:44:26.000Z (about 3 years ago)
- Last Synced: 2023-12-14T16:57:42.087Z (11 months ago)
- Language: COBOL
- Size: 51.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Having Fun With Cobol
Fundamental and very basic stuff in CobolWhen I started learning COBOL my biggest challenge was to search fundamental stuff. So I had to look a lot of code to find How to do specific things.
Here a list of fundamentals. Most programs do a single specific thing and nothing else, so you can use it as reference.
*hello.cob* - Hello World!
*loops.cob* - The various and crazy ways to do loops in cobol.
*strings.cob* - string operations.
*subroutine.cob* - basic call of a subroutine (or program, or function).
*subroutine2.cob* - subroutine call passing variables back and forth.
*command_line.cob* - passing arguments to cobol program via command line.
*arrays.cob* - array, also shows how to generate random numbers.
*files.cob* - file operations, input output.
*random.cob* - random number generation.
*env_var.cob* - how to get value from environment variable in cobol.
*time_operations.cob* - functions with time and date.
*primes.cob* - generate a list of prime numbers.
*fibonacci.cob* - print the fibonacci sequence.
*palindrome.cob* - check if a string is palindrome.
*postgres1.cob* - get data from postgresql with COBOL (didatic version).
*postgres2.cob* - postgres with COBOL (less monolithic, less didatic).
*postgres.cob* - tries to be more clean and production friendly.
*python_bindings* - calling COBOL from Python and passing variables.
- Pardon my antipattern!
The thing I find harderst reading existing cobol code is the fact that most developers sadistically use very obfuscative standards in their variables names. They often have names like "WS-XKY-ENIGMATIC", of paragraphs like "A-PARA-1". As you can see, hifens, ALL_CAPS, and weird names. Also little Ident doesn't hurt.
This programs are done for educational purposes, so I'll follow more modern conventions of naming. :)