IBM 5280 Programmer's Manual page 46

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

Advertisement

Output
(0)
Fields
Input and Output
(B)
Fields
Field Description Statement
For those fields defined for output (you enter an 0 in the Usage field):
1. The operator cannot enter data into the field.
2. You must specify a nonnumeric literal in the Editing field starting in
column 45. The literal can have any character in the EBCDIC set and
must be enclosed within single quotes ( ,
1
iter
al').
Any single quote
used as part of the character string must be coded twice ( , ').
The literal appears on the screen when your COBOL program issues an
associated WRITE statement. The use of literals is shown in figure 2.2.
3. You must leave the Field Name field (columns 19-24 of the field
description statement) blank.
Here's an example of a field description statement defining a field for output
only:
----+----1----+----2----+----3----+----4----+----5----+----6----+
A
0
'ENTER USER IO'
For those fields defined for both input and output (you enter a B in the Usage
field):
1. A literal is not allowed in the statement.
2. The operator can enter data on the screen in fields defined by the
statements unless you specify CHECK(BY) in the editing field. (The
CHECK keyword is explained later in this chapter.)
3. The operator can duplicate data from the corresponding positions in the
preceding record by pressing the Duplicate key, unless you specify
CHECK(DD).
4. Data can be automatically duplicated in the field when the operator has
pressed the Auto Dup/Skip key, and you have coded the CHECK(AD)
keyword and parameter in the editing field of the associated field
description statement. The data is automatically duplicated from the
correspondingpositions-in the previous record when flie cursor enters the
field.
aNote:
The field as it appears on the screen will not contain the same digits if
the COBOL program changes its contents before writing the record to the
screen.
Here's an example of a field description statement that defines a field for both
input and and output; the field, EMPNO, will accept only digit data up to five
characters in length; each time a record appears on the screen, EMPNO will
contain the same digits as were in the corresponding field in the preceding
record:
----+----1----+----2----+----3----+----4----+----5----+----6----+
A
EMPNO
50
B
CHECK(AO)
When using a field for both input and output, consider the following when
writing your COBOL program:
1. The field description statements define 02 level elementary items in the
COBOL program.
Chapter 2. Transaction I/0 - Screen Definition
2-.19

Advertisement

Table of Contents
loading

Table of Contents