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 CICSfunction
[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 ...
Get Designing and Programming CICS Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.