Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
  • SQL
  • Web Development
  • System Design
  • Aptitude
  • GfG Premium
Open In App
Next Article:
How to Install COBOL on MacOS?
Next article icon

How to Install COBOL on MacOS?

Last Updated : 23 Feb, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

COBOL is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily used in business, finance, and administrative systems for companies and governments.

In this article, we will look at the process of installing COBOL in MacOS.

Installation Procedure:

Follow the below steps to install COBOL in MacOS:

Step 1: Install Homebrew if it is not installed in your system. Enter system password if required.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
installing homebrew on macos

Step 2: Install the GNU-COBOL using the below brew command:

brew install gnu-cobol
installing cobl in macos

Step 3: Check if it is installed correctly using the below command:

cobc -v
verifying cobol installation on Macos

Hello, world in COBOL:

Use the below in a new .cbl file and save it inside a folder to run the hello world program.

Cobol
IDENTIFICATION DIVISION. PROGRAM-ID. HELLOWORLD.  PROCEDURE DIVISION. DISPLAY "HELLO WORLD". STOP RUN. 

Now open a terminal inside the folder and enter the following commands to build and run the code:

cobc -x -o hello_world hello_world.cbl ./hello_world

Output:

hello world in cobol

Installing COBOL-IDE:

Prerequisites

  • Install latest Python3 in MacOS
  • Install the following packages using pip3:
    • PyQt5: pip3 install PyQt5
    • OpenCobolIDE: pip3 install OpenCobolIDE --upgrade

Now Enter OpenCobolIDE in Terminal to launch the IDE:

OpenCobolIDE

The IDE should open up as shown below, Click on New File.

Here Enter a name and select OK.

A "Hello World" program should appear by default, Click on RUN to view "Hello World" as Output.

hello world in cobol in COBOL IDE

Next Article
How to Install COBOL on MacOS?

A

anilabhadatta
Improve
Article Tags :
  • COBOL
  • Installation Guide
  • Blogathon
  • Blogathon-2021
  • how-to-install
  • COBOL-Basics

Similar Reads

    How to Install Golang on MacOS?
    Before, we start with the process of Installing Golang on our System. We must have first-hand knowledge of What the Go Language is and what it actually does? Go is an open-source and statically typed programming language developed in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson at Google but
    4 min read
    How to Install Caffe on MacOS?
    In this guide, we will walk you through the process of installing Caffe on macOS, ensuring you have everything you need to start building and training neural networks. What is Caffe? Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by Berkeley A
    2 min read
    How to Install Anaconda on MacOS?
    In this article, we will learn how to install Anaconda on MacOS. Anaconda is a distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment. Installation using Graphical Interface Step 1: Download the Graphical installer fro
    1 min read
    How to Install Turbo C++ on MacOS?
    Turbo C++ is a single-language compiler and integrated development environment. It is free of charge and can be downloaded from any website. The first release of Turbo C++ was released in May 1990 version 1.0, running on MS-DOS computers. For the C++ programming language, Turbo C++ is an integrated
    4 min read
    How to Install Weka on MacOS?
    Weka is computer software and its full form is Waikato Environment for Knowledge Analysis, it was built to fulfil the purpose of data mining and it is used in the field of data science. It is open-source software that is built using Java programming language. It is free and can be run on different p
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences