O'Reilly logo

Designing and Programming CICS Applications by Members of the CICS Development Team at IBM Hursley, John Horswill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Programming the COBOL Business Logic

In this chapter:

You are now ready to write the COBOL code of the sample application. This chapter describes:

  • Writing CICS programs in COBOL

  • Dealing with file handling in CICS programs

  • Saving data using a scratchpad facility

  • Moving control from one program to another in the application

  • The queuing facilities of temporary storage and transient data

  • Handing errors in you programs

Writing CICS Programs in COBOL

The source programs are listed on the CD-ROM that is packaged with this book. They include a step-by-step description of what the code does. This chapter is about programming the business logic component, other services including Basic Mapping Support (BMS), the CICS supplied services for formatting a green screen, are described in “Programming the 3270 Presentation Logic Component” in Chapter 11.

Invoking CICS Services

When you need a CICS system service—for example, when reading a record from a file—you just include a CICS command in your code. CICS commands look like:

EXEC CICS function
          [option (argument)][option ...]... [terminator]

The options for this command are:

Terminator

The terminator is language dependent. For COBOL, the reserved word is either END-EXEC or a period (full stop). The full stop option should be avoided since it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required