|
Program
Overview
This
program is used to validate a text file that contains a series of
variable length transaction records. The transaction file to be
validated must have been produced by the data entry program (494792P0).
The validation process is different for each type of transaction,
only the following types of transaction are acceptable and deemed
valid -
I
Issue -
Stock issued.
R
Receipt - Stock received.
C
Creation - Create a new customer record.
D
Deletion - Delete an existing customer record.
A
Amend - Amend an existing stock record.
N
New - Create a new stock record.
Z
Zap - Delete an existing stock
record.
All
invalid transactions are reported on the printer under suitable
headings, with an appropriate error code. All error codes are defined
on the last page of the printout. All valid customer transactions
[I R C D] are written to the disk file named 494792VF.DAT for further
processing by the Sorting program (in text format). All valid stock
transactions [A N Z] are written to the disk file named 494792SF.DAT
for further processing by the Stock Update program (in text format).
This is unless the user changes the default file names by entering
additional program parameters at the command line.
The
text file which contains the transaction records must be named 494792TD.DAT,
and be located in the same directory from where the validation program
is located and executed from. This file is created by the Data Entry
program (494792P0.exe). This is unless the user changes this default
file name by entering additional program parameters at the command
line. Below describes how the default file names may be overridden:
-
494792P1.exe <transaction file> <customer validated file>
<stock validated file> <printer>
The
default file names are as follows: -
Transaction file
- 494792TD.DAT
Customer Validation
file - 494792VF.DAT
Stock Validation
file - 494792SF.DAT
Printer - PRN
If
the user wishes to override one of these files they must also enter
the file names of all the files preceding it. For example to override
the printer to a text file named test.txt, they must enter the following
command: -
494792P1.exe 494792TD.DAT 494792VF.DAT 494792SF.DAT
test.txt
However
if the user only wishes to change the name of the file which contains
the transactions to validate, they may enter the following command:
-
494792P1.exe TRANS.DAT
The
overriding of the default file names is mainly for test purposes
or where there is a need to do so. Such a need may arise when there
is a need to reproduce a validation file from an old transaction
file. The everyday users of this program need not even have to be
aware of this overriding feature.
Valid Transaction Types
A valid
Issue transaction must be comprised of the following -
Record Type -
Must be 'I'
Customer Code
- Must be 4 Digits, with an alphanumeric Modulus 11 check digit
(weighting factor of 5432) appended to it (i.e. 10006)
Part Number -
Must be 5 Digits, with an alphanumeric Modulus 11 check digit (weighting
factor of 65432) appended to it (i.e. 010006)
Issue Quantity
- A numeric value
A valid Receipt transaction must be comprised of the following -
Record Type -
Must be 'R'
Customer Code
- Must be 4 Digits, with an alphanumeric Modulus 11 check digit
(weighting factor of 5432) appended to it (i.e. 10006)
Part Number -
Must be 5 Digits, with an alphanumeric Modulus 11 check digit (weighting
factor of 65432) appended to it (i.e. 010006)
Receipt Quantity
- A numeric value
A valid
Customer Deletion transaction must be comprised of the following
-
Record Type -
Must be 'D'
Customer Code
- Must be 4 Digits, with an alphanumeric Modulus 11 check digit
(weighting factor of 5432) appended to it (i.e. 10006).
A valid
Customer Creation transaction must be comprised of the following
-
Record Type -
Must be 'C'
Customer Code
- Must be 4 Digits, with an alphanumeric Modulus 11 check digit
(weighting factor of 5432) appended to it (i.e. 10006)
Customer Name
- Maximum of 20 characters in length, and NOT BLANK
Customer Address
- 4 address parts each separated by a ';', maximum of 60 characters
Customer Balance
- 9 numeric characters, which represent the following format 9(7)v99
Credit limit
- 7 numeric characters, which represent the following format 9(7)
A valid
Stock Amendment transaction must be comprised of the following -
Record Type -
Must be 'A'
Part Number -
Must be 5 Digits, with an alphanumeric Modulus 11 check digit (weighting
factor of 65432) appended to it (i.e. 010006)
Part Description
- Must be no more than 19 characters in length
Supplier Code
- A numeric value [00 - 99]
Free Stock -
A numeric value [000000 - 999999]
Minimum Stock
Level - A numeric value [0000 - 9999]
Last Movement
Date - In the format YYMMDD
Selling Price
- A numeric value [0000.00 - 9999.99]
A valid
Stock Deletion transaction must be comprised of the following -
Record Type -
Must be 'Z'
Part Number -
Must be 5 Digits, with an alphanumeric Modulus 11 check digit (weighting
factor of 65432) appended to it (i.e. 010006)
A valid
Stock Creation transaction must be comprised of the following -
Record Type -
Must be 'N'
Part Number -
Must be 5 Digits, with an alphanumeric Modulus 11 check digit (weighting
factor of 65432) appended to it (i.e. 010006)
Part Description
- Must be no more than 19 characters in length
Supplier Code
- A numeric value [00 - 99]
Free Stock -
A numeric value [000000 - 999999]
Minimum Stock
Level - A numeric value [0000 - 9999]
Selling Price
- A numeric value [0000.00 - 9999.99]
The following errors are detected and handled by the validation
program: -
A
= Missing customer code.
B = Non numeric customer code, only the check digit may be
alphanumeric.
C = Incorrect customer code check digit, not modulus 11 of
customer code.
D = Missing part number.
E = Non numeric part number, only the check digit may be
alphanumeric.
F = Incorrect part number check digit, not modulus 11 of
part number.
G = Customers address missing, there must be an address entered.
H = Customer name missing, there must be a name entered.
I = Missing part description.
J = There was too much information given for the type of
transaction.
Back
Home
|