COBOL Fridays: Get hands on! Run a COBOL program

This introductory webinar takes you through the step-by-step process of establishing a z/OS connection (to a mainframe) and shows you how to use that connection to retrieve data sets that contain COBOL programs. It then walks you through two sample COBOL programs, exploring the contents of the source code and showing you how to submit a job, view the output, and do some simple debugging. All of this is done in Visual Studio Code with the help of VSCode extensions, Zowe Explorer, and IBM Z Open Editor. Once the connection to z/OS is established, you can filter out the data sets associated with your unique ID (username). We then look at COBOL source code and discuss some major components of the program, including:

  • Identification division
  • Data division
  • Working storage section
  • Data-name definitions
  • Different data-type declarations
  • Procedure division
  • What you can expect to get as output from the program execution

Once we’ve examined the source code, we then take a brief look at its corresponding job control language (JCL). From there, we discuss job submission and program compile and execution. You learn which file should be submitted as a job and where to access the output, and then view two different output files (compiler output, execution output). We then run a second program that introduces you to program errors, showing you how to find an error message, identify the error in the source code, modify it, and re-run the job to authenticate the modification.

This webinar is designed for COBOL beginners, avoiding overly complex terminology and in-depth details. It should give you a solid foundation in COBOL programming and inspire you to explore further!

And be sure to check out the other videos in the COBOL Fridays webinar series, and all the other helpful resources on the IBM Developer COBOL hub.

Makenzie Manna