IBM 1130 User Manual page 99

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

Advertisement

Plan Modest-Size, Modular Programs
At first thought, it would appear that the best
program is one that does as much as possible. Why
have half a dozen small payroll programs when one
could do everything? Unfortunately, however, a
large program that does many things tends to com-
pound errors rapidly.
Let us look at the typical payroll job steps for
each employee:
1.
Read employee's payroll labor card(s)
2. Read his master data from disk
3.
Compute gross
4.
Compute deductions and net pay
5. Compute all YTD and QTD totals
6. Write his new master disk record
7.
Print payroll register
S. Print paycheck
9.
Print check register
Suppose you wrote one very large program to do
all nine steps and one of the cards for the 56th man
somehow got mixed in with the cards of the 10Sth
man.
Your programmer has done a good job of
error checking, so the 1130 types CARDS MIXED
UP and pauses. You have processed 107 employees
- printed the register, written checks, updated
disk records, etc. - with one man (the 56th)
completely wrong.
How do you recover?
Correct the cards and rerun from the beginning?
No. Besides printing duplicate checks, that would
compute and write new YTD and QTD totals for
everyone and completely ruin your disk data
records.
Keep going and fix the 56th man later? Possibly,
but how? This would require a special program
to correct his now-erroneous disk record.
It
would
Section
Subsections
Page
15
20
I
50
also require a handwritten paycheck, a hand
correction to the payroll register, handwritten
totals, and a lot of explaining to the accounting
department.
01
Reprogram the entire system to be less accident-
prone? Yes, but a little too late.
It
should never
have been written to do so many things.
This example represents an everyday occurrence.
Programs are written this way and cause great
consternation when the inevitable error in input
data occurs - or when the operator enters the
wrong week-ending date, or when the paper in the
printer jams, etc.
A properly planned payroll system, like the
example used throughout the following chapters,
would consist of four programs, not one:
PAY16
Read Input Cards
Check for Errors
P A Y04, Part 1 •
Read Input Card
Find Man Number on Master
Disk File
Perform Calculations
Update Disk
Repeat Steps 1 - 4 for All
Employees
P A Y04, Part 2 •
When Part 1 Is Finished,
Print Payroll Register Directly
from Master Disk File
PAY05
Print Payroll Checks Directly
from Master Disk File
PAY06
Print Check Register Directly
from Master Disk File
The advantages of this plan are obvious:
1.
The input cards are checked before they
are used to modify the disk records.
2.
Payroll checks are printed after the payroll
register has been inspected for errors.

Advertisement

Table of Contents
loading

Table of Contents