– blog

Learning in motion

School is back in session and COBOL

without comments

My college course started yesterday, Applied Statistics. The discussion was to watch 1 of 13 TED talks pertaining to Statistics. I chose: “What country does the most good in the world? I could only use 75 words in my summary – I did over 90 I believe. It got me thinking about the importance of “doing good” and surrounding yourself with others that “do good”. And working for a company that “does good” and living in a city that “does good” and living in a country that “you guessed it”. He touched on globalization issues that we as a world created and how we as a world are really dragging our feet to restore. How we all developed as a world as if we were on our own continent on our own planet. Not like we all share the same planet. Think bigger than yourself. Think bigger than your own country. How will your decisions affect those around you?

Now that is over I’m going through a commandline tutorial via Code Academy. So Tonight will be about that.

Oh! I have an interview for a COBOL entry level position tomorrow –  I’m going through those tutorials instead!


COBOL stands for Common Business Oriented Language, this information along with details below came from a COBOL tutorial from

Simple Hello World in COBOL, main.cobol:





  DISPLAY ‘Hello World’.



Output after going through the compiler:


Compiling main.cobc source code....

$cobc -c -free -x main.cobc 2>&1


Linking the program….

$cobc -x -o demo main.o 2>&1


Executing the program….


Hello World


There is a recommended emulator called Hercules. Everything is so old school I can’t even explain why I am thrilled by this. I know, this is technology and I am weird for digging the old school. While everyone else was getting the latest whatever game station I was playing Legend of the Red Dragon on BBS. That’s just me. Once SimCity turned into The SIMs I lost interest. I prefer to IRC into slack, than API. That’s just how I am.


Cobol uses DB2  – its a database for enterprise solutions


A COBOL program structure consists of divisions as shown in the following image:

 A brief introduction of these divisions is given below:

  • Sections are the logical subdivision of program logic. A section is a collection of paragraphs.
  • Paragraphs are the subdivision of a section or division. It is either user-defined or a predefined name followed by a period, and consists of zero or more sentences/entries.
  • Sentences are the combination of one or more statements. Sentences appear only in the Procedure division. A sentence must end with a period.
  • Statements are meaningful COBOL statement that performs some processing.
  • Characters are the lowest in the hierarchy and cannot be divisible.



An example : Character Strings

Character strings are formed by combining individual characters. A character string can be a

  • Comment,
  • Literal, or
  • COBOL word.

All character strings must be ended with separators. A separator is used to separate character strings.

Frequently used separators : Space, Comma, Period, Apostrophe, Left/Right Parenthesis, and Quotation mark.


****That’s it for now! COBOL looks different than what I am use to but not something I can’t learn. I’m up for it and the company is a great company to work for.

Written by seenaomi

September 1st, 2015 at 9:43 pm

Posted in Allthecode

Leave a Reply