Join Peggy Fisher for an in-depth discussion in this video Downloading and installing Cygwin, part of Up and Running with COBOL.
- We need to configure Cygwin on my Windows computer in order to run GnuCOBOL. Although we've downloaded the GnuCOBOL compiler, before we can use it we must set up a Linux type of environment on our Windows machine. Cygwin is an open source collection of tools that provide a Linux type of environment that runs on Windows. This environment is needed to work with the COBOL compiler in executables. For this, we will use the Cygwin, which you can find here.
From this Cygwin installation page, choose the correct version for your system. As you can see, there's a 32-bit version and a 64-bit version. Make sure you download and save the file. Don't run it; that way it can be used again later for future updates. I suggest that you save it to your new OC directory on your C drive. Once you have the Cygwin downloaded, we can run the setup. In the setup, we will keep most of the default settings.
The Cygwin environment is not set up for COBOL by default, so there are a few optional libraries and packages that we need to include. When you run the setup, the first decision you need to make, is which mirror site to use. I suggest just selecting the one in the top. Next, it will ask for a root install directory. After you've chosen your mirror site, the next option will ask you for the root directory. Make sure it says "c:\cygwin." Then you can click "Next." The setup routine will ask you for the local package directory.
For this, make sure you choose "c:\OC," the directory we created for OpenCOBOL. Next is the screen that allows us to select the additional packages to be installed. Let's leave all the defaults, but we want to add the following. Some of the packages might be slightly newer versions, but the description should still be the same. The db, in case we want to access a database, the library for database, current version right now is libdb5.3, the gcc-core, gcc-g++, gdb, gettext, libncurses, libtool, the make package, the ddir package, the libgmp-devel, the libiconv, the ncurses, the rxvt-unicode, which is a newer version of the rxvt package, and finally, ed for a Linux editor.
Let me should you how you're going to select these packages. First, I need to go into my setup. I want to go into my OC folder. From here, I'm going to go into the setup. As I stated in the video, click "Next." Next, make sure it says "c:\cygwin." Next, here's where the local package directory is. Next, "Direct Connection." Cygwin gives me a list of mirror sites that I can choose.
I'm just going to choose the top one, next. And here is a list of the packages that come as default, and the packages that I want to include on my install. As you can see at the top, there's a search option. So for example, one of the packages I asked you to select is the db package. So I'll click on "db," I'll open up the database, and I want to make sure that "db" is selected, and it looks like db4.8 is available, so let's go ahead and select that, as well as the documentation.
The libdb is also here, and you can see I've already had that selected and it's already installed on my machine. Sometimes that might happen to you, too. You can go ahead through and select all the package that I listed, and once you have them, go ahead and click on the "Next," and Cygwin will finish up the setup.
This course is designed to help new and experienced programmers alike add COBOL (or add COBOL back) to their skill set. Peggy Fisher shows how to get a COBOL development environment up and running and how to start programming. She reviews COBOL's data types and constants, control structures, file storage and processing methods, tables, and strings. Challenges issued along the way will help you practice what you've learned.
- Downloading and installing Cygwin and GNU COBOL
- Editing, compiling, linking, and running COBOL programs
- Describing data in COBOL
- Working with verbs and expressions
- Using branching
- Reading and writing sequential files
- Updating and deleting records
- Working with relative and indexed files
- Creating and searching tables
- Handling strings