I am a beginner and I’m trying to learn cobol using VSCode, I would like to know if I need to write JCL code for every cobol program I create or the is a compiler I can install to compile my programs?
Hi Govern,
We have used the GnuCOBOL compiler with success in VSCode.
You can find it here:
I will also recommend the IBM Z Open Editer, it is available as an extension to VSCode, it provides syntax highlighting for COBOL.
Regards,
Rune
Do I need to write JCL to run COBOL programs in VSCode?
No, you don’t need JCL unless you’re working on a mainframe. If you’re just learning COBOL on your own computer, you can run your programs without JCL.
What do I need to run COBOL in VSCode?
-
A COBOL compiler – use GnuCOBOL (it’s free).
-
VSCode with a COBOL extension.
How to set it up (easy steps):
Step 1: Install GnuCOBOL
-
On Windows: Install from https://gnucobol.sourceforge.io/
-
On Mac: Open Terminal and type:
brew install gnu-cobol -
On Linux (Ubuntu/Debian):
sudo apt install open-cobol
Step 2: Install COBOL Extension in VSCode
-
Open VSCode
-
Go to Extensions
-
Search: COBOL Language Support (by bitlang)
-
Click Install
Step 3: Compile and Run COBOL Program
-
Create a file like
hello.cob
-
Write your COBOL code
-
Open terminal in VSCode
-
Type these commands:
cobc -x hello.cob
./hello
Summary:
-
You don’t need JCL
-
Use GnuCOBOL to compile
-
Use VSCode with the COBOL extension
-
Run everything locally from your terminal