Chapter 3. Transaction I/O - Writing The Cobol Program; Summary Of Cobol Transaction I/O Statements; File-Control Paragraph - IBM 5280 Programmer's Manual

Distributed data system, cobol
Hide thumbs Also See for 5280:
Table of Contents

Advertisement

Chapter 3. Transaction I/O - Writing the COBOL Program
This chapter provides information on transaction I/O - the data set
organization in the IBM 5280 COBOL language that permits the exchange of
data between an operator at a work station and a COBOL program.
Subjects covered include:
A description and coding examples of the I/O statements needed for
transaction I/O: the FILE-CONTROL paragraph, and the OPEN,
CLOSE, READ, and WRITE statements.
I/O error processing, with an example of an exception/error procedure
and use of the Status Key.
How to code the statements needed to obtain return information (for
example, codes returned when the operator presses a command key).
A coding example of a program using transaction I/O.
A coding example showing the use of indicators and CHECK(BY) (for
Bypass).
To use the information given in this chapter, you'll also have to refer to the
following chapters:
Chapter 1, introduces transaction I/O and summarizes the keyboard
and how it affects the operations of your program.
Chapter 2, which describes how to code the Data Definition Statements
(DDS) that design the screen and edits the operator entries.
Summary of COBOL Transaction I/O Statements
This chapter will explain transaction I/O using the example of the COBOL
program in figure 3.2. (The Data Definition Statements used by this program
are from the example in figure 2.3 in Chapter 2.) Here is a brief summary of
the program:
1. The program writes a screen in which an operator will enter data on new
employees.
2. The program checks the data entered for errors; if no errors are found, it
updates the employee master file with the data. If an error is found, it
writes an error message and allows the operator to correct the data.
The following sections provide a guide to writing a COBOL program with
transaction I/O and some of the COBOL statements used. Statements
discussed in the text are referenced in figure 3.2 with keyed numbers
(11,6,
etc.). For detailed information on the syntax and rules of the COBOL
statements used, see the IBM 5280 COBOL Language Reference.
FILE-CONTROL Paragraph
The entries in the FILE-CONTROL paragraph for transaction I/O are:
SELECT file-name ASSIGN TO WORKSTATION
[n]
ORGANIZATION IS TRANSACTION
[FILE STATUS IS data-name-3]
[ACCESS MODE IS SEQUENTIAL]
[CONTROL-AREA IS data-name-4]
Chapter 3. Transaction I/O - Writing the COBOL Program
3- 1

Advertisement

Table of Contents
loading

Table of Contents