Copying Members; General Rules For Data Definition Statements; The Cobol Program And Data Definition Statements; Steps In Writing An Interactive Program - IBM 5280 Programmer's Manual

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

Advertisement

Copying Members
You must code a COpy verb, specifying the name of the library text, at an
appropriate point in the Data Division of your COBOL program. At
compilation, the compiler creates a record definition for each set of Data
Definition Statements: for each record description statement, the compiler
creates an 01 level group item; and, with certain exceptions, for each field
description statement, it creates a 02 level data-item, as shown in figure 2.4 in
Chapter 2.
In writing and reading information from the work station screen, you
refer to the record definitions created from the Data Definition Statements in
associated READ and WRITE statements. This is shown in Chapter 3 in
figure 3.2.
General Rules for Data Definition Statements
Here are some guidelines and rules for preparing Data Definition Statements
and entering them in a COBOL library:
1. You must prepare a record description statement, followed by at least one
field description statement, for each screen image.
2. Some of the specifications you make in the record description statement
can be taken as defaults by the field description statements that follow it.
That is, if you write these items in a record description statement, you
needn't write them in a field description statement.
3. Keep the record description statement and subsequent field description
statement(s) for each screen image entirely within one library text.
4. If desirable, enter sets of data definition statements for multiple screen
images within the same library text.
The COBOL Program and Data Definition Statements
The COBOL program treats all the information passed to it from one
DDS-defined screen format as a single record. You can specify two kinds of
fields:
An output field (O-field) contains information that cannot be changed
by the operator. For a normal output operation, the data in the field is
supplied in the field description statement as a constant
An input/output field (B-field) is both displayed (output) on the display
screen and read (input) back into the program. The operator can enter
new data over the data that is displayed by the program. This data can
then be read back into the program.
Both types of fields can be used in the same display screen formats.
By your entry in the field definition statement, you can also control how the
data-items are defined in your program: either aiphanumeric or numeric,
signed or unsigned.
Steps in Writing an Interactive Program
The recommended steps in writing an interactive program, shown in figure
1.1, are:
1. Design the screen layouts which the operator is to interact with. Display
screen layout sheets and coding forms are available to aid you in this task.
Their order numbers are given in the first section of this book; their use is
illustrated in the examples in Chapter 2.
1- 2
IBM 5280 COBOL Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents