MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Master Scheduling > Programs > Tentative Master Schedule Maintenance - Asynchronous - Purpose > Tentative Master Schedule Maintenance - Asynchronous - Calculations

Tentative Master Schedule Maintenance - Asynchronous - Calculations

MS165E

A.   Housekeeping

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

2.   A parameter list is set up to receive parameters passed from another program.

3.   Key lists are defined for each keyed file the program retrieves.

4.   Work fields are defined and program constants are initialized.

5.   The date format (category 049) is retrieved from the Reference file (REFERP).  If this record is not found, the date format defaults to MMDDYY, a message is sent to the system operator, and processing continued.

6.   The system date is retrieved and formatted for printing on reports.

7.   The Week Start Date file (CT140ML1) is accessed to retrieve the next date that begins a week after the last date is the transaction file.

8.   Pointers are positioned.  The first changed record of the Master Schedule Maintenance Transaction file (MS160AP) is retrieved and saved.  The second one is read.  The Tentative Master Schedule file (MS160M) is positioned so that the first record read has the same plant, part number and a date equal to or greater than that of the first transaction record.  A flag (PTFND) is set indicating whether or not such a record has been found.

9.   The current part number record is retrieved from the Part Master file (DE100M).  The Master Schedule Generation Bypass Flag field is checked against the Master Schedule parameter passed to the program.  If the values are different, the Part Master file (DE100M) is updated.

B.   Mainline

1.   The transaction file is read sequentially until date of last modification.  Each transaction record is compared to the master file; if the master file does not match the transaction file, the master file record is updated, added or deleted.

2.   The flag initialized in housekeeping indicates whether or not records must be inserted.  New records would be inserted for a new schedule for a part number not previously present in the Tentative Master Schedule file (MS160M) or for an additional schedule at the end of a previously existing schedule for a part number.

3.   The transaction record date is always a week start date indicating the beginning of the period to which the transaction record data refers.

4.   If a Tentative Master Schedule File (MS160M) record exists matching the date of the transaction record currently being processed, the master record is updated.  Otherwise, new master records are inserted.  Additional master records for the period being considered are deleted.

5.   The update of the Tentative Master Schedule file (MS160M) stops when the locking record for the current part number is found in the Master Schedule Maintenance Transaction file (MS160AP) or when the end of this file is reached.

6.   Every time an input/output operation to the master file is performed, records containing transaction data are written to both the Master Schedule Maintenance Audit Trail file (MS495AL) and Master Schedule Transaction Register file (MS505AL).  The transaction codes used are:

Transaction Code

Description

K20

Write Master Record

K25

Update Master Record

K30

Delete Master Record

C.   Windup

1.   The transaction records corresponding to the processed part number are deleted  from the Master Schedule Maintenance Transaction file (MS160AP), including the locking record.

2.   A message is sent to the user's workstation message queue indicating the successful completion of the Master Schedule maintenance for the corresponding part number.

MS165E Program Menu