IBM 5280 Programmer's Manual page 34

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

Advertisement

statement (EMPRECD). ND (for nondisplay) prevents any data in the
field from appearing on the screen.
2. CHECK(BY) - BY stands for bypass - causes the cursor to skip the
ACREC field and be positioned at the start of the next field (EMPNO)
immediately after the record is written to the screen.
Note that CHECK(BY) must be specified in a secondary line as explained
later in this chapter under "Coding Conventions" and shown in figure 3.3.
3. Because the field is nondisplay, it wasn't necessary to specify a location.
II
EMPNO is a five-digit field for the employee number. Here is a summary of
the specifications:
1. The D in the Data Type field allows the operator to enter only digits. If the
operator tries to enter nondigits, the keyboard will lock and an error code
will appear in the status line at the top of the screen. The operator can then
refer to the 5280 Messages Manual for an explanation of the message and
the recommended action to correct the error.
2. The 01 in the Location field indicates the relative line number the field is to
appear on the screen in relation to the STARTING AT LINE clause as
discussed earlier. The number
J J
causes the field to start in column lIon
the screen.
3. The DR (for data required) following the CHECK keyword means that the
operator must enter at least one character (in this example, a digit) before
exiting the field. Otherwise, the keyboard will lock and an error code will
appear in the status line.
The RZ (for right adjust with zeros) creates two conditions: (l) the
operator must press the Field Exit key to go to the next field and (2) when
the exit key is pressed, all digits are shifted to the rightmost positions; any
unused positions to the left are filled with zeros.
II
The logic of the specifications for ENAME, STRAD, and CTYST is the same
as for EMPNO with the following exceptions:
- The RB following CHECK causes a right adjust with blanks instead of
zeros.
- The X in the Data Type field for ENAME and CTYST allows the operator
to enter only alphabetic characters.
- The A in the Data Type field for STRAD allows the operator to enter both
digits and alphabetic characters.
The fields with an 0 specified in the Usage field (column 36) are fields that
can be used for output only. That is, the program can write the data enclosed
in single quotes ( , ) in the Editing field to the screen, but the operator cannot
write data into the fields on the screen.
G'Note the following:
1. The Field Name field for output fields must be blank.
2. The fields needn't have a field location specified; they will appear on the
screen after the preceding field.
3. The CA (for cancel) parameter following the DSPATR keyword cancels
the underline and column separator attributes for these fields.
4. As shown in figure 2.4, output fields do not appear as data-items in the
source listing.
B
Note the effect of CHECK parameters on the ZIPCD, BEGDT, SOSNO, and
MARST fields:
1.
FE forces the operator to press the Field Exit key to exit the ZIPCD and
BEG DT fields.
2. Together, DR (for data required) and MF (for mandatory fill) force the
operator to fill all available positions in each field before an exit can take
place as follows:
Chapter 2. Transaction I/0 - Screen Definition
2- 7

Advertisement

Table of Contents
loading

Table of Contents