IBM 1130 User Manual page 207

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Section
Subsections
Page
25
40
I
30
01
Example 3: Changes to the File
This program illustrates a complex single-file up-
date procedure. Anyone of 16 different changes can
be performed.
The master file is the file created by PAY01 and
PAY02.
The transaction file is on cards, where
each card contains the clock number, a code indi-
cating where the change should be applied, and the
new or changed information.
The one important change this program will not
perform is deletions from the file.
However, this
may be accomplished by changing the pay rate to
zero.
The following programming techniques should be
noted in this program (see Section 35 for a listing
of this program):
1. Setting a switch rather than testing. The
change code is a two-digit number form 01 to 16
(statements 105+1 and 106). When it has been vali-
dated, proven greater than -zero and less than 16,
the code is used as the index for a computed GO TO
statement (statement 140). This saves the program
a set of IF statements, each statement testing the
code and deciding on an action.
2. Detailed data validation. Since PAY01 and
PAY02 were so careful about building the file and
making sure the data was correct, common sense
indicates that the same care should be extended to
any changes to it. This is done through checks,
not only on the change code, but on the plant number,
the clock number, and, where applicable, the
change itself.
Note that the addition to the file of a
new employee causes a check to see whether that
employee clock number is already in the index.
3. Use of the alternate stacker. Any time an
error is detected, the card involved in the error is
selected to the alternate stacker of the IBM 1442
(statements 3 + 1, 8
+
1, 5 + 1, and 7 + 1). This
will save the operator the task of picking out those
cards with errors.

Advertisement

Table of Contents
loading

Table of Contents