Unconditional Program Buffer Selection; Offline Field Totals Example - IBM 3741 Data Station Reference Manual

Table of Contents

Advertisement

Unconditional Program Buffer Selection
If only one program is required to process records in the
field totals operation, a control statement can be written
that will unconditionally select the desired program buffer.
The general control statement is as follows:
<f.
where f is the is the desired program buffer number 1
through 9 and A.
Offline Field Totals Example
An offline field totals operation is to be performed on a
data set that contains several different kinds of records.
The field totals operation to be performed depends upon
the content of the records.
Figure 24 shows the field totals operation to be performed
for each record type. If the record type indicated by the
first column in the figure contains the data indicated by
the second column, the operation in the third column
needs to be performed.
Depending upon the type of record, one of four different
types of field total operations are performed:
1.
Add a field to both accumulators 1 and 2.
2.
Add the field to accumulator 2 only.
3.
Read the contents of accumulator 1 into the current
record buffer and reset the accumulator.
4.
Add the field to accumulator 3.
Type of Data Record
Contents
Four different programs are required to do these operations.
This example used program buffers 1-4 for these programs.
Program buffer 1 contains the program to add the field in
positions 30-35 of the data record into accumulators 1 and
2. To program a field as a field totals field, use any field
definition followed by 1,2, or 3 to indicate the accumula-
tor. All field definition characters in the program except
those used by field totals fields are ignored.
I n this example all fields except the field totals field are
programmed as bypass fields. The program in program
buffer 1 is:
B ----------------------------N 12---E
'-v-'
Field totals field
in positions 30-35
Program buffer 2 contains the program to add the field in
positions 30-35 of the data record into accumulator 2.
The program in program buffer 2 is:
B ----------------------------N 2 ---- E
'-v-'
Field totals field
in positions 30-35
Desired Operation
A in position 10 and B or C in position 25
Add the field in positions 30-35 of the
record to accumulators 1 and 2.
2
3
4
Numbers in position 50
Blanks in positions 50 through 55
All records that do not satisfy the conditions
of the other 3 types of records
Figure 24. Field Total Operations
46
Add the field in positions 30-35 of the
record to accumulator 2.
Read the contents of accumulator 1
into the record in positions 1-10 and
reset accumulator
1.
Add the field in positions 30-35 of the·
record to accumulator 3.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents