perm filename COOP.POX[2,VDS]2 blob
sn#198044 filedate 1976-01-23 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00053 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00007 00002 $|\\M0CTL25\M1BASB30\M2GACB25\M3LGI25\M4LGR25\M5FIX25X\M6FIX25\
C00008 00003 \C\F1TABLE OF CONTENTS
C00014 00004 \F1I. INTRODUCTION\F4
C00018 00005 \F1I. INTRODUCTION \F4(continued)
C00023 00006 \F1II. DESCRIPTION OF THE OUTPUT\F4
C00027 00007 \F1II-B. PACKING LISTS\F4
C00030 00008 \F1II-C. PACKING LABELS\F4
C00033 00009 \F1II-E. STATUS OF ACCOUNTS\F4
C00036 00010 \F1II-F. BILLING SHEETS\F4
C00039 00011 \F1II-F. BILLING SHEETS \F4(continued)
C00041 00012 \F1III. DESCRIPTION OF THE INPUT\F4
C00045 00013 \F1III-B. COOPERATIVE INFORMATION CARD\F4
C00049 00014 \F1III-C. ACCOUNTING LIST HEADINGS \F4(Optional)
C00052 00015 \F1III-D. MEMBERSHIP FILE\F4
C00055 00016 \F1III-E. PRODUCT FILE\F4
C00059 00017 \F1III-E. PRODUCT FILE \F4(continued)
C00061 00018 \F1III-G. ORDERS FILE\F4
C00064 00019 \F1III-G. ORDERS FILE \F4(continued)
C00066 00020 \F1III-H. ACCOUNTING LISTS FILE\F4 (Optional)
C00069 00021 \F1III-H. ACCOUNTING LISTS FILE \F4(continued)
C00071 00022 \F1III-I. ORDER CHANGES FILE\F4 (Optional)
C00074 00023 \F1III-I. ORDER CHANGES FILE \F4(continued)
C00077 00024 \F1III-J. BILLING SHEET NOTES\F4 (Optional)
C00079 00025 \F1APPENDIX A. ORDER COMPILATION PROGRAM CHECKLIST
C00081 00026 \F12. \←.\→l\jPUNCH\f4 CARDS\f4 AS\f4 PER\f4 THE\f4 FOLLOWING\f4 PAGES\f4 AS\f4 NEEDED
C00084 00027 \F12-a. COOPERATIVE INFORMATION CARD\F4 (Page 12)
C00088 00028 \F12-e. DATE CARD\F4 (Page 16)
C00091 00029 \F12-g. ACCOUNTING LISTS FILE\F4 (continued)
C00096 00030 \F1APPENDIX B. BILLING PROGRAM CHECKLIST
C00098 00031 \F12. \←.\→l\jPUNCH\f4 CARDS\f4 AS\f4 PER\f4 THE\f4 FOLLOWING\f4 PAGES\f4 AS\f4 NEEDED
C00101 00032 \F12-a. COOPERATIVE INFORMATION CARD\F4 (Page 12)
C00105 00033 \F12-e. ACCOUNTING LISTS FILE\F4 (continued)
C00108 00034 \F12-g. BILLING SHEET NOTES\F4 (maximum of 10 cards) (Page 23)
C00113 00035 \F1APPENDIX C. SUMMARY OF PROGRAM DECK ORGANIZATION\F4
C00117 00036 \F1APPENDIX D. KEYPUNCH CONTROL CARDS\F4
C00121 00037 \F1APPENDIX E. ERROR MESSAGES PRINTED BY THE PROGRAMS\F4
C00125 00038 \F1APPENDIX F. MAKING CHANGES TO THE PROGRAMS\F4
C00129 00039 \F12. CHANGING THE NUMBER OF COPIES OF VARIOUS PRINTOUTS\F4
C00132 00040 \This is the title page
C00133 00041 \F1APPENDIX G. ORDER COMPILATION PROGRAM\F2
C00138 00042 READ 5050, CODEX(I), NAMEX(I,1), NAMEX(I,2), UNITX(I), CP 56
C00142 00043 PRINT 5140, CATX CP 115
C00146 00044 IF (K.EQ.0) GO TO 360 CP 174
C00150 00045 L=5 CP 233
C00156 00046 SUBROUTINE ERRCHK (I, *) CP 287
C00158 00047 \F1APPENDIX H. BILLING PROGRAM\F2
C00164 00048 DO 65 I=1,NACCTS BP 56
C00169 00049 M=MXPROD*(MXACCT+6)/7 BP 115
C00174 00050 2 UNITX(K), PRICE(K), FACTOR(K), K=L,L3,54) BP 174
C00179 00051 DO 455 L=L1,L2 BP 233
C00184 00052 PRINT 5290, BALNCE(I) BP 292
C00190 00053 5185 FORMAT (1X, I3, 3X, A8, A5, 16X, F8.2) BP 351
C00195 ENDMK
C⊗;
$|\\M0CTL25;\M1BASB30;\M2GACB25;\M3LGI25;\M4LGR25;\M5FIX25X;\M6FIX25;\;
\M7GACL25;\M8LG25;\M9BDR25;\MABDR40;\;
\←L\→X\;
\←R\→r\-L\/=16;\+L\→L\→Y\;
\F0\C.
\C\F1TABLE OF CONTENTS
\F9
I. INTRODUCTION \;
\R. . . . . . . . . . . . . . . . . . . . . . . . . . 3
II. DESCRIPTION OF THE OUTPUT\;
\R. . . . . . . . . . . . . . . . . . . 5
A. BUYING LIST\;
\R. . . . . . . . . . . . . . . . . . . . . . . . . 5
B. PACKING LISTS\;
\R. . . . . . . . . . . . . . . . . . . . . . . . 6
C. PACKING LABELS\;
\R. . . . . . . . . . . . . . . . . . . . . . . 7
D. PRICE LIST\;
\R. . . . . . . . . . . . . . . . . . . . . . . . . 7
E. STATUS OF ACCOUNTS\;
\R. . . . . . . . . . . . . . . . . . . . . 8
F. BILLING SHEETS\;
\R. . . . . . . . . . . . . . . . . . . . . . . 9
G. MEMBERSHIP FILE CARDS\;
\R. . . . . . . . . . . . . . . . . . . 10
III. DESCRIPTION OF THE INPUT\;
\R. . . . . . . . . . . . . . . . . . . . 11
A. SUMMARY OF THE INPUT\;
\R. . . . . . . . . . . . . . . . . . . 11
B. COOPERATIVE IDENTIFICATION CARD\;
\R. . . . . . . . . . . . . . . 12
C. ACCOUNTING LIST HEADINGS\;
\R. . . . . . . . . . . . . . . . . . 13
D. MEMBERSHIP FILE\;
\R. . . . . . . . . . . . . . . . . . . . . . 14
E. PRODUCT FILE\;
\R. . . . . . . . . . . . . . . . . . . . . . . . 15
F. DATE CARD\;
\R. . . . . . . . . . . . . . . . . . . . . . . . . 16
G. ORDERS FILE\;
\R. . . . . . . . . . . . . . . . . . . . . . . . 17
H. ACCOUNTING LISTS FILE\;
\R. . . . . . . . . . . . . . . . . . . . 19
I. ORDER CHANGES FILE\;
\R. . . . . . . . . . . . . . . . . . . . . 21
J. BILLING SHEET NOTES\;
\R. . . . . . . . . . . . . . . . . . . . . 23
APPENDIX A. ORDER COMPILATION PROGRAM CHECKLIST\;
\R. . . . . . . . . . 24
APPENDIX B. BILLING PROGRAM CHECKLIST\;
\R. . . . . . . . . . . . . . . 29
APPENDIX C. SUMMARY OF PROGRAM DECK ORGANIZATION\;
\R. . . . . . . . . 34
APPENDIX D. KEYPUNCH CONTROL CARDS\;
\R. . . . . . . . . . . . . . . . 35
APPENDIX E. ERROR MESSAGES PRINTED BY THE PROGRAM\;
\R. . . . . . . . 36
APPENDIX F. MAKING CHANGES TO THE PROGRAMS\;
\R. . . . . . . . . . . . . . 37
APPENDIX G. ORDER COMPILATION PROGRAM\;
\R. . . . . . . . . . . . . . . 39
APPENDIX H. BILLING PROGRAM\;
\R. . . . . . . . . . . . . . . . . . . . 45
\F1I. INTRODUCTION\F4
\J This "manual" describes a computer program package designed for use by
cooperatives for the processing of orders placed by members and, if desired,
related accounting. There are two
programs to this package. The table below summarizes their input and output.
The first, the ORDER COMPILATION PROGRAM, is used to produce (1) a "Buying
List" containing the total amount ordered of each product, and (2) "Packing
Lists" and "Packing Labels" used to distribute the products.
The second program, the BILLING PROGRAM, is mainly used to compute the cost
of each member's order and print itemized "Billing Sheets". It can be utilized
further to apply other accounting entries, and thus keep track of the status of
the members' accounts. A "Status of Accounts" sheet is produced, summarizing
the transactions processed, with totals produced for administrative use. A
"Price List" of the buy & sell prices of the products is also produced.
A detailed description of the output follows in Section II, and should be
read by those responsible for using the output. The person\f9(s\f9) responsible for
entering the input data should study the description of the input which is in
Section III.\.
Table 1 - Summary of Program Input & Output
Program Minimum Input Output Produced
__________________________________________________________________________
ORDER Cooperative Identification Card Buying List (2 copies)
COMPILATION Membership File Packing Lists
Product File Packing Labels
Date Card
Orders File
__________________________________________________________________________
BILLING Same as above plus, optionally: Price List (2 copies)
Accounting List Headings (\f6*) Status of Accounts
Accounting Lists File (\f6*) (2 copies)
Order Changes File Billing Sheets
Billing Sheet Notes New Membership Cards
(produced only if
Accounting Lists used)
(\f6*) \←.\→lIt is generally convenient to submit these two inputs to the ORDER\←.\→r
\jCOMPILATION PROGRAM so they will be keypunched and error checked
before the BILLING PROGRAM session is begun.\.
\←R\→r\;
\C-3-
\F1I. INTRODUCTION \F4(continued)
\J Appendix A contains a checklist of things to be done by the person\f9(s\f9) using
the ORDER COMPILATION PROGRAM. This should be modified as needed to meet your
organization's requirements (the empty boxes are meant to be filled in as desired).
Then, once the basic requirements for the various data cards are learned (e.g. the
information required and the restrictions), Appendix A should be sufficient to
refresh the user's memory when a question arises.
Appendix B contains a similar checklist for the person\f9(s\f9) using the BILLING
PROGRAM.
Appendix C contains a summary of the program deck organization that
can be used to reassemble a deck that has been dropped or otherwise dis-
rupted. This should be copied and given to the users of both programs.
Appendix D contains a list of the keypunch control cards provided with the
programs, which is useful when it is necessary to replace a lost control card.
This appendix should be copied and given to the users of both programs.
Both programs provide error checking of the input data. Appendix E contains
a list of the error messages printed by the programs, and indicates what error
checking is done by each of the programs.
Appendix F contains instructions on how to modify the programs to suit the
needs of particular organizations. Modifications described include: changing
the restrictions on the sizes of the various input files; changing the number of
copies of the Buying List, Price List, and Status of Accounts; and obtaining a
printed copy of the new Membership Cards.
Appendices G and H contain complete listings of the two program source
decks.
It should be noted that some of the information in the appendices assumes
that the programs are being used on the Stanford University IBM 370/168 computer
with the WATFIV compiler (Version 1, Level 4), and thus may not apply if the
programs are used differently. Table 2 shows the computer activity, using this
system, associated with processing 60 orders (900 items total) for a 100 member
food cooperative offering 90 products, including the processing of member accounting
information.\.
\CTable 2 - Approximate Computer Activity on an IBM 370/168
Activity ORDER COMPILATION BILLING
_______________________________________________
Cards read 750 760
Lines printed 1500 2500
Cards punched 0 100
CPU time used 1.9 sec. 2.6 sec.
Memory required 96K bytes 167K bytes
\C-4-
\F1II. DESCRIPTION OF THE OUTPUT\F4
In Section II the following notation is used:
\←.\→l\-L\/'3;\*'2;\¬R\→r\;
\jInformation in double quotes (i.e. " ... ") represents a computer
output line or column entry. Within the quotes, all information not in
angle brackets or square brackets will appear on the output as shown.
Information in angle brackets (i.e. < ... >) represents a description
of the actual information that would appear. (E.g. <\F3date\F4>
is used to indicate that the actual date [from the Date Card] would
appear at that point.) Furthermore, the information in \F3italics \F4is
copied from the input data, i.e. is under the user's control.
Information in square brackets (i.e. [ ... ]) represents
infor- mation that may or may not appear depending on the input data.\.
\←R\→r\;
\F1II-A. BUYING LIST\F4
\J This list contains the cumulative total quantity ordered for each product,
i.e. the quantity that needs to be available to fill the orders. The products
are listed in the order of their occurance in the Product File, which for
convenience should be the order used on the Order Form.
Two copies of this list are printed, a "\F5FILE COPY\F4" and a
"\F5WORK COPY\F4" (a simple modification of the ORDER COMPILATION PROGRAM will yield
two work copies). The work copy is intended to be used to (1) place bulk
orders for the products, and (2) provide a convenient place to record the wholesale
prices that have changed for entry by the person\f9(s\f9) using the BILLING PROGRAM.\.
The heading of the Buying List appears as
"\F5BUYING LIST FOR \F4<\F3date\F2> (<label>\F5 COPY, PAGE \F2<page no.>
\R\F5OF \F2<max. page no.>) <\F3cooperative descriptive information\F4>"
and the entry for each product has the form
"<\F3product name\F2> <total quantity ordered> <\F3unit of measure\F2>
\R(<\F3last wholesale price\F4>)"
\J On occasion prices will appear as zero, or as a negative number. These
have a special significance to the programs as described in the remarks on page 15.\.
\C-5-
\F1II-B. PACKING LISTS\F4
\J There is a Packing List produced for each product that has been ordered.
They are to be used to tell how to distribute the products to the accounts,
and to keep a record of any shortages that occur. The heading of each list
has the form:\.
\C"\f7[\F6*** \F5NOTE TO PACKER - \F4<\F3up to 40 characters of note\F4>\f7]"\.
"<\F3product name\F4> \F5BY THE \f4<\F3unit of measure\F4> (<\F3date\F4>)
\R<\F3cooperative descriptive information\F2> (<\F3product code\F2>) <sequence number>"
"\F5MISSING QUANTITY ACCT NAME\F4"
and each entry has the form:
\C"\F5_____ \f4<\F3quantity\F4> \f5→ <\F3account number\F4> <\F3member name\F4>"
\J In using the list, the packer is to distribute the product as indicated by
the quantity and account number/name entries (use of both account number and name
provides a check that reduces the possibility of error).
If for some reason an account cannot get all or part of it's ordered quantity,
the packer should write the quantity missing (just the number, without the units)
in the space provided. This information can be used later to credit accounts for
items they were charged for but did not receive. When the packer finishes each
account \f9(s\f9)he should check it off, but NOT in the "\F5MISSING\F4" space.
After distribution is completed the Packing Lists should be arranged in the
order indicated by the sequence numbers. Then the lists can easily be used to
record any missing items that are reported.
The product code is printed for the benefit of the person preparing Order
Change entries to be made to the BILLING PROGRAM.\.
\C-6-
\F1II-C. PACKING LABELS\F4
\J There are Packing Labels produced as needed to accomodate the orders for
items that are not distributed loosely. The format of the labels is:\.
\C"<\F2quantity> <\F3unit of measure\F2> <\F3date\F2>"
\C"<\F3product name\F2>"
\C"\f7[<\F3prefix\F2>\f7]<\F3account number\F2>: <\F3member name\F4>"
\J Consideration is made for the maximum number of product units that can fit
into a container. For example, if peanuts can be packaged up to 5 lbs. in a bag and
someone ordered 8 lbs., a label for 5 lbs. and another for 3 lbs. would be produced (see page 15).
The labels are printed in up to five columns across the page, and are grouped
by the product.\.
\F1II-D. PRICE LIST\F4
\J Similar to the Buying List, two copies of this list are printed - a "\F5FILE
COPY\F4" and a "\F5WORK COPY\F4". The heading appears as:\.
"\F5PRICE LIST FOR \f4<\F3date\F2> (<label>\F5 COPY, PAGE \F2<page no.>
\R\F5OF \F2<max. page no.>) <\F3cooperative descriptive information\F4>"
"\F5ITEM SELL AT UNIT COST MARKUP (%)\F4"
and the entry for each product has the form:
"<\F3product name\F2> <selling price> <\F3unit of measure\F2> \;
<\F3wholesale price\F2> <\F3% markup\F4>"
\J The products are listed in the same order as on the Buying List. On
occasion prices will appear as zero, or as a negative number -- these have a
special significance to the programs as described in the remarks on page 15.
The \F5MARKUP\F4 used to obtain the selling price from the wholesale
\F5COST\F4 is defined
on the Cooperative Information Card (see page 12) or on the Product Card for the
particular product (see page 15).\.
\C-7-
\F1II-E. STATUS OF ACCOUNTS\F4
\J This output summarizes the activity in each account for the billing cycle.
Two copies are produced so that one can be displayed for examination by the
membership and one can be saved. More copies can be obtained by a simple
modification of the BILLING PROGRAM. The copies are identical and begin with
the heading\.
"\F5STATUS OF ACCOUNTS AS OF \f2<\F3date\F2> (\F5PAGE \F2<page no.>\F5 OF \;
\F2<max. page no.>)
\R<\F3cooperative descriptive information\F4>"
and have the following column headings:
"\F5ACCT NAME NEW-BAL OLD-BAL ORDER CUMUL \f7[\f4<\F3accounting list codes used\F4>\f7]"
The following information is provided for each account:
"<\F3account number\F2> \f7[<delinquency flag>\f7] <\F3member name\F2>
\f7[<current balance> <\F3previous balance\F2>\f7] <total of current order>
\R\f7[<cumulative total of orders to date> <\F3accounting list entries\F4>\f7]"
At the end of the list the total of each column is printed in the form
"\F5TOTALS (\F2<number of orders placed>\F5 ORDERS)\F2 <totals of the columns>\F4"
\JFinally, two notes are printed if Accounting Lists are used to enter transactions
in addition to the orders. See the Accounting List Headings description, page
13, for examples of possible transactions.\.
"\F5NOTES: 1 - DIGIT AFTER ACCT. NO. IS NUMBER OF CONSECUTIVE TIMES BALANCE
HAS BEEN BELOW $\f2<\F3dollar limit\f2>\F5. DIGITS LESS THAN \;
\f2<\F3number limit\f2>\F5
ARE NOT PRINTED. `#' IS PRINTED IF DIGIT WOULD BE GREATER
THAN 9.\f4"
\f4"2 - COLUMN CODES: \f2<\F3list of the Accounting List Heading cards\F4>"
\JThe number limit and dollar limit mentioned in the first note above are variables
that are defined on the Cooperative Information Card (see page 12).\.
\C-8-
\F1II-F. BILLING SHEETS\F4
\J A Billing Sheet is produced for every account that has placed an order, or
if no order was placed but the account's balance has changed due to some other
transaction.
The form of the Billing Sheets, when Accounting Lists are used, is:\.
"\f7[<\F3prefix\F2>\f7]<\F3account number\F2>: <\F3member name\F2> \;
<\F3member information\F2>"
"<\F3cooperative descriptive information\F2>"
"\F5 ITEM QUANTITY UNIT PRICE TOTAL\F2"
"<\F3product name\F2> <quantity> <\F3unit of measure\F2> <selling price> <total charge>"
. . . . .
. . . . .
"<\F3product name\F2> <quantity> <\F3unit of measure\F2> <selling price> <total charge>"
"\F5TOTAL OF ORDER\F2 <total of order>"
"\F5STATEMENT OF ACCOUNT FOR PERIOD ENDING \f2<\F3date\F2>"
"\F5 CHARGES CREDITS BALANCE\F2"
"\F5OLD BALANCE \f2<\F3previous balance\F2>"
"\f7[<\F3accounting list headings\F2> <\F3accounting list entries\F2>\f7]"
"\F5TODAY'S ORDER \F2<total of order>"
"\F5NEW BALANCE \F2<current balance>"
"\f7[<\F3billing sheet notes\F4>\f7]"
\J If the account has placed no order the itemization portion is omitted. If
Accounting Lists are not used the form is modified by the addition of the line
"\F5ORDER FOR \f4<\F3date\F4>"
before the itemization of the order, and the statement portion at the bottom is
not printed.
If a product was ordered but none is available for some reason the words
"\F5NOT BOUGHT\F4" are printed in place of the selling price and the total charge
is left blank. If a product was ordered which is no longer available\.
\C-9-
\F1II-F. BILLING SHEETS \F4(continued)
\J(e.g. an old
Order Form was used) the words "\F5NO LONGER AVAILABLE\F4" are printed similarly.
(These special notes are produced when a product's wholesale price is input as zero,
or as a negative number, respectively. See page 15 for a further description.)\.
\F1II-G. MEMBERSHIP FILE CARDS\F4
\J When Accounting Lists are used the programs keep track of the status of the
member accounts. In order to do this the most recent accounting information must
be available. This is done by having the BILLING PROGRAM punch a
new set of Membership Cards with the current information. When desired the
accounts' cumulative totals of orders can be reset to zero by the BILLING PROGRAM
(see page 12 for how to do this).
When Accounting Lists are not used the BILLING PROGRAM does not punch these cards.\.
\C-10-
\F1III. DESCRIPTION OF THE INPUT\F4
\F1III-A. SUMMARY OF THE INPUT\F4
1. "Administrative" information (changes rarely, only as needed)
a. Information about the organization (see page 12)
(1). Optional account number prefix to appear on Labels and
Billing Sheets
(2). Descriptive information about the cooperative
(e.g. name, address, phone)
(3). Percentage markup to be applied (see d.(5) below also)
(4). Dollar limit for account flagging
(5). Occurance limit for account flagging
(6). Signal to reset accounts' cumulative totals of orders
b. Accounting List definitions (see page 13)
c. For each member account (see page 14)
(1). Account number
(2). Member's name
(3). Any information desired to be printed on the top of the
account's Billing Sheet (e.g. address & phone)
(4). Account's current balance (updated automatically)
(5). Cumulative total of the account's orders
(updated automatically)
d. For each product (see page 15)
(1). Product code
(2). Product name/description
(3). Unit of sale
(4). Packaging information
(5). Optional percentage markup for the particular product
(6). Wholesale price of the product
(7). Optional note to the packagers
2. "Production" information (changes every order cycle)
a. Date to be on the output (see page 16)
b. The orders (see page 17)
c. Lists of accounting transactions to be applied to the
accounts' balances (see page 19)
d. Lists of product order changes to be made after use of the
ORDER COMPILATION PROGRAM (see page 21)
e. Text of notes to be printed on every account's Billing Sheet
(see page 23)
Note - In category 1. items a-(1), a-(4), a-(5), a-(6), b, c-(3), c-(4), c-(5),
d-(5) & d-(7) are optional; in category 2. items c, d, & e are optional.
\C-11-
\F1III-B. COOPERATIVE INFORMATION CARD\F4
Description: \←.\→1\→l\jOne card containing information about the cooperative, and
accounting information.\.
Format: Col. 1-4 \←.\→2\→l\jOptional account number prefix (any 3 characters
but can't begin with "$", "/*", or "//") to appear on the Labels and Billing Sheets,
see pages 7, 9, & 14 (e.g. this can be used as a "branch" identification)\.
4-64 \jAny descriptive information desired to be printed on
all output (e.g. name, address, & phone number of the cooperative)\.
65-69 \jPercentage markup to be applied to the wholesale
product prices (i.e. the selling price is computed as
[<\F3wholesale price\F4>] \f2x [100 + <\F3markup\F4>]/100) (see Remark 1)\.
70-76 \jDollar limit to be used to monitor "negligent"
accounts; i.e. an account is "flagged" on the Status
of Accounts if its balance falls below this
dollar limit (see Remark 2)\.
77-78 \jThe "delinquency flag" will not be printed on
the Status of Accounts if it is less
than this number (see Remark 2)\.
79-80 \jSignal to the BILLING PROGRAM to reset the cumula- tive
totals of the accounts' orders to zero before proceeding. Reseting will occur when a "\f2T"
appears in this field, otherwise leave blank.\.
Restrictions: \←.\→3The number limit must END in column 78.
Remarks: 1. \←.\→4\→l\jA different markup can be given to individual products
(see page 15).\.
2. \jThe flagging of accounts applies only if Accounting Lists
are used (see pages 13 & 19).\.
Example:
\F2BR-NAME OF THE COOPERATIVE 1234 MAIN ST. (PHONE 123-4567) 10.0 -5.00 2 T
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 \f5←card column numbers\f5→ 64 66 72 78 80
\J(The account number prefix "\F2BR-\F4" is to appear on the Labels and Billing Sheets;
a \F210.0\F4% markup is to be applied to the wholesale prices of all products that
don't have an alternative markup; accounts with balances below \F2-$5.00\F4 are to be
monitored, and are to be "flagged" on the Status of Accounts if they are
below that level \f22 or more times consecutively; the accounts' cumulative totals
of orders are to be reset by the BILLING PROGRAM before other processing is done.)\.
\C-12-
\F1III-C. ACCOUNTING LIST HEADINGS \F4(Optional)
Description: \←1\→l\jAccounting Lists are used to record monetary transactions
to members' accounts in addition to orders. These cards,
up to 10 in number, are used to define the lists to be used.\.
Format: Col. 1-2 \←2\→l\jTwo character code to be used later to identify
the Accounting List (see page 19)\.
3 Blank
4 \j"+" or "-" to indicate that the list is to be
con- sidered as credits or charges, respectively\.
5 Blank
6-25 \jArbitrary list heading as to appear on members'
statements (see Examples below)\.
26-80 Blank
Restrictions: No more than 10 Accounting Lists can be used at one time.
No identifying code can be used more than once.
Remarks: \←3\→l\jIf no Accounting List Headings are supplied the BILLING PROGRAM
will not do any accounting other than compute the cost of the orders
and produce an itemized list of each member's order (it still produces the
Price List and a modified Status of Accounts).
Only the Accounting List Headings for which there are entries are printed on each
Billing Sheet. The order in which the Accounting List Headings are entered in the
data determines the order in which they will appear on the Billing Sheets and on
the Status of Accounts.\.
Examples: \F2MD + MONEY DEPOSITED\F1
\F2 MR - MONEY REFUNDED\F1
\F2 MI + MISSING (LAST ORDER)\F1
\F2 EB - EXTRAS (LAST TIME)\F1
\F2 DR + MEMB. DEPOSIT REFUND\F1
\F2 MF - MEMBERSHIP DEPOSIT\F1
\F2 JR + JAR DEPOSIT RETURN\F1
\F2 JD - JAR DEPOSIT\F1
\F2 CP + ACCOUNT CORRECTION\F1
\F2 CM - ACCOUNT CORRECTION\F1
\F2 \F4↑ ↑ ↑ ↑
col. 1 4 6 25
\C-13-
\F1III-D. MEMBERSHIP FILE\F4
Description: \←.\→1\→l\jUp to 200 cards, each providing information about a member account.\.
Format: Col. 1-3 \←.\→2\→lOptional account number prefix (see pages 7, 9, & 12)
4-6 Account number
7 Blank
8-23 \jMember's name (e.g. last name, and initial if needed
to prevent ambiguity)\.
24-63 \jAny desired information to be printed at the top of the
account's Billing Sheet (e.g. address & phone)\.
64-70 Current balance of the account (see Remark)
71-72 \jNumber of consecutive times the balance has been below
the "dollar limit" on the Cooperative Infor- mation Card
(see page 12 and Remark below)\.
73-80 \jCumulative total of the account's orders to date; reset
to zero by the BILLING PROGRAM upon request (see page 12 and Remark below)\.
Restrictions: \←.\→3\→l\jThe account number prefix must be the same as that on the
Cooperative Information Card (see page 12).\.
\jThe account number must END in column 6.\.
\jWhen creating a new account the last three items can be left blank.\.
\jThe largest account number that can be used is 200 (see page 37)
-- the programs are inefficient if account numbers larger than necessary are used,
therefore avoid "holes" in the membership list.\.
Remark: \jColumns 64-80 are ignored if no Accounting Lists are used (see
pages 13 & 19).\.
Examples:
\F2 23 JONES, R. 1234 MAIN ST. (123-4567) 3.72 0 27.63
\F6 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
\F41 5 8 24 30 54 63 67 72 76
\F6↓ ↓ ↓ ↓ ↓ ↓ ↓
\F2BR-114 SMITH PLEASE CALL BOB ABOUT WORKING NEXT WEEK -16.51 3 159.13\F4
\C-14-
\F1III-E. PRODUCT FILE\F4
Description: Up to 150 cards, each providing information about a product.
Format: Col. 1-2 \←2\→l\jTwo character product code to be used to identify the product
when entering orders (see Remark 1 below, and the Orders File description,
page 17)\.
3 Blank
4-19 Product name/description
20 Blank
21-26 \jArbitrary unit of sale (e.g. \F2POUND, EACH, BUCKET, \F4etc.)\.
27-28 \jPackaging code - "\f20" if the product is to be distributed
loosely; otherwise, maximum number of "units" that will
fit into the container to be used \.
29-33 \jOptional percentage markup for this product; if left blank
the "standard markup" on the Cooperative Information Card
will be used (see page 12)\.
34-39 \jWholesale price of the product (see Remarks 2 & 3)\.
40 Blank
41-80 \jOptional note to packagers (copied onto the Packing List
for the product)\.
Restrictions: \←3\→l\jNo product code can be used more than once (the ORDER
COMPILATION PROGRAM prints an error message if this occurs).
The packaging code must END in column 28.
The cards in this file can be in any order, but it is most
convenient to have them in the order used on the Order Form. \.
Remarks: 1. \←.\→4\→l\jThe product code can be any two characters, but the keypunching
of the Orders File cards is significantly complicated if numbers
are used in just some of the codes. \.
2. \jIf a product is temporarily unavailable, set the price to zero
and the BILLING PROGRAM will print "\F5NOT BOUGHT\F4" on the Billing Sheets in place
of the price.\.
3. \jIf a product is permanently unavailable, make the price negative
and the ORDER COMPILATION PROGRAM will ignore orders for the product, and the
BILLING PROGRAM will print "\F5NO LONGER AVAILABLE\F4" on the Billing Sheets in
place of the price. This is useful when orders are placed with old Order Forms.
When you are sure no more orders for this product will be placed remove the product
card.\.
\C-15-
\F1III-E. PRODUCT FILE \F4(continued)
Examples:
\F2RO ROLLED OATS POUND 3 0.205
\J\f4(\F2ROLLED OATS\F4 are to be packaged in a container with a maximum capacity of \F23 POUND\F4s;
the "standard markup" is to be used and the wholesale price is $\F20.205\F4.)\.
\F2GF GRAPEFRUIT EACH 0 12. 0.123 PLEASE HANDLE CAREFULLY
\J\f4(\F2GRAPEFRUIT\F4 are to be distributed by the \F2EACH\F4, loosely; this product is to be
marked up \F212.0\F4% instead of the "standard markup"; the wholesale price is $\F80.123\F4;
the packers are to be given the note shown.)\.
\F1III-F. DATE CARD\F4
Description: One card, used to input the date to be on the output.
Format: Col. 1-8 Date to be on the output, e.g. the distribution date
9-80 Blank (ignored if not blank)
Restrictions: None
Remarks: \←.\→5\→l\jThe date can contain any characters, e.g. "\F8SEPT. 18" could be
used, or any other desired form.\.
Examples: \F210/20/75
\F6↑
\F41
\F6↓
\F24/3/75
\C-16-
\F1III-G. ORDERS FILE\F4
Description: \←1\→l\jOne or more cards per account ordering, containing a list of
the products ordered and their quantities.\.
Format: Col. 1-3 Account number
4 Blank
5-6 \f6↑
9-10 |
13-14 |
17-18 | Two character codes of the products ordered
. | (see Product File, page 15)
. |
. |
77-78 \f6↓
7-8 \f6↑
11-12 |
15-16 |
19-20 | Two digit quantities ordered
. |
. |
. |
79-80 \f6↓
Restrictions: EVERY card must begin with an account number.
The account number must END in column 3.
No product can be ordered more than once by an account.
\←3\→l\jOrder quantities must be TWO characters. (Blanks are
read as zeros, but it's best to preceed a one digit quantity with a "0".)\.
Remarks: The Order cards can be in any order within this file.
\jProducts can be in any order in an account's order (however, the
programs are most efficient when the products appear in the order
of the Product File, see page 15).\.
\jA blank product code will cause the programs to skip to the next
product code.\.
\jA zero quantity can be given to a mis-typed product code as long
as the code is a valid one, and it has not already been ordered
by the account.\.
\C-17-
\F1III-G. ORDERS FILE \F4(continued)
Examples:
\F2 23 AP05BA 3CR12 BR01JA03
\J\F4(Account #\F223\F4 is ordering \f25 units of the product with code "\F2AP\F4",
\f23 units of "\F2BA\F4", \F212\F4 units of "\F2CR\F4",
\f21 unit of product "\F2BR\F4", and \f23 units of "\F2JA". Note that " \f23"
was given as the quantity for "\F2BA\F4" instead of "\F203\F4" and one field was left blank.)
\F2107 BA05JA03CR12AP10
\F4(Account #\F2107\F4 is ordering \f25 units of the product with code "\F2BA\F4",
\f23 units of "\F2JA\F4", \F212\F4 units of "\F2CR\F4",
and \F210\F4 units of product "\F2AP\F4". Note that the product codes are
in a different order than used in the first example.)
\.
\C-18-
\F1III-H. ACCOUNTING LISTS FILE\F4 (Optional)
Description: \←1\→l\jOne or more cards per Accounting List having entries, each
containing a list of account numbers and their dollar entries.\.
Format: Col. 1-2 \←.\→2\→l\jAccounting List code (see Accounting List Headings,
page 13)\.
3 Blank
4-6 \f6↑
14-16 |
24-26 |
34-36 | Account numbers
44-46 |
54-56 |
64-66 \f6↓
7 \f6↑
17 |
27 |
37 | "-" (Used only to ease visual examination of the
47 | card, see Remark 7)
57 |
67 \f6↓
8-13 \f6↑
18-23 |
28-33 |
38-43 | Dollar amounts
48-53 |
58-63 |
68-73 \f6↓
74-80 Blank
Restrictions: EVERY card must begin with an Accounting List code.
Account numbers must be RIGHT JUSTIFIED in their fields.
\←3\→l\jDollar amounts MUST CONTAIN a DECIMAL POINT, and can be
left justified in their fields.\.
No account number can appear on a list more than once.
Remarks: 1. There need not be any cards in this file.
2. Accounting List cards can be in any order in this file.
3. Accounts can be in any order on a list.
4. \←.\→4\→l\jA blank account number will cause the programs to skip
to the next account number.\.
\C-19-
\F1III-H. ACCOUNTING LISTS FILE \F4(continued)
Remarks (cont.): 5. \←.\→l\jIn the dollar amounts, trailing zeros to the right of
the decimal point need not be entered.\.
6. \jA zero dollar amount can be given to a mis-typed account
number as long as it refers to an active account that
has not already appeared on that list.\.
7. \jThe "-" characters are automatically copied from the
preceeding card when the Drum Card is used; use the
Lead Card to get them onto the first card.\.
Example:
\F2MD 23-7. 107-12.34 07-.6
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 14 18 25 28
\J(The Accounting List "\F2MD\F4" [e.g. money deposited] contains entries of $\F27.00\F4 for
account #\F223\F4, $\F212.34\F4 for #\F2107\F4, and $\F2.60\F4 for #\f27. Note the right
justification of the account numbers, the use of blanks in place of trailing zeros,
the left justification of the dollar amounts, and the leading zero used
[optionally] on account #\f27 to fill the space of the second digit.)
\.
\C-20-
\F1III-I. ORDER CHANGES FILE\F4 (Optional)
Description: \←1\→l\jOne or more cards per product having its orders changed.
(Used when it is known that certain accounts will receive
a different quantity than they originally ordered.)\.
Format: Col. 1-2 Product code (see Remark 1 below & Product File, page 15)
3 Blank
4-6 \f6↑
14-16 |
24-26 |
34-36 | Account numbers
44-46 |
54-56 |
64-66 \f6↓
7 \f6↑
17 |
27 |
37 | "-" (Used only to ease visual examination of
47 | the card, see Remark 6)
57 |
67 \f6↓
8-9 \f6↑
18-19 |
28-29 |
38-39 | Quantity of the product originally ordered by
48-49 | the account
58-59 |
68-69 \f6↓
10 \f6↑
20 |
30 |
40 | "," (Used only to ease visual examination of
50 | the card, see Remark 6)
60 |
70 \f6↓
11-12 \f6↑
21-22 |
31-32 |
41-42 | Quantity of the product to be charged to the
51-52 | account
61-62 |
71-72 \f6↓
13 \f6↑
23 |
33 |
43 | Blank
53 |
63 |
73-80 \f6↓
\C-21-
\F1III-I. ORDER CHANGES FILE \F4(continued)
Restrictions: EVERY card must begin with a product code.
Account numbers must be RIGHT JUSTIFIED in their fields.
Quantities must be RIGHT JUSTIFIED in their fields.
Remarks: 1. \←4\→l\jThe product code is printed in the upper right corner of
the Packing Lists. It can also be found on the Product Cards.\.
2. There need not be any cards in this file.
3. The Order Change cards can be in any order in this file.
4. Accounts can be in any order on a list.
5. \jA blank account number will cause the program to skip to
the next account number.\.
6. \jThe "-" and "," characters are automatically copied from
the preceeding card when the Drum Card is used; use the
Lead Card to get them onto the first card.\.
Example:
\F2BA 23-02,00 107-00,03 07- 3, 1
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 11 14 18 21 25 28 31
\J(Orders for the product with code "\F2BA\F4" are to be changed as follows: account
#\F223\F4 originally ordered \f22 units, but will actually receive none; account #\F2107\F4
didn't order any of this product originally, but will actually get \f23 units;
account #\f27 ordered \f23 units, but will get only \f21.)\.
\C-22-
\F1III-J. BILLING SHEET NOTES\F4 (Optional)
Description: \←1\→l\jUp to 10 cards containing any information desired to be copied
onto each Billing Sheet.\.
Format: Col. 1-64 Information to be copied verbatim
65-80 Blank (ignored if not blank)
Restrictions: \←3\→l\jNo more than 10 cards can be used (i.e. without modifying the
BILLING PROGRAM [see page 37]).
The note cards CANNOT BEGIN WITH "$", "//", "/\f6*", or
two zeros followed by six blanks.\.
Remarks: There need not be any cards in this file.
\jAny cards that appear will be copied exactly onto the Billing
Sheets; use blank cards to get blank lines between printed lines.\.
Examples:
\F2PLEASE READ THE FOLLOWING NOTES:
\R\F4←(blank card
\F2 1. THERE WILL BE A MEETING SUNDAY. \R\F4used to get
\F2 2. THERE WILL BE A SPECIAL ORDER OF APRICOTS NEXT WEEK \R\F4blank line)
\F2 ($.20/LB.) - WRITE IN ON ORDER FORM IF YOU WANT SOME.
\F4↑ ↑
1 64
\C-23-
\F1APPENDIX A. ORDER COMPILATION PROGRAM CHECKLIST
1. MATERIALS NEEDED FOR RUNNING THE PROGRAM\F4
(a) ORDER COMPILATION PROGRAM deck
(b) Entire data from the BILLING PROGRAM
(c) \←.\→l\jDrum Cards for Membership File, Product File, Orders File,
(and Accounting Lists File, with its Lead Card)\.
(d) List of any account changes (e.g. additions, changes, deletions)
(e) List of any product changes (e.g. additions, changes, deletions)
(f) Order Forms
(g) Accounting List entries to be made, if any
(h) \F6________________________________________________________________\F4
(i) \F6________________________________________________________________\F4
(j) \F6________________________________________________________________\F4
(k) \F6________________________________________________________________\F4
\C-24-
\F12. \←.\→l\jPUNCH\f4 CARDS\f4 AS\f4 PER\f4 THE\f4 FOLLOWING\f4 PAGES\f4 AS\f4 NEEDED
\f4 AND\f4 USE\f4 TO\f4 REPLACE\f4 THE\f4 CORRESPONDING\f4 OLD\f4 DATA\F4\.
The "Drum Card Formats" given have the following meaning:
<\F2CAPITAL LETTER\F4> \←.\→l\→p\jIndicates the beginning of a field, i.e. the
column at which the keypunch machine stops
after an automatic "skip" or "duplicate,"
or after you press the "\F2SKIP\F4" key.\.
<\F2small letter\F4> Indicates the extent of a field.
"\f2N" or "\f2n" \jIndicates the keypunch machine expects entry
of a "shifted" character, e.g. a number.
(Note - in this mode the "." in the top row
of keys must be used, not the one on the "9"
key!) "Un-shifted" characters can be entered
in this mode by holding the "\F2ALPHA\F4" key while
typing the desired characters.\.
"\f2A" or "\f2a" \jIndicates the keypunch machine expects entry
of an "un-shifted" character, e.g. a letter.
In this mode "shifted" characters can still be
entered, however, by simultaneously pressing
the "\F2NUMERIC\F4" key with the desired keys.\.
"\f2s" \jIndicates a column that will be skipped
automatically.\.
"\f2d" \jIndicates a column that will be duplicated
automatically from the preceeding card.\.
Example: A "Drum Card Format" as follows has the meaning indicated below.
\F2NnnnnnnnsssssssAaaaaaaaaadddddddddsssssssNnnnnnnnnnAaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 9 16 26 35 42 52 80
"Numeric" input is expected in columns 1-8 and 42-51.
"Alphabetic" input is expected in columns 16-25 and 52-80.
Columns 9-15 and 35-41 will be skipped automatically.
Columns 26-34 will be duplicated automatically.
\C-25-
\F12-a. COOPERATIVE INFORMATION CARD\F4 (Page 12)
\F6________________________________________________________________________________
____|________________________________________________________|_____|______|__|__
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 64 69 76 78 80
\F12-b. ACCOUNTING LIST HEADINGS\F4 (Page 13)
\F6_____________________________________ ____________________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 2 4 6 25 1 2 4 6 25
Note: A maximum of 10 can be used at any one time.
\F12-c. MEMBERSHIP FILE\F4 (Page 14)
Drum Card Formats: 2 digit/3 digit account number versions
\F2AaasNnsAaaaaaaaaaaaaaaaAaaaaaAaaaaaaaaaaaaaaaaaaaaaaaNnnnnnnnnnddddddddddddddddd
\F6↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
\F41 45 8 24 30 54 64 80
\F6↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
\F2AaaNnnsAaaaaaaaaaaaaaaaAaaaaaAaaaaaaaaaaaaaaaaaaaaaaaNnnnnnnnnnddddddddddddddddd
\F4Example:
\F6____ _________________________________________
____\F2123 JONES \F6_________________________________________ \F23.72 0 27.63
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 8 24 63 67 72 76
\F12-d. PRODUCT FILE\F4 (Page 15)
Drum Card Formats: Product card creation
\F2AasAaaaaaaaaaaaaaaasAaaaaasNsNnnnsNnnnnsAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 21 28 30 35 41 80
\F4Example:
\F2RO ROLLED OATS POUND 3 12. 0.123 THIS IS A SAMPLE NOTE TO THE PACKERS
\F4\C-26-
\F12-e. DATE CARD\F4 (Page 16)
Example: \F210/2/75
\F4↑
1
\F12-f. ORDERS FILE\F4 (Page 17)
Drum Card Formats: 2 digit/3 digit account number versions
\F2sNnsAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNn
\F6 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
\F412 5 7 9 11 17 25 33 41 49 57 65 73 79
\F6↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
\F2NnnsAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNnAaNn
\F4Examples:
\F2 23 AP05BA 3CR12 BR01JA03
107 BA05JA03CR12AP10
\C\F6***\F1 REMEMBER TO RETRIEVE THE DRUM CARD \F6***
\F12-g. ACCOUNTING LISTS FILE\F4 (Page 19)
Drum Card Formats:
2 digit account number version -
\F2AassNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsssssss
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 15 18 25 28 35 38 45 48 55 58 65 68 74 80
3 digit account number version -
\F2AasNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnsssssss
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 8 14 18 24 28 34 38 44 48 54 58 64 68 74 80
Note - \←.\→l\jWhen the Drum Card is used, the "." on the "\f6<" key (top row) must be used
instead of the one on the "\f29" key.
To get to the next account number field after typing a dollar amount,
press "\F2SKIP\F4".\.
(Example on next page)
\C-27-
\F12-g. ACCOUNTING LISTS FILE\F4 (continued)
Example:
\F2MD 23-7. 107-12.34 07-.6
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 14 18 25 28
(The Accounting List "\F2MD\F4" contains entries of $\F27.00\F4 for account #\F223\F4, etc.)
\C\F6***\F1 REMEMBER TO RETRIEVE THE DRUM CARD \F6***
\F13. RUN THE PROGRAM\F4
Look at the 4th page of the output for error messages.
\←.\→l\→p\jAny error messages that are printed by the program (i.e. those
shown in Appendix E) should be self explanatory. \F0(In some very rare cases one error
may incorrectly cause the printing of additional error messages - if a message seems
to be wrong, i.e. the data seems to be correct, you're probably missing something,
but you may have been lucky enough to get one of these "funny" messages.)
Certain other errors can occur which cause the program to stop immediately, and
unfortunately they aren't too self explanatory (the messages aren't produced by
the program). These errors appear in the form "\F5***ERROR***\F0" followed by a
statement describing the error. The following is a brief explanation
of the likely causes of these errors.\F4\.
\←l\→k\←.\→l\F5IMPROPER CHARACTER SEQUENCE OR INVALID CHARACTER... \F0 or
\←l\→.\F5FORMAT CODE AND DATA TYPE DO NOT MATCH
\j\F0These mean that the DATA CARD quoted as
the "\F5INPUT RECORD\F0" is not compatible with the program's expectations. This
occurs most frequently when the information on the card is in some way unacceptable
(e.g. a letter or special character
appears in a "number" field), but can also occur when the data cards are not
in the correct sequence (e.g. the Product File accidentally put in front of the
Membership File, or a single card put in the wrong file), or, even less frequently,
a preceeding card is somehow very wrong.\.
\←l\→.\F5CONTROL CARD ENCOUNTERED ON UNIT 5 AT EXECUTION... \F0 or
\←l\→.\F5ATTEMPT TO READ ON UNIT 5 AFTER IT HAS HAD END-OF-FILE
\j\F0These indicate that (a) one or more cards
are missing at the end of the data, or (b) a data card begins with a "$" or the
characters "//" or "/*", none of which are allowed.\.
\←k\→l\jNOTE - the computer SELDOM make mistakes, so usually nothing is accomplished by
re-running the program without making any changes. If all else fails, find
someone who is familiar with FORTRAN (the programming language in which the program
is written) using the WATFIV compiler and ask for assistance in deciphering the
problem.\.
\F4Correct the data as needed and re-run the program.
\JOnce a completed run is obtained tear off the first 4 pages, and the last 2
pages, and discard them in a RECYCLE BOX.\.
\C-28-
\F1APPENDIX B. BILLING PROGRAM CHECKLIST
1. MATERIALS NEEDED FOR RUNNING THE PROGRAM\F4
(a) BILLING PROGRAM deck
(b) Entire data from the ORDER COMPILATION PROGRAM
(c) \←.\→l\jDrum Cards for Product File (Price Changes), (Accounting Lists File,
with its Lead Card), and Order Changes File with its Lead Card\.
(d) List of the current wholesale prices
(e) Accounting List entries to be made, if any
(f) Order Change entries to be made, if any
(g) Billing Sheet Notes to be printed, if any
(h) \F6_________________________________________________________________\F4
(i) \F6_________________________________________________________________\F4
(j) \F6_________________________________________________________________\F4
(k) \F6_________________________________________________________________\F4
\C-29-
\F12. \←.\→l\jPUNCH\f4 CARDS\f4 AS\f4 PER\f4 THE\f4 FOLLOWING\f4 PAGES\f4 AS\f4 NEEDED
\f4 AND\f4 USE\f4 TO\f4 REPLACE\f4 THE\f4 CORRESPONDING\f4 OLD\f4 DATA\F4\.
The "Drum Card Formats" given have the following meaning:
<\F2CAPITAL LETTER\F4> \←.\→l\→p\jIndicates the beginning of a field, i.e. the
column at which the keypunch machine stops
after an automatic "skip" or "duplicate,"
or after you press the "\F2SKIP\F4" key.\.
<\F2small letter\F4> Indicates the extent of a field.
"\f2N" or "\f2n" \jIndicates the keypunch machine expects entry
of a "shifted" character, e.g. a number.
(Note - in this mode the "." in the top row
of keys must be used, not the one on the "9"
key!) "Un-shifted" characters can be entered
in this mode by holding the "\F2ALPHA\F4" key while
typing the desired characters.\.
"\f2A" or "\f2a" \jIndicates the keypunch machine expects entry
of an "un-shifted" character, e.g. a letter.
In this mode "shifted" characters can still be
entered, however, by simultaneously pressing
the "\F2NUMERIC\F4" key with the desired keys.\.
"\f2s" \jIndicates a column that will be skipped
automatically.\.
"\f2d" \jIndicates a column that will be duplicated
automatically from the preceeding card.\.
Example: A "Drum Card Format" as follows has the meaning indicated below.
\F2NnnnnnnnsssssssAaaaaaaaaadddddddddsssssssNnnnnnnnnnAaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 9 16 26 35 42 52 80
"Numeric" input is expected in columns 1-8 and 42-51.
"Alphabetic" input is expected in columns 16-25 and 52-80.
Columns 9-15 and 35-41 will be skipped automatically.
Columns 26-34 will be duplicated automatically.
\C-30-
\F12-a. COOPERATIVE INFORMATION CARD\F4 (Page 12)
\F6________________________________________________________________________________
____|________________________________________________________|_____|______|__|__
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 64 69 76 78 80
\F12-b. ACCOUNTING LIST HEADINGS\F4 (Page 13)
\F6_____________________________________ ____________________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
____||__||___________________________ ____||__||__________________________
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 2 4 6 25 1 2 4 6 25
Note: A maximum of 10 can be used at any one time.
\F12-c. PRODUCT FILE - Price Changes\F4 (Page 15)
Drum Card Format:
\F2ddddddddddddddddddddddddddddddddddddNnnsAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\F4↑ ↑ ↑ ↑
1 37 41 80
Note: The drum card causes duplication THROUGH the decimal point of the price.
If there is a note to the packers hit "\F5DUP\F4" after entering the 3 digits
of the price.
\F12-d. DATE CARD\F4 (Page 16)
Example: \F210/2/75
\F4↑
1
\F12-e. ACCOUNTING LISTS FILE\F4 (Page 19)
Drum Card Formats:
2 digit account number version -
\F2AassNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsNndNnnnnnsssssss
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 15 18 25 28 35 38 45 48 55 58 65 68 74 80
(Continued)
\C-31-
\F12-e. ACCOUNTING LISTS FILE\F4 (continued)
3 digit account number version -
\F2AasNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnNnndNnnnnnsssssss
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 8 14 18 24 28 34 38 44 48 54 58 64 68 74 80
Note - \←.\→l\jWhen the Drum Card is used, the "." on the "\f5<" key (top row) must be used
instead of the one on the "\f59" key.
To get to the next account number field after typing a dollar amount,
press "\F5SKIP\F4".\.
Example:
\F2MD 23-7. 107-12.34 07-.6
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 14 18 25 28
(The Accounting List "\F2MD\F4" contains entries of $\F27.00\F4 for account #\F223\F4, etc.)
\F6\C***\F1 REMEMBER TO RETRIEVE THE DRUM CARD \F6***\F4
\F12-f. ORDER CHANGES FILE\F4 (Page 21)
Drum Card Formats:
2 digit account number version -
\F2AassNndNndNnssNndNndNnssNndNndNnssNndNndNnssNndNndNnssNndNndNnssNndNndNnssssssss
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 11 15 18 21 25 28 31 35 38 41 45 48 51 55 58 61 65 68 71 73 80
3 digit account number version -
\F2AasNnndNndNnsNnndNndNnsNnndNndNnsNnndNndNnsNnndNndNnsNnndNndNnsNnndNndNnssssssss
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 4 8 11 14 18 21 24 28 31 34 38 41 44 48 51 54 58 61 64 68 71 73 80
Example:
\F2BA 23-02,00 107-00,03 7- 3, 1
\F4↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
1 5 8 11 14 18 21 26 28 31
\J(Orders for the product with code "\F2BA\F4" are to be changed as indicated: account
#\F223\F4 originally ordered \f22 units, but will actually receive none; etc.)\.
\F6\C***\F1 REMEMBER TO RETRIEVE THE DRUM CARD \F6***\F4
\C-32-
\F12-g. BILLING SHEET NOTES\F4 (maximum of 10 cards) (Page 23)
Examples:
\F2IMPORTANT NOTE:
\R\f5←\F4(blank card used to
\F2 THERE WILL BE A MEETING SUNDAY. \R\F4get blank line)
↑ ↑
1 64
\F13. RUN THE PROGRAM\F4
Look at the 4th page of the output for error messages.
\←.\→l\→p\jAny error messages that are printed by the program (i.e. those
shown in Appendix E) should be self explanatory. \F0(In some very rare cases one error
may incorrectly cause the printing of additional error messages - if a message seems
to be wrong, i.e. the data seems to be correct, you're probably missing something,
but you may have been lucky enough to get one of these "funny" messages.)
Certain other errors can occur which cause the program to stop immediately, and
unfortunately they aren't too self explanatory (the messages aren't produced by
the program). These errors appear in the form "\F5***ERROR***\F0" followed by a
statement describing the error. The following is a brief explanation
of the likely causes of these errors.\F4\.
\←l\→k\←.\→l\F5IMPROPER CHARACTER SEQUENCE OR INVALID CHARACTER... \F0 or
\←l\→.\F5FORMAT CODE AND DATA TYPE DO NOT MATCH
\j\F0These mean that the DATA CARD quoted as
the "\F5INPUT RECORD\F0" is not compatible with the program's expectations. This
occurs most frequently when the information on the card is in some way unacceptable
(e.g. a letter or special character
appears in a "number" field), but can also occur when the data cards are not
in the correct sequence (e.g. the Product File accidentally put in front of the
Membership File, or a single card put in the wrong file), or, even less frequently,
a preceeding card is somehow very wrong.\.
\←l\→.\F5CONTROL CARD ENCOUNTERED ON UNIT 5 AT EXECUTION... \F0 or
\←l\→.\F5ATTEMPT TO READ ON UNIT 5 AFTER IT HAS HAD END-OF-FILE
\j\F0These indicate that (a) one or more cards
are missing at the end of the data, or (b) a data card begins with a "$" or the
characters "//" or "/*", none of which are allowed.\.
\←k\→l\jNOTE - the computer SELDOM make mistakes, so usually nothing is accomplished by
re-running the program without making any changes. If all else fails, find
someone who is familiar with FORTRAN (the programming language in which the program
is written) using the WATFIV compiler and ask for assistance in deciphering the
problem.\.
\F4Correct the data as needed and re-run the program.
\JOnce a completed run is obtained tear off the first 3 pages, and the last 2
pages, and discard them in a RECYCLE BOX.\.
\C-33-
\F1APPENDIX C. SUMMARY OF PROGRAM DECK ORGANIZATION\F4
\J The organization of the program decks for use on the Stanford University
IBM 370/168 computer with the WATFIV compiler (Version 1, Level 4) must be as
indicated below. Information in angle brackets (i.e. <...>) represents a
description of the actual information that would appear. Information in double
quotes (i.e. "...") represents information that is written on the card but NOT
punched in the card.\.
\F4<Job card>
<Key card>
\F2// EXEC WATFIV
//GO.SYSIN DD *
$WATFIV RUN=NOCHECK,NOWARN,NOLIST,PAGES=500
\f6↑
\F4 | <Program deck (see note 1)>
\f6↓
\F2$DATA "START OF DATA"
\F4 <Cooperative Information Card>
\F200 "ACCOUNTING LIST HEADINGS"
\F4 <Accounting List Headings in order to appear (0-10 cards; note 2)>
\F200 "MEMBERSHIP FILE"
\F4 <Member identification cards (1 per account, 1-200 cards; note 3)>
\F200 "PRODUCT FILE"
\F4 <Product identification cards (in same order as on Order Form,
1 per product, 1-150 cards)>
\F200 "DATE CARD"
\F4 <Date card>
\F200 "ORDERS FILE"
\F4 <Order cards (1 or more per account placing order; note 3)>
\F200 "ACCOUNTING LISTS FILE"
\F4 <Accounting Lists cards (1 or more per list used; notes 2 & 3)>
\F200 "ORDER CHANGES FILE"
\F4 <Order Change cards (1 or more cards per product having orders
changed; notes 2 & 3)>
\F200 "BILLING SHEET NOTES"
\F4 <Notes to be printed on all billing sheets (0-10 cards; note 2)>
\F200 "END OF DATA"
$STOP
/*
\F4Notes: 1. \←.\→l\jThe cards of each program deck contain sequence information in columns
76-80. The first card of each deck tells how many cards there are in
the deck, and the number of the last card, so you can determine if all
of the cards are there. \F0(The number of cards can be greater than the
number of the last card because new cards may have been inserted after
the deck was numbered. Any such cards have a letter in column 80
indicating where they belong in the sequence and a letter in column 76 indicating
the highest letter used in the insertion [e.g. a sequence like
\F2..., CP 49, CP 50, CPB 50A, CPB 50B, CP 51, CP 52, ... \F0could occur].)\F4\.
2. \jThere may be no cards in this group - but the cards with "\F200\F4" in
columns 1-2 MUST still be there.\.
3. Within this group the cards may be in any order.
\←Y\→L\C-34-
\F1APPENDIX D. KEYPUNCH CONTROL CARDS\F4
\JKeypunch "drum cards" and "lead cards" containing the following
information produce the formats given in Appendices A and B.\.
\F11. MEMBERSHIP FILE\F4 - Drum cards: 2 digit/3 digit account number versions
\F21AA- &-1AAAAAAAAAAAAAAA1AAAAA1AAAAAAAAAAAAAAAAAAAAAAA &&&&&&&&&/AAAAAAAAAAAAAAAA
\F6↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
\F41 4 7 24 30 54 64 80
\F6↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
\F21AA &&-1AAAAAAAAAAAAAAA1AAAAA1AAAAAAAAAAAAAAAAAAAAAAA &&&&&&&&&/AAAAAAAAAAAAAAAA
\F12. PRODUCT FILE\F4 - Drum cards: product card creation/price change
\F21A-1AAAAAAAAAAAAAAA-1AAAAA- - &&&- &&&&-1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
\F6↑ ↑ ↑ ↑ ↑ ↑ ↑
\F41 4 20 27 34 37 40 80
\F6↓ ↓ ↓ ↓
\F2/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA &&-1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
\F13. ORDERS FILE\F4 - Drum cards: 2 digit/3 digit account number versions
\F2- &-1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &
\F6↑ ↑ ↑
\F41 5 80
\F6↓ ↓ ↓
\F2 &&-1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &1A &
\F14. ACCOUNTING LISTS FILE\F4 - Drum cards: 2 digit/3 digit account number versions
\F21A-& &/ &&&&&& &/ &&&&&& &/ &&&&&& &/ &&&&&& &/ &&&&&& &/ &&&&&& &/ &&&&&&&&&&&&
\F6↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
\F41 5 15 25 35 45 55 65 80
\F6↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
\F21A- &&/ &&&&& &&/ &&&&& &&/ &&&&& &&/ &&&&& &&/ &&&&& &&/ &&&&& &&/ &&&&&&&&&&&&
\F4Lead card:
\F6 - - - - - - -
↑ ↑ ↑ ↑ ↑ ↑ ↑
\F4 7 17 27 37 47 57 67
\F15. ORDER CHANGES FILE\F4 - Drum cards: 2 digit/3 digit account number versions
\F21A-& &/ &/ &-& &/ &/ &-& &/ &/ &-& &/ &/ &-& &/ &/ &-& &/ &/ &-& &/ &/ &-&&&&&&&
\F6↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
\F41 5 15 25 35 45 55 65 80
\F6↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
\F21A- &&/ &/ &- &&/ &/ &- &&/ &/ &- &&/ &/ &- &&/ &/ &- &&/ &/ &- &&/ &/ &-&&&&&&&
\F4Lead card:
\F6 - , - , - , - , - , - , - ,
↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
\F4 7 10 17 20 27 30 37 40 47 50 57 60 67 70
\C-35-
\F1APPENDIX E. ERROR MESSAGES PRINTED BY THE PROGRAMS\F4
ORDER
COMPILATION BILLING
Message PROGRAM PROGRAM Note
\F6____________________________________________________________________________________
\F2MEMBERSHIP FILE CONTAINS ACCOUNT #\F3nnn\F2 MORE THAN ONCE \F4Yes No 1
\F2MEMBERSHIP FILE CONTAINS ACCOUNT #\F3nnn\F2 WITH PREFIX "\F3aaa\F2" \F4Yes No 1
\F2PRODUCT FILE CONTAINS PRODUCT CODE "\F3aa\F2" MORE THAN ONCE \F4Yes No 1
\F2ACCOUNT #\F3nnn\F2 ORDERED ITEM "\F3aa\F2" MORE THAN ONCE \F4Yes No 1
\F2ACCOUNT #\F3nnn\F2 ORDERED - THIS ACCOUNT IS INACTIVE \F4Yes No 1
\F2ACCOUNT #\F3nnn\F2 ORDERED ITEM "\F3aa\F2" WHICH IS NOT DEFINED \F4Yes No 1
\F2ACCOUNTING LIST "\F3aa\F2" CONTAINS ACCOUNT #\F3nnn\F2 MORE THAN ONCE \F4Yes Yes 1
\F2ACCOUNTING LIST "\F3aa\F2" CONTAINS ACCOUNT #\F3nnn\F2 WHICH IS \F4Yes Yes 1
\F2 INACTIVE
\F2ACCOUNTING LIST CODE "\F3aa\F2" WAS USED - THIS CODE WAS NOT \F4Yes Yes 1
\F2 DEFINED
\F2AN ORDER CHANGE WAS SUBMITTED FOR PRODUCT "\F3aa\F2" WHICH IS \F4No Yes 1
\F2 NOT DEFINED
\F2AN ORDER CHANGE FOR PRODUCT "\F3aa\F2" WAS ENTERED FOR ACCOUNT \F4No Yes 1
\F2 #\F3nnn\F2 WHICH IS INACTIVE
\F2THE ORDER CHANGE FOR PRODUCT "\F3aa\F2" FOR ACCOUNT #\F3nnn\F2 DOES \F4No Yes 1
\F2 NOT AGREE WITH THE ORIGINAL ORDER
\F2TOO MANY LIST HEADING CARDS IN THE DATA Yes No 2
\F2TOO MANY MEMBERSHIP CARDS IN THE DATA \F4Yes No 2
\F2TOO MANY PRODUCT CARDS IN THE DATA \F4Yes No 2
\F2TOO MANY ORDER CARDS IN THE DATA \F4Yes No 2
\F2TOO MANY ACCOUNTING CARDS IN THE DATA \F4Yes Yes 2
\F2TOO MANY ORDER CHANGE CARDS IN THE DATA \F4No Yes 2
\F2TOO MANY NOTE CARDS IN THE DATA \F4No Yes 2
\F6____________________________________________________________________________________
\F4Notes: 1. \←.\→l\jThe program completes error checking of the data but stops before
producing actual output.\.
2. The program stops immediately.
\←Y\→L\C-36-
\F1APPENDIX F. MAKING CHANGES TO THE PROGRAMS\F4
\F11. CHANGING DATA FILE SIZE RESTRICTIONS\F4
\J Table 3 below lists arrays used in the programs, indicating the relationship
between their dimension\f9(s\f9) and the maximum number of member accounts (\f2m), products
(\f2p), and Billing Sheet Note cards (\f2n) which are allowed. As supplied, the
programs are limited to 200 member accounts, 150 products, and 10 Billing Sheet Note
cards. To increase these limits, modify the appearances of the appropriate arrays
at the locations indicated, and change the values of \F2MXACCT, MXPROD, \F4and\F2
MXNOTE as indicated in the table. (Note - No cards beyond \F2CP 20\F4 and
\F2BP 26\F4 need to be modified.)\.
\CTable 3 - Program Array Dimensions & Variable Values
Array Dimension\f9(s\f9) Card number\f9(s\f9) where appearing
\F6 ____________________________________________________________________________
\F2 BAGQ p CP 4
BUY p CP 4, CP 14
ORDER m,p CP 7, CP 15 BP 8, BP 21
PACK 2,m CP 7, CP 16
CODEX p CP 8 BP 10
LIST 10,m CP 9, CP 15 BP 11, BP 19
PRICE p CP 9 BP 12
PINFOX p,5 CP 11
MEMBRX m,2 CP 12, CP 15 BP 15, BP 20
NAMEX p,2 CP 12 BP 15
UNITX p CP 13 BP 16
COST m,p BP 4
LINES m BP 5
MCNT m BP 5, BP 20
BALNCE m BP 9, BP 17
CUMM m BP 10, BP 17
FACTOR p BP 11
NEW m BP 12, BP 20
SELL p BP 12
TOTAL m BP 13
INFOX m,5 BP 14, BP 19
NOTEX n,8 BP 15
\F6 ____________________________________________________________________________
\F4 Variable Value Card numbers where appearing
\F6 ____________________________________________________________________________
\F2 MXACCT m CP 18 BP 23
MXNOTE n BP 25
MXPROD p CP 20 BP 26
\F6 ____________________________________________________________________________
\F4\J The maximum number of Accounting List Headings that can be used is 10. This
cannot be increased without a great deal of effort.
Beware that the limits on the file sizes depend on the amount of computer
memory available and this should be taken into consideration when making changes.\.
\C-37-
\F12. CHANGING THE NUMBER OF COPIES OF VARIOUS PRINTOUTS\F4
\J As written the ORDER COMPILATION PROGRAM produces two copies of the
Buying List. From one to three copies can be obtained by changing the program,
and they will be labeled in order: \F2WORK COPY, FILE COPY, WORK COPY\F4.
To change the number of copies change card
\F2CP 146\F4 to read "\F2DO 320 I=1,n\F4" where \f2n gives the number of copies
desired (\F2n = 1, 2, or 3\F4).
Similarly, the BILLING PROGRAM produces two copies of the Price List.
To obtain one to three copies change card \F2BP 163\F4 to "\F2DO 360 I=1,n\F4"
where \f2n again gives the number of copies desired (\F2n = 1, 2, or 3\F4).
The BILLING PROGRAM is written to produce two copies of the Status of
Accounts. One or more copies can be obtained by changing card \F2BP 224\F4 to
"\F2DO 490 I=1,n\F4" where \f2n gives the number of copies desired (\F2n = 1,
2, ...\F4).\.
\F13. PRINTING NEW MEMBERSHIP CARDS INSTEAD OF OR IN ADDITION
TO PUNCHING THEM
\J It may be desirable to have the new Membership Cards printed instead of
punched (e.g. to save money or if punching is not available). This can be done by
changing the words "\F2PUNCH\F4" and "\F2PREFIX\F4" on card \F2BP 310\F4 to
"\F2PRINT\F4" and "\F2BLANKX\F4", respec- tively. Also, a printed
copy may be desired in addition to the punched cards for some reason. To do this
make two cards with the following information, and put then BETWEEN cards
\F2BP 309\F4 and \F2BP 310\F4; and change card \F2BP 1\F4 to reflect the
increase in the number of cards in the deck.\.
\F2 PRINT 5030, BLANKX, I, MEMBERX(I,1), MEMBRX(I,2), BPB309A
2 (INFOX(I,J), J=1,5), NEW(I), MCNT(I) BPB309B
\F4↑ ↑ ↑ ↑
6 14 26 \f6←Column numbers\f6→ 74
\C-38-
\;This is the title page
\C\FAA COMPUTER PROGRAM PACKAGE
\CFOR COOPERATIVES\F4
\C\F1By
\CCharles H. Spalding III
\F0\CCopyright c 1975 by Charles H. Spalding III
\CAll Rights Reserved
\CPrinted in the United States of America
\F1APPENDIX G. ORDER COMPILATION PROGRAM\F2
C *** ORDER COMPILATION PROGRAM FOR COOPERATIVES (299 CARDS, LAST=#299) CP 1
C COPYRIGHT (C) 1975 BY CHARLES H. SPALDING III CP 2
LOGICAL ERROR CP 3
INTEGER*2 BAGQ(150), BUY(150), I, J, K, L, L1, L2, L3, L4, CP 4
2 L5, M, M1, M2, M3, MT(5), MXACCT, MXCAT, MXNOTE, MXPROD, CP 5
3 N, N1, N2, NACCTS, NCATS, NK, NNOTES, NPRODS, NT, NUM(8), CP 6
4 ORDER(200,150), P, PACK(2,200), PMAX, Q, QUAN(19) CP 7
REAL AMT(8), BLANKX, CATCDX(10), CATX, CODEX(150), ITEMX(19), CP 8
2 LABELX, LIST(10,200), PREFIX, PRICE(150), TEMP, CP 9
3 WORDX(3), ZEROX CP 10
DOUBLE PRECISION COOPX(8), DATEX, EXS, PINFOX(150,5), CP 11
2 MEM(5,2), MEMBRX(200,2), NAMEX(150,2), TEMPX(5), CP 12
3 T1X, T2X, T3X, UNITX(150), ZEROSX CP 13
DATA BLANKX/' '/, BUY/150*0/, ERROR/.FALSE./, EXS/' '/, CP 14
2 LIST/2000*0.0/, MEMBRX/400*' '/, ORDER/30000*0/, CP 15
3 PACK/400*0/, WORDX/'WORK','FILE','WORK'/, ZEROX/'00'/, CP 16
4 ZEROSX/'00'/ CP 17
MXACCT=200 CP 18
MXCAT =10 CP 19
MXPROD=150 CP 20
C * READ COOP INFORMATION CP 21
READ 5000, PREFIX, COOPX CP 22
PRINT 5010, COOPX CP 23
C * READ ACCOUNTING LIST CATEGORIES (READ CODE, IGNORE REST) CP 24
DO 10 I=1,MXCAT CP 25
READ 5020, CATCDX(I) CP 26
IF (CATCDX(I).NE.ZEROX) GO TO 10 CP 27
NCATS=I-1 CP 28
GO TO 20 CP 29
10 CONTINUE CP 30
CALL ERRCHK (1, &250) CP 31
NCATS=MXCAT CP 32
C * READ MEMBERSHIP FILE (PREFIX, ACCT. NO., NAME, IGNORE REST) CP 33
20 NACCTS=0 CP 34
DO 40 I=1,MXACCT CP 35
READ 5030, CATX, N1, T1X, T2X, TEMP CP 36
IF (N1.EQ.0) GO TO 50 CP 37
IF (CATX.EQ.PREFIX) GO TO 25 CP 38
PRINT 5035, N1, CATX CP 39
ERROR=.TRUE. CP 40
25 IF (N1.LE.MXACCT) GO TO 26 CP 41
PRINT 5035, N1, CATX CP 42
ERROR=.TRUE. CP 43
GO TO 40 CP 44
26 IF (MEMBRX(N1,1).EQ.EXS) GO TO 30 CP 45
PRINT 5040, N1 CP 46
ERROR=.TRUE. CP 47
GO TO 40 CP 48
30 IF (N1.GT.NACCTS) NACCTS=N1 CP 49
MEMBRX(N1,1)=T1X CP 50
MEMBRX(N1,2)=T2X CP 51
40 CONTINUE CP 52
CALL ERRCHK (2, &250) CP 53
C * READ PRODUCT FILE (CODE, NAME, UNITS, BAG INFO, PRICE, NOTE) CP 54
50 DO 85 I=1,MXPROD CP 55
\F4\C-39-\F2
READ 5050, CODEX(I), NAMEX(I,1), NAMEX(I,2), UNITX(I), CP 56
2 BAGQ(I), PRICE(I), TEMPX CP 57
IF (CODEX(I).NE.ZEROX) GO TO 60 CP 58
NPRODS=I-1 CP 59
GO TO 90 CP 60
60 IF (I.EQ.1) GO TO 75 CP 61
K=I-1 CP 62
DO 70 J=1,K CP 63
IF (CODEX(I).NE.CODEX(J)) GO TO 70 CP 64
PRINT 5060, CODEX(I) CP 65
ERROR=.TRUE. CP 66
GO TO 85 CP 67
70 CONTINUE CP 68
75 DO 80 J=1,5 CP 69
80 PINFOX(I,J)=TEMPX(J) CP 70
85 CONTINUE CP 71
CALL ERRCHK (3, &250) CP 72
NPRODS=MXPROD CP 73
C * READ DATE TO BE ON OUTPUT CP 74
90 READ 5070, DATEX CP 75
C * READ ORDERS (ACCT, CODE, QUANTITY, ...) CP 76
M=MXACCT*(MXPROD+18)/19 CP 77
DO 150 I=1,M CP 78
READ 5080, NT, (ITEMX(J), QUAN(J), J=1,19) CP 79
IF (NT.EQ.0) GO TO 160 CP 80
IF (NT.GT.MXACCT) GO TO 100 CP 81
IF (MEMBRX(NT,1).NE.EXS) GO TO 110 CP 82
100 PRINT 5090, NT CP 83
ERROR=.TRUE. CP 84
IF (NT.GT.MXACCT) GO TO 150 CP 85
110 N=0 CP 86
DO 140 J=1,19 CP 87
IF (ITEMX(J).EQ.BLANKX) GO TO 140 CP 88
DO 130 K=1,NPRODS CP 89
N=N+1 CP 90
IF (N.GT.NPRODS) N=1 CP 91
IF (ITEMX(J).NE.CODEX(N)) GO TO 130 CP 92
IF (ORDER(NT,N).EQ.0) GO TO 120 CP 93
PRINT 5100, NT, CODEX(N) CP 94
ERROR=.TRUE. CP 95
GO TO 140 CP 96
120 ORDER(NT,N)=QUAN(J) CP 97
BUY(N)=BUY(N)+QUAN(J) CP 98
GO TO 140 CP 99
130 CONTINUE CP 100
PRINT 5110, NT, ITEMX(J) CP 101
ERROR=.TRUE. CP 102
140 CONTINUE CP 103
150 CONTINUE CP 104
CALL ERRCHK (4, &250) CP 105
C * READ ACCOUNTING LISTS (CODE, ACCT, AMOUNT, ...) CP 106
160 PRINT 5120 CP 107
M=MXCAT*(MXACCT+6)/7 CP 108
DO 230 I=1,M CP 109
READ 5130, CATX, (NUM(J), AMT(J), J=1,7) CP 110
IF (CATX.EQ.ZEROX) GO TO 240 CP 111
DO 220 J=1,NCATS CP 112
IF (CATX.EQ.CATCDX(J)) GO TO 170 CP 113
IF (J.NE.NCATS) GO TO 220 CP 114
\F4\C-40-\F2
PRINT 5140, CATX CP 115
ERROR=.TRUE. CP 116
170 DO 210 K=1,7 CP 117
N=NUM(K) CP 118
IF (N.EQ.0) GO TO 210 CP 119
IF (N.GT.MXACCT) GO TO 180 CP 120
IF (MEMBRX(N,1).NE.EXS) GO TO 190 CP 121
180 PRINT 5150, CATX, N CP 122
ERROR=.TRUE. CP 123
IF (N.GT.MXACCT) GO TO 210 CP 124
190 IF (LIST(J,N).EQ.0.0) GO TO 200 CP 125
PRINT 5160, CATX, N CP 126
ERROR=.TRUE. CP 127
200 LIST(J,N)=AMT(K) CP 128
210 CONTINUE CP 129
GO TO 230 CP 130
220 CONTINUE CP 131
230 CONTINUE CP 132
CALL ERRCHK (5, &240) CP 133
C * STOP IF FATAL ERROR(S) DETECTED CP 134
240 IF (.NOT.ERROR) GO TO 260 CP 135
250 PRINT 5170 CP 136
STOP CP 137
260 PRINT 5180 CP 138
C * PRINT BUYING LIST CP 139
DO 270 I=1,NPRODS CP 140
IF (PRICE(I).LT.-0.0001) BUY(I)=0 CP 141
270 CONTINUE CP 142
PMAX=(NPRODS-1)/112+1 CP 143
C TO GET 1 OR 2 "WORK" COPIES MAKE THE LAST DIGIT IN THE CP 144
C FOLLOWING STATEMENT 2 OR 3, RESPECTIVELY. CP 145
DO 320 I=1,2 CP 146
LABELX=WORDX(I) CP 147
280 DO 310 P=1,PMAX CP 148
PRINT 5190, DATEX, LABELX, P, PMAX, COOPX CP 149
L1=112*(P-1)+1 CP 150
L2=L1+55 CP 151
DO 300 L=L1,L2 CP 152
IF (L.GT.NPRODS) GO TO 320 CP 153
L3=L+56 CP 154
IF (L3.GT.NPRODS) GO TO 290 CP 155
PRINT 5200, (NAMEX(K,1), NAMEX(K,2), BUY(K), CP 156
2 UNITX(K), PRICE(K), K=L,L3,56) CP 157
GO TO 300 CP 158
290 PRINT 5200, NAMEX(L,1), NAMEX(L,2), BUY(L), CP 159
2 UNITX(L), PRICE(L) CP 160
300 CONTINUE CP 161
310 CONTINUE CP 162
320 CONTINUE CP 163
C * PRINT PACKING LISTS CP 164
M=0 CP 165
DO 360 I=1,NPRODS CP 166
IF (PRICE(I).LT.-0.0001) GO TO 360 CP 167
K=0 CP 168
DO 330 J=1,NACCTS CP 169
IF (ORDER(J,I).EQ.0) GO TO 330 CP 170
K=K+1 CP 171
PACK(1,K)=J CP 172
330 CONTINUE CP 173
\F4\C-41-\F2
IF (K.EQ.0) GO TO 360 CP 174
M=M+1 CP 175
PRINT 5240 CP 176
IF (PINFOX(I,1).NE.EXS) PRINT 5205, (PINFOX(I,J),J=1,5) CP 177
PRINT 5210, NAMEX(I,1), NAMEX(I,2), UNITX(I), CP 178
2 DATEX, COOPX, CODEX(I), M CP 179
NK=K/2 CP 180
N=NK CP 181
IF (2*N.NE.K) N=N+1 CP 182
IF (NK.EQ.0) GO TO 350 CP 183
DO 340 J=1,NK CP 184
L=J+N CP 185
M1=PACK(1,J) CP 186
M2=PACK(1,L) CP 187
M3=M2-M1 CP 188
340 PRINT 5220, (ORDER(L,I), L, MEMBRX(L,1), CP 189
2 MEMBRX(L,2), L=M1,M2,M3) CP 190
350 IF (N.EQ.NK) GO TO 360 CP 191
M1=PACK(1,N) CP 192
PRINT 5230, ORDER(M1,I), M1, MEMBRX(M1,1), CP 193
2 MEMBRX(M1,2) CP 194
360 CONTINUE CP 195
PRINT 5240 CP 196
C * PRINT PACKING LABELS (FOR PREPACKAGED ITEMS) CP 197
N=0 CP 198
DO 430 I=1,NPRODS CP 199
IF (PRICE(I).LT.-0.0001) GO TO 430 CP 200
IF (BAGQ(I).EQ.0) GO TO 430 CP 201
K=0 CP 202
DO 390 J=1,NACCTS CP 203
Q=ORDER(J,I) CP 204
IF (Q.EQ.0) GO TO 390 CP 205
370 K=K+1 CP 206
PACK(1,K)=J CP 207
IF (Q.LE.BAGQ(I)) GO TO 380 CP 208
PACK(2,K)=BAGQ(I) CP 209
Q=Q-BAGQ(I) CP 210
GO TO 370 CP 211
380 PACK(2,K)=Q CP 212
390 CONTINUE CP 213
IF (K.EQ.0) GO TO 430 CP 214
N=N+1 CP 215
IF (N.GT.1) PRINT 5250 CP 216
PRINT 5255 CP 217
T1X=UNITX(I) CP 218
T2X=NAMEX(I,1) CP 219
T3X=NAMEX(I,2) CP 220
L1=(K-1)/5+1 CP 221
DO 420 J=1,L1 CP 222
L2=5*(J-1) CP 223
L3=L2+1 CP 224
DO 400 L=1,5 CP 225
L4=L2+L CP 226
MT(L)=PACK(1,L4) CP 227
M=MT(L) CP 228
MEM(L,1)=MEMBRX(M,1) CP 229
MEM(L,2)=MEMBRX(M,2) CP 230
IF (L4.EQ.K) GO TO 410 CP 231
400 CONTINUE CP 232
\F4\C-42-\F2
L=5 CP 233
410 PRINT 5260, (PACK(2,M), T1X, DATEX, M=L3,L4) CP 234
PRINT 5270, (T2X, T3X, M=1,L) CP 235
420 PRINT 5280, (PREFIX,MT(M),MEM(M,1),MEM(M,2),M=1,L) CP 236
430 CONTINUE CP 237
PRINT 5240 CP 238
STOP CP 239
5000 FORMAT (A3, 7A8, A5/) CP 240
5010 FORMAT ('0'/'0', 9X, 'ERROR MESSAGES FOR ORDER COMPILATION ', CP 241
2 'RUN FOR ', 8A8/'0') CP 242
5020 FORMAT (A2) CP 243
5030 FORMAT (A3, I3, 1X, 2A8, 40X, F7.2) CP 244
5035 FORMAT ('0', 25X, 'MEMBERSHIP FILE CONTAINS ACCOUNT #', I3, CP 245
2 ' WITH PREFIX "', A3, '"') CP 246
5040 FORMAT ('0', 25X, 'MEMBERSHIP FILE CONTAINS ACCOUNT #', I3, CP 247
2 ' MORE THAN ONCE') CP 248
5050 FORMAT (A2, 1X, 2A8, 1X, A6, I2, 5X, F6.3, 1X, 5A8) CP 249
5060 FORMAT ('0', 25X, 'PRODUCT FILE CONTAINS PRODUCT CODE "', CP 250
2 A2, '" MORE THAN ONCE') CP 251
5070 FORMAT (A8/) CP 252
5080 FORMAT (I3, 1X, 19(A2, I2)) CP 253
5090 FORMAT ('0', 25X, 'ACCOUNT #', I3, ' ORDERED - THIS ', CP 254
2 'ACCOUNT IS INACTIVE') CP 255
5100 FORMAT ('0', 25X, 'ACCOUNT #', I3, ' ORDERED ITEM "', A2, CP 256
2 '" MORE THAN ONCE') CP 257
5110 FORMAT ('0', 25X, 'ACCOUNT #', I3, ' ORDERED ITEM "', A2, CP 258
2 '" WHICH IS NOT DEFINED') CP 259
5120 FORMAT ('0') CP 260
5130 FORMAT (A2, 1X, 7(I3, 1X, F6.5)) CP 261
5140 FORMAT ('0', 25X, 'ACCOUNTING LIST CODE "', A2, CP 262
2 '" WAS USED - THIS CODE WAS NOT DEFINED') CP 263
5150 FORMAT ('0', 25X, 'ACCOUNTING LIST "', A2, '" CONTAINS ', CP 264
2 'ACCOUNT #', I3, ' WHICH IS INACTIVE') CP 265
5160 FORMAT ('0', 25X, 'ACCOUNTING LIST "', A2, '" CONTAINS ', CP 266
2 'ACCOUNT #', I3, ' MORE THAN ONCE') CP 267
5170 FORMAT ('0'/'0'/10X, 'END OF ERROR LIST -- PROGRAM IS ', CP 268
2 'STOPPING -- CORRECT DATA AND RE-RUN'/'1') CP 269
5180 FORMAT (10X, 'NO ERRORS WERE DETECTED') CP 270
5190 FORMAT ('1'/' BUYING LIST FOR ', A8, 9X, '(', A4, CP 271
2 ' COPY, PAGE', I2, ' OF', I2, ')', 9X, 8A8/'0') CP 272
5200 FORMAT (2(14X, 2A8, I5, 3X, A6, ' (', F6.3, ' )', 5X)) CP 273
5205 FORMAT (' ', 38X, '*** NOTE TO PACKER - ', 5A8//) CP 274
5210 FORMAT (' ', 5X, 2A8, ' BY THE ', A6, ' (', A8, ') ', CP 275
2 8A8, 7X, '(', A2, ') ', I3//'0', 2(18X, 'MISSING', CP 276
3 ' QUANTITY ACCT NAME', 9X)) CP 277
5220 FORMAT ('0'/4X, 2(16X, '_____', I9, ' ->', I5, 4X, 2A8)) CP 278
5230 FORMAT ('0'/20X, '_____', I9, ' ->', I5, 4X, 2A8) CP 279
5240 FORMAT ('1') CP 280
5250 FORMAT (' ') CP 281
5255 FORMAT ('0', 132('_')) CP 282
5260 FORMAT (//'0', I2, 1X, A6, 7X, A8, 4(3X, I2, 1X, A6, 7X, A8)) CP 283
5270 FORMAT (9X, 2A8, 4(11X, 2A8)) CP 284
5280 FORMAT (1X, A3, I3, ': ', 2A8, 4(3X, A3, I3, ': ', 2A8)) CP 285
END CP 286
\C(Continued on next page)
\F4\C-43-\F2
SUBROUTINE ERRCHK (I, *) CP 287
REAL A, WORDS(3,7), ZEROX CP 288
DATA WORDS/'LIST', ' HEA', 'DING', ' MEM', 'BERS', 'HIP ', CP 289
2 ' P', 'RODU', 'CT ', ' ', 'ORDE', 'R ', CP 290
3 'ACCT', 'ING ', 'LIST', 'ORDE', 'R CH', 'ANGE', CP 291
4 ' ', 'NOTE', ' '/, ZEROX/'00'/ CP 292
READ 5000, A CP 293
IF (A.EQ.ZEROX) RETURN CP 294
PRINT 5010, (WORDS(J,I), J=1,3) CP 295
RETURN 1 CP 296
5000 FORMAT (A2) CP 297
5010 FORMAT ('0'/'0', 25X, 'TOO MANY ', 3A4, ' CARDS IN THE DATA') CP 298
END CP 299
\F4\C-44-\F2
\F1APPENDIX H. BILLING PROGRAM\F2
C *** BILLING PROGRAM FOR COOPERATIVES (390 CARDS, LAST = #390) BP 1
C COPYRIGHT (C) 1975 BY CHARLES H. SPALDING III BP 2
LOGICAL ERROR, NOCATS, NOTES, RESET BP 3
INTEGER*2 COST(200,150), DIGITX(10), FLAGX, I, J, K, L, L1, BP 4
2 L2, L3, L4, L5, LINES(200), M, M1, M2, M3, MCNT(200), BP 5
3 MXACCT, MXCAT, MXNOTE, MXPROD, N, N1, N2, NACCTS, BP 6
4 NCATS, NK, NLIM, NNOTES, NPRODS, NT, NUM(8), BP 7
5 ORDER(200,150), P, PMAX, Q, QUAN(19) BP 8
REAL AMT(8), BALNCE(200), BLANKX, CATCDX(10), CATX, BP 9
2 CODEX(150), CST, CTGRYX(10,5), CUMM(200), DLIM, BP 10
3 FACTOR(150), ITEMX(19), LABELX, LIST(10,200), MARKUP, BP 11
4 MINUSX, NEW(200), PERCNT, PREFIX, PRICE(150), SELL(150), BP 12
5 SIGN(10), SIGNX(10), T1(3), TOTAL(200), WORDX(2), ZEROX BP 13
DOUBLE PRECISION COOPX(8), DATEX, EXS, INFOX(200,5), BP 14
2 MEMBRX(200,2), NAMEX(150,2), NOTEX(10,8), T1X, BP 15
3 T2X, T3X, UNITX(150), ZEROSX BP 16
DATA BALNCE/200*0.0/, BLANKX/' '/, CUMM/200*0.0/, DIGITX/'1', BP 17
2 '2', '3', '4', '5', '6', '7', '8', '9', '#'/, BP 18
3 ERROR/.FALSE./, EXS/' '/, INFOX/1000*' '/, LIST/2000*0./, BP 19
4 MCNT/200*0/, MINUSX/'-'/, MEMBRX/400*' '/, NEW/200*0.0/, BP 20
5 NOCATS, NOTES/2*.FALSE./, ORDER/30000*0/, SIGN/10*1./, BP 21
6 WORDX/'WORK', 'FILE'/, ZEROX/'00'/, ZEROSX/'00'/ BP 22
MXACCT=200 BP 23
MXCAT =10 BP 24
MXNOTE=10 BP 25
MXPROD=150 BP 26
C * READ COOP INFORMATION CARD BP 27
READ 5000, PREFIX, COOPX, PERCNT, DLIM, NLIM, RESET BP 28
PRINT 5010, COOPX BP 29
C * READ ACCOUNTING LIST CATEGORIES (CODE, SIGN, HEADING) BP 30
DO 30 I=1,MXCAT BP 31
READ 5020, CATCDX(I), SIGNX(I), (CTGRYX(I,J), J=1,5) BP 32
IF (CATCDX(I).NE.ZEROX) GO TO 10 BP 33
NCATS=I-1 BP 34
IF (NCATS.EQ.0) NOCATS=.TRUE. BP 35
GO TO 40 BP 36
10 IF (SIGNX(I).EQ.MINUSX) SIGN(I)=-1. BP 37
30 CONTINUE BP 38
NCATS=MXCAT BP 39
C * READ MEMBERSHIP FILE CARDS BP 40
40 NACCTS=0 BP 41
DO 50 I=1,MXACCT BP 42
READ 5030, CATX, N1, T1X, T2X, (NOTEX(1,J), J=1,5), BP 43
2 T1(1), N2, T1(2) BP 44
IF (N1.EQ.0) GO TO 60 BP 45
IF (N1.GT.NACCTS) NACCTS=N1 BP 46
MEMBRX(N1,1)=T1X BP 47
MEMBRX(N1,2)=T2X BP 48
BALNCE(N1)=T1(1) BP 49
MCNT(N1)=N2 BP 50
CUMM(N1)=T1(2) BP 51
DO 50 J=1,5 BP 52
INFOX(N1,J)=NOTEX(1,J) BP 53
50 CONTINUE BP 54
60 IF (.NOT.RESET .OR. NOCATS) GO TO 70 BP 55
\F4\C-45-\F2
DO 65 I=1,NACCTS BP 56
65 CUMM(I)=0.0 BP 57
C * READ PRODUCT FILE (CODE, NAME, UNITS, % MARKUP, PRICE) BP 58
70 DO 90 I=1,MXPROD BP 59
READ 5040, CODEX(I), NAMEX(I,1), NAMEX(I,2), UNITX(I), BP 60
2 FACTOR(I), PRICE(I) BP 61
IF (CODEX(I).NE.ZEROX) GO TO 80 BP 62
NPRODS=I-1 BP 63
GO TO 100 BP 64
80 IF (FACTOR(I).EQ.0.0) FACTOR(I)=PERCNT BP 65
90 CONTINUE BP 66
NPRODS=MXPROD BP 67
C * READ DATE TO BE ON BILLS BP 68
100 READ 5050, DATEX BP 69
C * READ ORDERS (ACCT, CODE, QUANTITY, ...) BP 70
M=MXACCT*(MXPROD+18)/19 BP 71
DO 120 I=1,M BP 72
READ 5060, NT, (ITEMX(J), QUAN(J), J=1,19) BP 73
IF (NT.EQ.0) GO TO 125 BP 74
N=0 BP 75
DO 120 J=1,19 BP 76
IF (ITEMX(J).EQ.BLANKX) GO TO 120 BP 77
DO 110 K=1,NPRODS BP 78
N=N+1 BP 79
IF (N.GT.NPRODS) N=1 BP 80
IF (ITEMX(J).NE.CODEX(N)) GO TO 110 BP 81
ORDER(NT,N)=QUAN(J) BP 82
GO TO 120 BP 83
110 CONTINUE BP 84
120 CONTINUE BP 85
C * READ ACCOUNTING LISTS (CODE, ACCT, AMOUNT, ...) BP 86
125 M=MXCAT*(MXACCT+6)/7 BP 87
DO 170 I=1,M BP 88
READ 5070, CATX, (NUM(J), AMT(J), J=1,7) BP 89
IF (CATX.EQ.ZEROX) GO TO 180 BP 90
DO 160 J=1,NCATS BP 91
IF (CATX.EQ.CATCDX(J)) GO TO 130 BP 92
IF (J.NE.NCATS) GO TO 160 BP 93
PRINT 5071, CATX BP 94
ERROR=.TRUE. BP 95
130 DO 150 K=1,7 BP 96
N=NUM(K) BP 97
IF (N.EQ.0) GO TO 150 BP 98
IF (N.GT.MXACCT) GO TO 135 BP 99
IF (MEMBRX(N,1).NE.EXS) GO TO 140 BP 100
135 PRINT 5072, CATX, N BP 101
ERROR=.TRUE. BP 102
IF (N.GT.MXACCT) GO TO 150 BP 103
140 IF (LIST(J,N).EQ.0.0) GO TO 145 BP 104
PRINT 5073, CATX, N BP 105
ERROR=.TRUE. BP 106
145 LIST(J,N)=AMT(K) BP 107
150 CONTINUE BP 108
GO TO 170 BP 109
160 CONTINUE BP 110
170 CONTINUE BP 111
CALL ERRCHK (5, &290) BP 112
C * READ ORDER CHANGES BP 113
180 PRINT 5065 BP 114
\F4\C-46-\F2
M=MXPROD*(MXACCT+6)/7 BP 115
DO 250 I=1,M BP 116
READ 5080, CATX, (NUM(J), QUAN(J), QUAN(J+7), J=1,7) BP 117
IF (CATX.EQ.ZEROX) GO TO 260 BP 118
DO 240 J=1,NPRODS BP 119
IF (CATX.EQ.CODEX(J)) GO TO 190 BP 120
IF (J.NE.NPRODS) GO TO 240 BP 121
PRINT 5090, CATX BP 122
ERROR=.TRUE. BP 123
190 DO 230 K=1,7 BP 124
N=NUM(K) BP 125
IF (N.EQ.0) GO TO 230 BP 126
IF (N.GT.MXACCT) GO TO 200 BP 127
IF (MEMBRX(N,1).NE.EXS) GO TO 210 BP 128
200 PRINT 5100, CATX, N BP 129
ERROR=.TRUE. BP 130
GO TO 230 BP 131
210 IF (ORDER(N,J).EQ.QUAN(K)) GO TO 220 BP 132
PRINT 5110, CATX, N BP 133
ERROR=.TRUE. BP 134
220 ORDER(N,J)=QUAN(K+7) BP 135
230 CONTINUE BP 136
GO TO 250 BP 137
240 CONTINUE BP 138
250 CONTINUE BP 139
CALL ERRCHK (6, &290) BP 140
C * READ NOTES TO BE COPIED ONTO BILLING SHEETS BP 141
260 DO 270 I=1,MXNOTE BP 142
READ 5120, (NOTEX(I,J), J=1,8) BP 143
IF (NOTEX(I,1).NE.ZEROSX) GO TO 270 BP 144
NNOTES=I-1 BP 145
GO TO 280 BP 146
270 CONTINUE BP 147
CALL ERRCHK (7, &290) BP 148
NNOTES=MXNOTE BP 149
280 IF (NNOTES.GT.0) NOTES=.TRUE. BP 150
C * STOP IF ERROR(S) DETECTED BP 151
IF (.NOT.ERROR) GO TO 300 BP 152
290 PRINT 5130 BP 153
STOP BP 154
300 PRINT 5140 BP 155
C * COMPUTE SELLING PRICES & PRINT PRICE LIST BP 156
DO 310 I=1,NPRODS BP 157
J=(100.0+FACTOR(I))*PRICE(I)+0.5 BP 158
310 SELL(I)=J/100.0 BP 159
PMAX=(NPRODS-1)/108+1 BP 160
C TO GET 1 OR 2 "WORK" COPIES MAKE THE LAST DIGIT IN THE BP 161
C FOLLOWING STATEMENT 2 OR 3, RESPECTIVELY. BP 162
DO 360 I=1,2 BP 163
LABELX=WORDX(I) BP 164
330 DO 350 P=1,PMAX BP 165
PRINT 5150, DATEX, LABELX, P, PMAX, COOPX BP 166
L1=108*(P-1)+1 BP 167
L2=L1+53 BP 168
DO 350 L=L1,L2 BP 169
IF (L.GT.NPRODS) GO TO 360 BP 170
L3=L+54 BP 171
IF (L3.GT.NPRODS) GO TO 340 BP 172
PRINT 5160, (NAMEX(K,1), NAMEX(K,2), SELL(K), BP 173
\F4\C-47-\F2
2 UNITX(K), PRICE(K), FACTOR(K), K=L,L3,54) BP 174
GO TO 350 BP 175
340 PRINT 5160, NAMEX(L,1), NAMEX(L,2), SELL(L), BP 176
2 UNITX(L), PRICE(L), FACTOR(L) BP 177
350 CONTINUE BP 178
360 CONTINUE BP 179
C * COMPUTE BILLS & STATUS OF ACCOUNTS TOTALS BP 180
DO 370 I=1,MXCAT BP 181
370 PRICE(I)=0.0 BP 182
DO 380 I=1,3 BP 183
380 T1(I)=0.0 BP 184
M=0 BP 185
DO 430 I=1,NACCTS BP 186
TOTAL(I)=0.0 BP 187
K=17 BP 188
DO 390 J=1,NPRODS BP 189
Q=ORDER(I,J) BP 190
IF (Q.EQ.0) GO TO 390 BP 191
K=K+1 BP 192
IF (SELL(J).LT.0.0001) GO TO 390 BP 193
N=100.0*Q*SELL(J)+0.5 BP 194
COST(I,J)=N BP 195
TOTAL(I)=TOTAL(I)+N BP 196
390 CONTINUE BP 197
TOTAL(I)=TOTAL(I)/100.0 BP 198
LINES(I)=K BP 199
IF (NOCATS) GO TO 405 BP 200
CST=BALNCE(I) BP 201
DO 400 J=1,NCATS BP 202
400 CST=CST+SIGN(J)*LIST(J,I) BP 203
NEW(I)=CST-TOTAL(I) BP 204
T1(1)=T1(1)+NEW(I) BP 205
T1(2)=T1(2)+BALNCE(I) BP 206
CUMM(I)=CUMM(I)+TOTAL(I) BP 207
405 T1(3)=T1(3)+TOTAL(I) BP 208
IF (TOTAL(I).NE.0.0) M=M+1 BP 209
IF (NOCATS) GO TO 430 BP 210
IF (NEW(I).LT.DLIM) GO TO 410 BP 211
MCNT(I)=0 BP 212
GO TO 420 BP 213
410 MCNT(I)=MCNT(I)+1 BP 214
420 DO 425 K=1,NCATS BP 215
425 PRICE(K)=PRICE(K)+LIST(K,I) BP 216
C * PRINT STATUS OF ACCOUNTS BP 217
430 K=NACCTS+4 BP 218
IF (.NOT.NOCATS) K=K+(NCATS+3)/4+1 BP 219
L4=NACCTS+2 BP 220
L5=NACCTS+6 BP 221
PMAX=K/54+1 BP 222
C LAST DIGIT OF NEXT STATEMENT SETS NO. OF COPIES; MUST BE > 0. BP 223
DO 490 I=1,2 BP 224
N=1 BP 225
DO 490 P=1,PMAX BP 226
PRINT 5170, DATEX, P, PMAX, COOPX BP 227
IF (.NOT.NOCATS) PRINT 5175, (CATCDX(J), J=1,NCATS) BP 228
PRINT 5180 BP 229
L1=54*(P-1)+1 BP 230
L2=L1+53 BP 231
L3=P*54 BP 232
\F4\C-48-\F2
DO 455 L=L1,L2 BP 233
IF (L.GT.NACCTS) GO TO 460 BP 234
IF (.NOT.NOCATS) GO TO 435 BP 235
PRINT 5185, L,MEMBRX(L,1),MEMBRX(L,2),TOTAL(L) BP 236
GO TO 455 BP 237
435 IF (MCNT(L).LT.NLIM) GO TO 440 BP 238
N1=MCNT(L) BP 239
IF (N1.EQ.0) GO TO 440 BP 240
IF (N1.GT.10) N1=10 BP 241
FLAGX=DIGITX(N1) BP 242
GO TO 450 BP 243
440 FLAGX=BLANKX BP 244
450 PRINT 5190, L, FLAGX, MEMBRX(L,1), MEMBRX(L,2), BP 245
2 NEW(L), BALNCE(L), TOTAL(L), BP 246
3 CUMM(L), (LIST(K,L), K=1,NCATS) BP 247
455 CONTINUE BP 248
GO TO 490 BP 249
460 IF (L4.GT.L3) GO TO 490 BP 250
IF (N.GT.1) GO TO 470 BP 251
N=N+1 BP 252
IF (.NOT.NOCATS) GO TO 465 BP 253
PRINT 5200, M, T1 BP 254
GO TO 470 BP 255
465 PRINT 5200, M, T1, (PRICE(K), K=1,NCATS) BP 256
470 IF (NOCATS) GO TO 490 BP 257
IF (L5.GT.L3) GO TO 490 BP 258
IF (N.GT.2) GO TO 480 BP 259
N=N+1 BP 260
PRINT 5210, DLIM, NLIM BP 261
480 IF (NACCTS+(NCATS+3)/4+6.GT.L3) GO TO 490 BP 262
PRINT 5220, (CATCDX(J), SIGNX(J), BP 263
2 (CTGRYX(J,K), K=1,5), J=1,NCATS) BP 264
490 CONTINUE BP 265
C * PRINT BILLING SHEETS BP 266
DO 560 I=1,NACCTS BP 267
IF (MEMBRX(I,1).EQ.EXS) GO TO 560 BP 268
IF (TOTAL(I).EQ.0.0 .AND. BALNCE(I).EQ.NEW(I)) GO TO 560 BP 269
PRINT 5230, PREFIX, I, MEMBRX(I,1), MEMBRX(I,2), BP 270
2 (INFOX(I,J), J=1,5), COOPX BP 271
IF (LINES(I).LT.18) GO TO 520 BP 272
IF (NOCATS) PRINT 5235, DATEX BP 273
PRINT 5240 BP 274
DO 510 J=1,NPRODS BP 275
IF (ORDER(I,J).EQ.0) GO TO 510 BP 276
IF (SELL(J).GT.0.0001) GO TO 500 BP 277
IF (SELL(J).GT.-0.0001) GO TO 495 BP 278
PRINT 5245, NAMEX(J,1), NAMEX(J,2), BP 279
2 ORDER(I,J), UNITX(J) BP 280
GO TO 510 BP 281
495 PRINT 5250, NAMEX(J,1), NAMEX(J,2), BP 282
2 ORDER(I,J), UNITX(J) BP 283
GO TO 510 BP 284
500 CST=COST(I,J)/100.0 BP 285
PRINT 5260, NAMEX(J,1), NAMEX(J,2), ORDER(I,J), BP 286
2 UNITX(J), SELL(J), CST BP 287
510 CONTINUE BP 288
PRINT 5270, TOTAL(I) BP 289
520 IF (NOCATS) GO TO 545 BP 290
PRINT 5280, DATEX BP 291
\F4\C-49-\F2
PRINT 5290, BALNCE(I) BP 292
DO 540 J=1,NCATS BP 293
IF (LIST(J,I).EQ.0.0) GO TO 540 BP 294
IF (SIGN(J).LT.0.0) GO TO 530 BP 295
PRINT 5300, (CTGRYX(J,K), K=1,5), LIST(J,I) BP 296
GO TO 540 BP 297
530 PRINT 5310, (CTGRYX(J,K), K=1,5), LIST(J,I) BP 298
540 CONTINUE BP 299
PRINT 5320, TOTAL(I), NEW(I) BP 300
545 IF (.NOT.NOTES) GO TO 560 BP 301
PRINT 5330 BP 302
DO 550 J=1,NNOTES BP 303
550 PRINT 5340, (NOTEX(J,K), K=1,8) BP 304
560 CONTINUE BP 305
C * PUNCH NEW MEMBERSHIP FILE CARDS BP 306
PRINT 5350 BP 307
IF (NOCATS) STOP BP 308
DO 570 I=1,NACCTS BP 309
570 PUNCH 5030, PREFIX, I, MEMBRX(I,1), MEMBRX(I,2), BP 310
2 (INFOX(I,J), J=1,5), NEW(I), MCNT(I), CUMM(I) BP 311
STOP BP 312
5000 FORMAT (A3, 7A8, A5, F5.1, F7.2, I2, L2/) BP 313
5010 FORMAT ('0'/'0', 9X, 'ERROR MESSAGES FOR BILLING RUN FOR ', BP 314
2 8A8/'0') BP 315
5020 FORMAT (A2, 1X, A1, 1X, 5A4) BP 316
5030 FORMAT (A3, I3, 1X, 7A8, F7.2, I2, F8.2) BP 317
5040 FORMAT (A2, 1X, 2A8, 1X, A6, 2X, F5.1, F6.3) BP 318
5050 FORMAT (A8/) BP 319
5060 FORMAT (I3, 1X, 19(A2, I2)) BP 320
5065 FORMAT ('0') BP 321
5070 FORMAT (A2, 1X, 7(I3, 1X, F6.5)) BP 322
5071 FORMAT ('0', 25X, 'ACCOUNTING LIST CODE "', A2, BP 323
2 '" WAS USED - THIS CODE WAS NOT DEFINED') BP 324
5072 FORMAT ('0', 25X, 'ACCOUNTING LIST "', A2, '" CONTAINS ', BP 325
2 'ACCOUNT #', I3, ' WHICH IS INACTIVE') BP 326
5073 FORMAT ('0', 25X, 'ACCOUNTING LIST "', A2, '" CONTAINS ', BP 327
2 'ACCOUNT #', I3, ' MORE THAN ONCE') BP 328
5080 FORMAT (A2, 7(I4, 2(1X, I2))) BP 329
5090 FORMAT ('0', 25X, 'AN ORDER CHANGE WAS SUBMITTED FOR ', BP 330
2 'PRODUCT "', A2, '" WHICH IS NOT DEFINED') BP 331
5100 FORMAT ('0', 25X, 'AN ORDER CHANGE FOR PRODUCT "', A2, '" WAS' BP 332
2 , ' ENTERED FOR ACCOUNT #', I3, ' WHICH IS INACTIVE') BP 333
5110 FORMAT ('0', 25X, 'THE ORDER CHANGE FOR PRODUCT "', A2, BP 334
2 '" FOR ACCOUNT #', I3, ' DOES NOT AGREE WITH ', BP 335
3 'THE ORIGINAL ORDER') BP 336
5120 FORMAT (8A8) BP 337
5130 FORMAT ('0'/'0'/10X, 'END OF ERROR LIST -- PROGRAM IS ', BP 338
2 'STOPPING -- CORRECT DATA AND RE-RUN'/'1') BP 339
5140 FORMAT (10X, 'NO ERRORS WERE DETECTED') BP 340
5150 FORMAT ('1'/' PRICE LIST FOR ', A8, 8X, '(', A4, BP 341
2 ' COPY, PAGE', I2, ' OF', I2, ')', 8X, 8A8//'0', BP 342
3 2(6X, 'ITEM', 13X, 'SELL AT UNIT COST', BP 343
4 ' MARKUP (%)', 5X)/) BP 344
5160 FORMAT (2(7X, 2A8, F7.2, 5X, A6, F9.3, F9.1, 7X)) BP 345
5170 FORMAT ('1'/' STATUS OF ACCOUNTS AS OF ', A8, ' (PAGE', BP 346
2 I2, ' OF', I2, ')', 5X, 8A8//'0ACCT NAME', 11X, BP 347
3 'NEW-BAL OLD-BAL ORDER CUMUL') BP 348
5175 FORMAT ('+', 51X, 10(5X, A2, 1X)) BP 349
5180 FORMAT (' ') BP 350
\F4\C-50-\F2
5185 FORMAT (1X, I3, 3X, A8, A5, 16X, F8.2) BP 351
5190 FORMAT (1X, I3, 1X, A1, 1X, A8, A5, 14F8.2) BP 352
5200 FORMAT ('0TOTALS (', I3, ' ORDERS)', 3F8.2, 8X, 10F8.2) BP 353
5210 FORMAT (/'0NOTES: 1 - DIGIT AFTER ACCT. NO. IS NUMBER OF ', BP 354
2 'CONSECUTIVE TIMES BALANCE HAS BEEN BELOW $', F6.2, BP 355
3 '.'/13X, 'DIGITS LESS THAN', I2, ' ARE NOT PRINTED.', BP 356
4 ' "#" IS PRINTED IF DIGIT WOULD BE GREATER THAN 9.') BP 357
5220 FORMAT ('0', 8X, '2 - COLUMN CODES:', T26, 4(2X, A2, 1X, A1, BP 358
2 1X, 5A4), 2(/25X, 4(2X, A2, 1X, A1, 1X, 5A4))) BP 359
5230 FORMAT ('1', A3, I3, ': ', 7A8/'0', 3X, 8A8/) BP 360
5235 FORMAT ('0', 5X, 'ORDER FOR ', A8, ':') BP 361
5240 FORMAT ('0',10X,'ITEM',16X,'QUANTITY UNIT PRICE TOTAL'/) BP 362
5245 FORMAT (11X, 2A8, I5, 2X, A6, 2X, 'NO LONGER AVAILABLE') BP 363
5250 FORMAT (11X, 2A8, I5, 2X, A6, 2X, 'NOT BOUGHT') BP 364
5260 FORMAT (11X, 2A8, I5, 2X, A6, F9.2, F11.2) BP 365
5270 FORMAT ('0', 10X, 'TOTAL OF ORDER', 25X, F10.2) BP 366
5280 FORMAT ('0'/'0', 10X, 'STATEMENT OF ACCOUNT FOR PERIOD ', BP 367
2 'ENDING ',A8/'0',32X,'CHARGES CREDITS BALANCE'/) BP 368
5290 FORMAT (11X, 'OLD BALANCE', 27X, F10.2) BP 369
5300 FORMAT (11X, 5A4, F18.2) BP 370
5310 FORMAT (11X, 5A4, F8.2) BP 371
5320 FORMAT (11X, 'TODAY''S ORDER', F15.2/'0', BP 372
2 10X, 'NEW BALANCE', 27X, F10.2) BP 373
5330 FORMAT ('0'/'0') BP 374
5340 FORMAT (1X, 8A8) BP 375
5350 FORMAT ('1') BP 376
END BP 377
SUBROUTINE ERRCHK (I, *) BP 378
REAL A, WORDS(3,7), ZEROX BP 379
DATA WORDS/'LIST', ' HEA', 'DING', ' MEM', 'BERS', 'HIP ', BP 380
2 ' P', 'RODU', 'CT ', ' ', 'ORDE', 'R ', BP 381
3 'ACCT', 'ING ', 'LIST', 'ORDE', 'R CH', 'ANGE', BP 382
4 ' ', 'NOTE', ' '/, ZEROX/'00'/ BP 383
READ 5000, A BP 384
IF (A.EQ.ZEROX) RETURN BP 385
PRINT 5010, (WORDS(J,I), J=1,3) BP 386
RETURN 1 BP 387
5000 FORMAT (A2) BP 388
5010 FORMAT ('0'/'0', 25X, 'TOO MANY ', 3A4, ' CARDS IN THE DATA') BP 389
END BP 390
\F4\C-51-\F2