Shopping Project
Programming language
Cobol
The project
Out of curiosity, I decided to learn COBOL, an old programming language. To do so, I used an IDE called “OpenCobolIDE” to program and realize my first project in this language. I decided to set up a wishlist and a purchasing system. When the program starts up, it can reset the wishlist. Next, the program fetches from a text document the list of available products that will be displayed in the console. The user then selects and adds one or more items to the wish list. Afterwards, the user can either exit the program with the saved wishlist or purchase all the products on it. If the user makes the purchase, the wish list will be deleted and the program will close
The challenges: Cobol doesn’t work like most programming languages
The problem:
Since I started to learn programming languages, I always got use of the logic of how variables work, how we had MVC (Model-View-Controller), class and object but the Cobol doesn’t have that and the variables work differently.
The solution:
The solution to learn Cobol was to start small with a little project. I use an old book at home called “Programmation en cobol stucturé – Théorie et applications” written by Lawrence R. Newcomer. In english, the title would be «Structured COBOL Programming – Theory and Applications». I also used internet as well to get more informations abouts things I misunderstood.
What I have learned :
I have learned that COBOL work with division. Each division has it’s own purpose. For example, Data division is used to declared all variables and structures that will be use in the program and procedure division is used to create the logic of the program. Also, like in C and C++, we have to manage the memory of each variable. For example, we start by writing what type of varible and inside of « () », we tell how much space we reserve. If we look at « PIC 9(4) », the variable will be a number and we reserve the space of 4 digits. After this project, I learn enough to be able to make more small project in COBOL.


