Build your first COBOL application

Summary

This code pattern introduces you to a simple COBOL application that reads input from three text files, merges their contents, and writes an output containing one sorted list. We’ll spend some time introducing the contents of one of our JCL jobs as well as the COBOL source. Our goal is to help you get familiar with the basics of JCL and COBOL, but we’re not trying to make anyone an expert in a few short minutes.

Description

There are two parts to this application: The first is the COBOL source code itself; the second is a set of three JCL jobs that need to be run to compile and build the application into a z/OS executable. Let’s look at each of these pieces individually.

The COBOL application stored in a file named fxsort.cbl performs two main operations:

  1. It reads input from three files and merges their contents into one list.
  2. It then sorts that in-memory list and writes the result to an output file.

The supplied JCL can be used to compile, build, and execute the COBOL application.

Flow

flow

  1. Compile your program.
  2. Link-edit your object.
  3. Run the program.

Instructions

You can find the detailed steps for this pattern in the README file.