Accumulate Totals Fields; Read Out/Reset Field Total Fields - IBM 3741 Data Station Reference Manual

Table of Contents

Advertisement

Accumulate Totals Fields
To indicate which fields in a data record are to be accumu·
lated into a field totals accumulator, follow any field
definition character in a program by a 1, 2, or 3. Following
a field definition character by a 1 means the field in the
data record will be accumulated into accumulator 1. A
field definition character followed by a 2 or 3 means the
field in the data record will be accumulated into accumu·
lator 2 or 3 respectively. Figure 17 is an example of a
program containing field totals fields that will be accumu·
lated.
A .....
~R
.••..
N2 .. V .......... E
/'
~~
The corresponding
The corresponding
field in the data
field in the data
record will be
accumulated into
accumulator 1.
record will be
accumulated into
accumulator 2.
Figure 17. Example of a Program Containing Field Total Fields
A field may be accumulated into more than one field totals
accumulator by following any field definition character
by more than one number. For example, if a program con·
tains N 12-··field, this means that the corresponding field
in the data record would be accumulated into accumulators
1 and 2.
In enter mode, the amount added into an accumulator is
equal to the amount entered in the field of the record. In
update or verify mode, the amount added to an accumu·
lator is zero unless the field in the record is modified, and,
if modified, the amount added to the accumulator is the
algebraic difference between the initial amount of the field
and the final amount of the field.
Read Out/Reset Field Total Fields
Read Out/Reset field totals fields allows the accumulators
to be read into a specified field in a data record and then
the accumulators are reset to zero. To indicate a read
out/reset field in a program, follow the bypass field
definition character B, by a 7, 8, or 9. The 7 means to
read out and reset accumulator 1, the 8 means to read out
and reset accumulator 2 and the 9 means to read out and
reset accumulator 3. There must be at least one manual
field preceding any read out/reset field. Figure 18 shows
an example of a Read Out/Reset field in a program.
D·····R·····B7-·········A .... B9-··-A .... E
'-f
~
T~is
field in the prog·
This field in the program
ram indicates that
indicates that field totals
field totals accumulator
accumulator 3 will be read
1 will be read out into
out into the corresponding
the corresponding
field in the data record and
field in the data record
then accumulator 3 will
and then accumulator
1 will be reset to zero.
be reset to zero.
Figure 18. Example of Read Out/Reset Field in a Program
Not all of the accumulators have to be read out and reset
when performing a field totals read out/reset operation.
You can select which accumulators are to be read out and
reset. If desired, each accumulator can be read out and
reset at a different time during a field totals operation.
When records with field totals are changed in update or
verify mode that will affect the accumulated totals for the
subsequent Read Out/Reset field, it is required that a
minimum of one character be changed or inserted into the
record that contains the Read Out/Reset fields. This can
be done by setting up a program with a one position field
designed specifically to allow inserting of a character into
the record, or by actually changing a character in the
record.
Note:
If the record containing the updated Read Out/
Reset field does not have to be written to disk, the follow·
ing procedures do not have to be followed.
For update mode, rekeying an existing character or keying
a new character is considered a change to the record con·
taining the Read Out/Reset field. However, if a program
was set up with a field designed to allow insertion of a
character into the record, the operator can key any
desired character into that field.
For verify mode, the operator can position the cursor at
the one character field that was programmed to allow
insertion of a character into the record containing the
Read Out/Reset field, select field correct mode, and key
any character desired. Once the operator has pressed a
data key, the 3741 goes back into verify mode and the
operator must press the same data key that was pressed in
field correct mode. If a program cannot be set up that
allows insertion of a character into the record, the operator
should select the shortest field in the record and perform
a field correct operation on the field.
Online Field Totals
37

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents