MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Just-in-Time > Programs > Production Schedule Maintenance - Purpose > Production Schedule Maintenance - Calculations

Production Schedule Maintenance - Calculations

JT100E

A.   Housekeeping

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

2.   Parameter lists and key lists needed by the program are defined.  Work fields and constants are defined and initialized.

3.   The following information is retrieved from the Reference file (REFERP).

a.   Reference File category 012 is read to determine modules installed.

b.   The operating system's file status code (category 015) is retrieved in order to retrieve and format all CPF status codes for input/output processing.

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

d.   The quantity field size is retrieved from category 446.  The quantity field sizes record is retrieved to determine the number of decimal positions for order quantity fields.  If this record is not found the program terminates.

e.   Reference File category 409 is read to determine which plants the user is authorized to.

f.    Reference File category 428 is read for the default plant.

g.   The Order Starting Numbers (category C09) is used to retrieve the next available flow authorization number.  If this record is not found, the program aborts.

B.   Mainline

1.   On the Daily/Weekly Production Schedule Maintenance Function Select screen (JT100S01) all input fields are validated.  (See the Just-in-Time User Manual for validation rules.)  If an error occurs, an appropriate error message is displayed and the field in error is displayed in reverse image.  If no errors have occurred on the select screen, a work file control record is written for each part that will be loaded into the detail screen subfile.

If the user selects the Parts With Demand field by typing an X in this position.  Each part having the entered production center as its main production center, that have one or more sources of demand (component requirement, sales order, transfer order or requisition, or offset release) in the selected period, will be loaded into the work file. 

If the user selects the All Relationships field, each part having a relationship with the entered production center, will be loaded into the work file. 

If neither of these options is chosen, then only those parts that have scheduled production in the specified production center will be loaded into the work file. 

To facilitate the ability to schedule parts in multiple production centers, the Part Addition field may be entered on the select screen.  If the part that is entered in this field is valid (see the Just-in-Time User Manual for validation rules), then this part is also added to the control work file.  This part will be displayed at the top of the detail subfile. 

As each part is written to the control work file, the work file is first checked to be sure that a record does not already exist for the part and production center.

If a record exists, the action is taken as follows (see legend at bottom of the array):

 

WKMODE

 

Blank

Blank

Blank

OLU

OLU

OLU

OLU

OLU

ASU

Work file record
to recover
Field Values-

Work file record owner

C

A

Cd

I

A

Cd

Cd

I

I

 

 

WKDENT (selection date)

 

 

 

 

 

Today

Today

Today

Today

 

 

Meaning

S

M

AbM

AbM

U

AbU

AbU

AbU

AbU

U

Action Taken

 

N

N

CS

CS

N

CS

Rcy

CS

Rcy

N


LEGEND

WKMODE:  This field permits to know by what program the record is used, and what step the record is used for.

Blank:                                                   record being maintained on screen.

OLU (WKMODE = DO1/WO1/OL2):        record used for online maintenance (F22).

ASU (WKMODE = DA1/WA1/AS2):        record used for off-line maintenance (F23).

The WKMODE field is set to blank when the user is maintaining the schedule at the screen.  When an Update Command Key is used (F22 or F23), the WKMODE field is changed to:

 


Program


Frequency

Online
Update (F22)

Off-Line
Update (F23)

JT100E

Daily

DO1

DA1

JT110E

Weekly

WO1

WA1

 

(Daily)

OL2

AS2

Work file record owner (fields WKWSID, WKUSER, WKJNUM, WKDENT, WKTENT) identifies when and by who the record has been created. 

The work file record has been created by:

A:   a job that is active, not the current job.

Cd: the current job (active), but at a different selection time.

C:   the current job selection time.

I:    a job that is now inactive.
 

Meaning explains the meaning of the combination of the three parameters (WKMODE, work file record owner, WKDENT) explained above.

The work file record is from a job that:

M:  The record is used in a screen maintenance by another person or by yourself on another screen/session. 

AbM:       The screen maintenance ended abnormally (ENDRQS or power-off) while the user was maintaining the production schedule at screen without using any Update Command Key (F22 of F23).

U:   The record is considered as being normally updated (online or off-line).  However, the online or off-line update may have terminated abnormally.

AbU:        The online update of the record terminated abnormally.

S:   The current selection step has already selected this part (may happen when the part is entered in the Part Addition field, and has a schedule in the processed production center, etc.).

Action taken:

CS: All the records of the job that has written the part are deleted (part included) and the part is selected/written into the work file. 

N:   The part is not selected/written to the work file.

Rcy:        If the record has been created by the Part Prod Sched Maintenance program (JT110E), the part is not selected but a "Part may be recovered by Part Sched Maint" message is sent to the workstation.  Otherwise, all the parts that have been selected in the current step are removed.  The select screen is displayed with F14=Recovery Command key.

Note:       The off-line updates may be recovered only by the JIT Online Recovery program (JT900E).

If the F14=Online Recovery Command Key is enabled, and the user enters this key, the date entered in the abnormally ended online update is recovered.  The same processing than F22 is done. Synchronization is not processed.  Then, the user may maintain the production schedule for the production center.

2.   In the plant validation subroutine, the plant entered by the user is validated to see that it is on the Warehouse Description file (IC170ML2) and that it is not equal to all nines or blanks.  Invalid plants cause warning messages to alert the user.  Once a valid plant to which the user is authorized is obtained, the calendar code and manufacturing company/warehouse are saved for other I/O functions.  The following information is retrieved from the Reference file:

a)   The Planned Activity flag for the plant is retrieved from Reference File category D84.  If the record is not found, the flag defaults to Y.

b)   The last date on the calendar file associated with the plant's calendar code is retrieved from Reference File category C14.  If the record is not found the program terminates.

c)   The flow interval information (category C05) associated with the plant's calendar code is used to determine the type of flow interval (weeks, months, or user-defined periods).  All flow interval start dates are loaded into the flow interval array (FIA).  If this is not found, the program terminates.

d)   The calendar date array (ACAL) and the shop date array (ASHP) are loaded from the calendar file (CT140M) with the date records associated with the plant's calendar code.  The week begin date array (WBDA) is also loaded from the Calendar file (CT140M) for the plant's calendar code.

3.   Once the data on the select screen are validated, the Production Center Maintenance Detail Screen (JT100S02) is formatted.

a.   Each part selected in the work file is loaded into the subfile. 

-     If a part addition has been entered, it is first written to the top of the subfile.

-     If an initial family has been entered, the work file is read for this family sorted by part number, and the parts are written to the subfile.  Then the whole work file is read, and the parts that are not yet displayed, are written to the subfile. 

      Each time a part is written to the subfile, an access to the part master file and the part/production center relationship file is made to retrieve all information needed to format the screen.  This information is then saved into hidden fields in the subfile.  Moreover, the over/under production quantity (and the over/under availability if availability calculation has been selected), is calculated and saved into the subfile.  The screen start date (YSCSDT) is formatted with the start date entered in the select screen. 

b.   The screen end date (YSCEDT) is calculated from the screen start date.  In weekly mode, the screen end date equals to the last day of the last week displayed on the screen.  Then, the daily/weekly date buckets are calculated and formatted for display on the detail screen.  The date array (DTA) is also loaded with these dates.  In weekly mode, each of five occurrences of the WDD array is filled with the days of the corresponding displayed week.  It will be used to load the production days of the corresponding displayed week.  It will be used to load the production quantities into the work file.  The number of days is also calculated to be used for the calculation of the percentage of capacity. 

c.   The F5-Previous Command Key is disabled if it is the first maintenance screen. The F6-Next Command Key is disabled if it is the last maintenance screen. 

d.   Availability quantities are calculated for daily or weekly buckets if the Calculate Availability field from the select screen equals Y.  For the method of calculation of the availability, see the Key Concepts section of the User Manual for the key concept Availability and Demand Calculations.  The daily or weekly availability variation is saved into the availability array (ADA).  The availability quantities for all parts may be viewed by pressing F12-Fold/Truncate on the detail screen.

