MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Manufacturing Engineering > Programs > Copy Routing - Asynchronous - Purpose > Copy Routing - Asynchronous - Calculations

Copy Routing - Asynchronous - Calculations

ME130E

A.   Housekeeping

1.   See Section 2.1 (Common Processing Routines - Housekeeping) for a general discussion of this subroutine.  Processing specific to this program is described below.

2.   The company name (COMNAM) is obtained from the System Control file (CT100M). 

3.   The Applications Installed (category 012), the Date Format (category 049), and the Quantity Field Sizes (category 446) are retrieved from the Reference file.

4.   The Part Number and the Plant for which the routing is to be built and the workstation where the transaction was initiated are passed as parameters to this program.

B.   Mainline

1.   The program reads the Asynchronous Transaction file (ME120DP), using the Part Number and Plant (passed by the calling program) for which the routing is to be built.

2.   The Part Master file (DE100M) is read for update to validate the part and to prevent its deletion while routing records are being copied.  It must be an active, manufacturing part. 

3.   The Routing file (ME120M) is read to ensure that no routing records already exist for the part/plant.

4.   A read is attempted on the first routing record of the "copied from" part.  If no routing records exist for this part, an error message is sent to the workstation's message queue, and processing for the transaction ends.

5.   If the from/to parts have a different production type (MRP/JIT), the copy routing is not performed, and an error message is formatted.

6.   For each routing record relating to the "copied from" part:

a.   The Effectivity Date of the routing is compared to the "to-be-copied Effectivity Date" specified in the copy routing transaction, which was entered in the Routing File Maintenance program (ME120E).

b.   If effective, the Parent Part Number for the routing is changed to the "create" Part Number; if required, the Effectivity Dates are modified according to the "create date" specified in the copy routing transaction. If a "create" Effectivity Date has been specified, the created routing's Effectivity In-Date is set to the specified date and the Effectivity Out-Date is blanked out.  If no "create" Effectivity Date has been specified and if the specified "copied" date is ALL, the created routing's Effectivity Dates are set to the same dates as those of the copied routing.

c.   The new routing record is written to the Routing file (ME120MO), and a record is written to the ME Maintenance Audit Trail (ME120BP1).

7.   The routing flag (OLFLG4), the cost activity flag (OLFLG0), and, if Capacity Planning is installed, the labor requirements reschedule flag, are updated on the Part Master Record.

8.   A record is written to the ME Transaction Register (ME120CP3).

9.   If any errors occurred during processing, a record is written to the ME Transaction Register Error file (ME515AP).

10.  The transaction is deleted from the Asynchronous Transaction file (ME120DP) when it has been processed.

11.  The parameter list is used to send a reply to the calling program (ME130CLP), indicating the completion of the transaction.

12.  The calling program then sends a message to the workstation's message queue, stating whether the transaction was processed successfully.

ME130E Program Menu