IBM 1130 User Manual page 189

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

Advertisement

Section
Subsections
Page
25
40 110
01
Example 1: File Creation
This program reads cards containing employee
earnings information. The information is edited
for reasonableness and then written onto the disk.
The program illustrates a simple single-file at a
time run, with a minimum of calculations. The fol-
lowing programming techniques have been used:
1. Documenting with comments. Comment
cards have been used to document the program
logic. The program name and other indicative in-
formation are documented at the beginning of the
program. Comment cards describing the process-
ing to be performed are placed before each logical
section of the program.
2. One-at-a-time input from the console key-
board. Data items to be read from the console key-
board are requested one at a time (statements 69+1,
69+2, and 69+3). This technique will reduce console
input errors and will notify the operator when a re-
quested field has been completed (the keyboard re-
quest light will go out).
3. Entering a partial record. Since the com-
plete employee record requires more than 80 card
columns, it cannot be punched in one card. 'Fhe
name, which requires 18 card columns, is punched
on a second card. However, to prevent a name
card and its associated employee record card from
becoming separated, the employee name is stored
on the disk by PAY02.
4. Editing for reasonableness. Fields on a
card which have limits, or a range of values, are
checked to ensure that they fall within the range
(statements 100 through 109). This provides an
effective control of the information being stored on
the disk.
5. Program identification
numb~ing.
The pro-
gram identification for the· File Creation Program
in the Payroll System is P1\Y01. This method of
identification uses a three-character alphameric
abbreviation of the application, followed by the two-
digit run number in the application .. Identifying
programs and documentation in this manner facili-
tates an efficient system of organizing and filing the
documentation and the various decks pertaining to
each computer run.
6. Using packed data. To take full advantage of
the disk storage available, as much information as
possible is packed. This includes the employee and
plant name fields. In addition, where possible,
some values are compressed by storing them as
integers rather than real numbers.
7. Setting up for future reference to the file.
The file organization scheme to be used in the pay-
roll system is indexed sequential. This program
must create the index, in addition to creating the
file. Notice that there is an index entry for each
employee. Later programs will be able to locate
any employee by simply searching the index in core
storage and then reading the employee record. The
relative position of the employee number in the in-
dex is the record number of the employee in the
file.
8. Variable Summary Sheets. These very im-
portant forms are present in the following pages.
They have been prepared for this program and all
other programs in the system.

Advertisement

Table of Contents
loading

Table of Contents