e.   All firmed or planned flow authorizations from the Flow Authorization file (JT100ML1) that fall within the schedule period for a part in the production center are used to extract the daily or weekly production quantities.  The production quantities are then added to the actual supply array (ASA).  In weekly mode, if there are more than five days a week, the production quantities of the sixth or/and seventh day are cumulated to the fifth day's production quantity. 

f.    A part's production and availability quantities are written to the work file (JT100AP).  First time, the part's work file control record is deleted. 

g.   Once all parts in a production center have been processed, total daily or weekly loads are calculated and formatted as follows:

Part's Daily/Weekly Load = Daily/Weekly Production Quantity x Run Units

Total load is the accumulation of daily/weekly load for each part produced at the production center.

The past total load that is displayed in the over/under bucket is calculated as follows: 

Part's Past Load = Past Due Production x Run Units

So, if the part is ahead of schedule, it cannot generate past load.  Total past load is the accumulation of past load for each part produced at the production center. 

h.   The percentage of the production center capacity is calculated as follows: 

In daily mode, Percentage of Capacity = Total Load/Capacity of the Production Center x 100

In weekly mode, Percentage of Capacity = Total Load/Capacity of the Production Center/number of days in the week x 100

The past Percentage of Capacity that is displayed in the over/under bucket is calculated as follows:

Percentage of Capacity = Total Past Load/Production Center Capacity x 100

4.   After display of the detail screen (JT100S02), user input is validated.  For all parts, the user may maintain all production scheduled for today's date and after.  The user may also scroll both horizontally and vertically. 

      User-maintained production quantities are validated and reformatted for display on the detail screen.  Once the new totals have been obtained, the total load and percentage of capacity is recalculated as before.  If the availability calculation has been requested on the select screen, the availability quantities are recalculated.

5.   If the production quantities are valid, the work file (JT100AP) is updated with the changed production quantities.  The Weekly Production Schedule Maintenance conversation will schedule the entire amount of changed or new production for a part on the first day of the weekly bucket.

6.   Command keys on the detail screen (JT100S02) available to the user include F2 (Command) F3 (Exit), F4 (Function Select), F5 (Previous Screen), F6 (Next Screen), F9 (Enter Inquiry), F10 (Display Function Select), F11 (Time Phased Part Availability), F15 (Rekey Data), F16 (Synchronize Flow), F22 (Online Update), F23 (ASYNC Update), and F24 (More Command Keys).

F5 - Previous Screen shifts left in order to maintain production in the previous schedule period.  When this command key is pressed, the following occurs:

The screen number is decremented.  The screen start date is calculated.  Then, the Format Status (FMTSTS) is set to 'BLD' to format the new screen.  Return to section 3b for screen formatting explanations.

F6 - Next Screen shifts right in order to maintain production in the next schedule period.  The following processing is performed:

The screen number is incremented.  The screen start date is calculated.  Then, the Format Status (FMTSTS) is set to 'BLD' to format the new screen.  Return to section 3b for screen formatting explanations. 

F16 - Synchronize Flow closes all flow authorizations and their associated flow requirements for all parts in the production center that have past due production.  The synchronization is not allowed if the start date entered on the select screen is greater than today's date.  When the command key is pressed, the over/under bucket for all parts in the subfile is set to zero, but the FAs and FRs are not actually closed until an update command key is pressed (F22 or F23).  If the availability calculation is requested on the select screen, it is recalculated for those parts that had a past due production.  The total past load and past percentage of capacity are also recalculated.  Pending synchronization may be canceled before an update key is pressed by pressing F16 - Cancel Synchro.  The following processing occurs when an update key is pressed:

1)   An FA is read for the first part in the subfile and the production center.  If the flow authorization start date (FASDTE) is after today's date, processing stops for this part and the next part in the subfile is read.

2)   If the FASDTE is before today's date and the flow authorization end date (FAEDTE) is also before today's date, then the FA status (FASTAT) is updated to closed.

