MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Purchasing > Programs > Vendor Schedule - Purpose > Vendor Schedule - Calculations

Vendor Schedule - Calculations

PO620E

A.   Housekeeping

1.   See Common Processing Routines - Housekeeping for a general discussion of this subroutine.  Processing specific to this program is discussed below.

2.   All work fields are defined and program constants are initialized.

3.   The following categories are retrieved from the Reference file (REFERP).

a.   CPF file access status codes - category 015.  If this record is not found, the program terminates.

b.   Date format - category 049.  If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.

c.   System defaults - category 133.  If the address format is set to the free-form format, then the report 620A will display the address in free-form format rather than U.S. format.  If the record is not found, the program aborts.

4.   The Company name is retrieved from the company name record (COMNAM) of the System Control file (CT100M).  If this record is not found on the System Control file (CT100M), a blank company name is used.

B.   Mainline

1.   The transaction record is retrieved from the Vendor Schedule Report Request file (PO320AP).  Processing ends if no transaction is found.

2.   Daily delivery dates, week begin dates, and month begin dates for the plant are loaded into their corresponding arrays and are formatted for display on the report.

3.   Vendor information is retrieved from Vendor Master file (APMASTP).  If record is not found, a message is printed and processing continues.

4.   The Vendor Master file (APMASTP) is positioned at the beginning of the file for a request to print all vendor schedules.  For a specific request, the vendor record for the specified vendor is retrieved.

5.   If no errors have occurred, the request is processed.

C.   Process the report

1.   Part numbers are retrieved from the Item/Vendor Relation file (PO140ML5).  If no records are found, a message is printed and processing ends.

2.   Purchase orders and requisition quantities are retrieved for each part with the following conditions:

a.   Purchase Order Release due date must be within the period requested (daily, weekly, or monthly).  Only open Purchase Orders are retrieved.

b.   Purchase order record must belong to the vendor requested.  Received Quantities are subtracted from the calculation of the total quantity of Purchase Order.

c.   Requisition due date must be within the period requested (daily, weekly, or monthly).  Closed or canceled requisitions are not retrieved.

d.   Requisition quantity is calculated by using the percentage on the Item/Vendor Relationship file (PO140ML5).  If this record is not found or the part percentage does not exist for the vendor, percentage of zero is used and processing continues.

e.   The detail line is printed.

3.   Steps 2a-2e are repeated until all parts for a specific vendor have been processed.

4.   If the request is to print all vendor schedules, the next vendor master record is retrieved from the Vendor Master file (APMASTP).

5.   The next record is retrieved from the Vendor Schedule Report Request file (PO320AP).  If no more records exist, the program terminates.

PO620E Program Menu