3)   If an ad hoc flow authorization exists on today's date, its status is updated to closed. 

4)   If the FASDTE is before today's date and the FAEDTE is after or equal to today's date, the flow authorization will be broken.  The flow authorization before today will be given a status of closed.

5)   Processing continues until all flow authorizations for all parts in the subfile have been processed.

6)   The synchronization date of the production center on the Production Center Master file (JT180M) is changed to today.

F22 - Update Schedule posts the current production schedule.  The following processing is performed:

1)   The work mode field (WKMODE) is changed to 'DO1' or 'WO1' depending of the daily or weekly mode, in all the work file records that were maintained.  It is done in case the program terminates abnormally while performing the flow authorizations or requirements updates.  This work mode field will be then used to establish if the schedule can be recovered (see the section 1). 

2)   The Work file is used to retrieve the first record to be processed.  Processing will continue until all records for a part have been processed.  Records within a flow interval for a part are processed first before processing the next flow interval.  Once all records for a part have been processed, the next part on the Work file (JT100AP) is processed in the same manner.

3)   The Flow Authorization Number and other related data are saved into the Actual Flow Authorization Data Structure (JTXACT).  All supply records are processed for the current flow interval.

4)   It is important that the user realize that flow authorizations and flow requirements are only modified if there is a change in quantity, revision level, status, or flow interval.  Flows are not modified for a change in the product structure which do not have an associated revision level change.  Some examples are deduct operation, scrap, quantity per, etc.

It is also important to realize that this program only processes the dates that have been paged to.  It does not maintain a whole flow interval.

5)   A Suggested Supply Array (SSA) is loaded with all supply records for the flow interval for a part from the work file.

6)   Once the Actual Supply Array and the Suggested Supply Array have been loaded with the appropriate values, suggested flow authorizations are created.  If the supply quantity is zero, no flow authorizations will be generated.  If consecutive days have equal supply quantities, the flow authorization will be joined.  If the supply quantities are different, the flow authorization will be broken.  If the part's revision level changes, the flow authorization will also be broken.  The new suggested flow authorizations will be loaded into the suggested flow authorization data structure (RPXSUG).

7)   Once processing is complete for the suggested flow authorizations, suggested flow supply records are implemented for the flow interval being processed.  Suggested flow supply records for the part are compared to the existing flow supply records for the part.  Identical records will remain, old records will be changed, and if the number of suggested flow supply records exceeds the number of existing flow supply records, new records will be added.  Likewise, if the number of existing flow supply records exceed the number of suggested flow supply records, the remaining flow supply records will be deleted.

8)   If a flow supply record needs to be added, the flow authorization record is added and assigned the next flow authorization number from the Reference File (category C09).  The appropriate flow requirements must also be maintained for that record as follows:

a)   The Product Structure file (DE120M) is used to retrieve component parts.  Product structure information is saved into the product structure data structure (RPPSDS) if it is the first flow authorization to be exploded for the part.  This saves Inputs/outputs to the Product Structure and Part Master files when exploding other flow authorizations.

b)   If the component is a build-through part, no flow requirement is generated for this component.  When this situation arises, the exploding will continue for this build-through component, and its component will be retrieved.  Once a non-build-through component is retrieved, flow requirements are generated for that component.

c)   The flow requirement start and end dates are calculated by subtracting the product structure's component's offset days from the flow authorization start and end dates (FASDTE and FAEDTE).

d)   A check is made to make sure that the part is effective between the flow authorization start and end dates.  If it is not effective during that period, that component is not processed.

e)   For processing where flow requirements are added (MNTTYP = ADD), the following calculations occur:  The daily required quantity for the component is calculated by multiplying the flow authorization quantity (FAQTY) by the quantity-per-parent-per-unit (QTYPER), which is calculated as quantity-per-parent-per-batch (PZQTY) divided by the product structure batch quantity (PSBTQT).  The daily required quantity for the component (FRRQTY) is also inflated by (divided by) the "yield factor" (WKNSCF), which is calculated as one minus the quantity derived from the product structure scrap (PSSCRF) divided by one hundred (100).  The daily demand quantity (FRDQTY) takes into account the parent scrap factor (RPSCRP) by dividing the daily required quantity work field (WKQTYS) by the "yield factor" associated with the parent part (WRKF9).  The daily demand quantity thus takes into account both components which are scrapped or fail to meet inspection, as well as the end item parents which are scrapped or fail to meet inspection after the manufacturing operations/processes.

f)    For processing where flow requirements are changed (MNTTYP=CHANGE), the same calculations occur as above, but information such as component scrap factor (FRSCRF) and Quantity-Per-Parent (FRQTYP) are retrieved from the flow requirements file (JT120M).  The Quantity-Per-Parent (FRQTYP) is not divided by the product structure batch quantity (PSBTQT) since it was written to the flow requirements file as a Quantity-Per-Parent-Per-Unit.

g)   The component flow requirement record is written to the Flow Requirements file (JT120M).

9) If a supply record needs to be changed, the flow authorization record is changed and updated.  The appropriate flow requirements for the flow authorization components must also be updated.  In order to update flow requirements, the same calculations for an add need to be performed on a change.

10) If receipts exist for today and at the same time today's schedule is changed (WKHRCF = Y), the logic will be the same as when receipts exist for today and today's schedule is not changed (WKHRCF = 0) except the logic will allow today's schedule to be maintained.  The FA covering today's date will be retrieved and will be split depending on its start and due dates.

a)   A Set Lower Limit and Read equal to JT100L11 (keyed by plant/part/production center/revision level/start date) is executed to retrieve the FA covering today's date for the particular plant/part/production center/revision level combination.  JT100L11 is defined as the input file.

b) If an FA covers today's date for a particular plant/part/production center/revision level:

1)   If the start and end dates of the FA are equal, the FA is updated directly.  The new FA quantity (FAQTY) is the sum of the entered schedule (TDYSCH) and the receipt quantity (FATQR).

2)   If the start and end dates of the FA are not equal, the FA is split:

a)   If today is the start date, the FA is split into two FAs:  an FA covering only today's date and another FA covering the period after today.  For today's FA, the new FA quantity is the sum of the entered schedule and the receipt quantity for today.  The FA covering the period after today is updated with the revision level for tomorrow.

b)   If today lies between the start date and the end date, the FA is split into three FAs:  and FA covering the period until yesterday, an FA for today only, and another FA covering the period after today.  For today's FA, the new FA quantity is the sum of the entered schedule and the receipt quantity for today.  If an over-receipt was made before today, the receipt quantity is included in today's receipt quantity.  The FA covering the period after today will be updated with the revision level for tomorrow.

c)   If today is the end date, the FA is split into two FAs:  an FA covering the period until yesterday and another FA covering today only.  For today, the new FA quantity is the sum of the entered schedule and the receipt quantity for today.  If an over-receipt was made before today, the receipt quantity is included in today's receipt quantity.

      If no FA covers today's date for the revision level, the FA for the previous revision level covering today's date is retrieved.  Splitting logic is the same as above.

11)  If a supply record needs to be deleted (MNTTYP = END), all flow requirements for the flow authorization are deleted.

F23 - ASYNC Update.  The work file field (WKMODE) is changed to 'DA1' or 'WA1' depending of the daily or weekly mode, in all the work file records that were maintained.  It is done in case the Asynchronous Maintenance program (JT105E) terminates abnormally while performing the flow authorizations or requirements updates.  This work mode field will be then used to establish if the schedule can be recovered (see the section 1).  The asynchronous updates may be recovered only by the JIT Online Recovery program (JT900E).  Then the program writes a message to the ASYNC monitor and returns to the select screen to maintain production for another production center.  The ASYNC monitor calls the ASYNC Production Schedule Maintenance program, which processes the request and sends a message back to the user.

F24 - More Command Keys, allows the user to scroll through command keys.

JT100E Program Menu