Documentation >
MAC-PAC Technical Library >
Manufacturing >
Just-in-Time >
Programs >
Production Schedule Maintenance by Part - Purpose >
Production Schedule Maintenance by Part - Calculations
Production Schedule Maintenance by Part - Calculations
JT110E
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 Part Production Schedule Maintenance Function Select screen (JT110S01) the part number and begin date 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 of the production centers that will be loaded into the detail subfile.
The Part Master file (DE100M) is accessed for the part entered on the select screen in order to retrieve the main production center. This will be the first production center displayed in the detail screen subfile. The Production Center file (JT180M) is then accessed to retrieve the production center family. Each production center in the Production Center file that belongs to this family will also be written to the work file (JT100AP) and loaded into the detail subfile.
As each production center is written to the control work file, the work file is first checked to be sure that:
|
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.
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 then 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 associated with 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 is validated, the Part Production Schedule Maintenance Detail screen (JT110S02) is formatted.
a. Each cell selected in the work file is loaded into the subfile. The part's main production center is written first. The other production centers are written in an alphabetical order.
Each time a cell is written to the subfile, an access to the Production Center Master file (JT180M) 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 load if Load Calculation has been selected), is calculated and saved into the subfile. The over/under load does not take into account the load for the part displayed; it will be added when the screen is displayed, because the user may synchronize the part.
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. Then, the daily date buckets are calculated and formatted for display on the detail screen. The date array (DTA) is also loaded with these dates.
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. Each production center displayed is processed.
If the user has requested a load calculation, the total load of the production center is calculated (array PTU) by retrieving all flow authorizations for it in the period displayed. The displayed part load is not taken into account because its load may be changed by the user; the displayed part total load and the production center total load are calculated when the screen is displayed. The run units for each part/production center is retrieved from the Part/Production Center Relationship file (JT160M) for each production center total load calculation.
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 production quantities. The daily production quantities are then added to the actual supply array (ASA).
f. The Production Center Total Units and the supply quantities are saved on the work file (JT100AP). A work file record contains the information for each of the work days displayed on the detail screen.
g. Once all production centers have been processed, total daily loads are calculated and formatted as follows:
Part's Daily Load = Production Quantity x Run Units
Total daily load is the accumulation of daily load for each production center producing the part.
h. The part availability is calculated. 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).
4. After display of the detail screen (JT110S02), user input is validated. For all production centers, 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. The load percentages are modified for each production center. Availability quantities are updated. The new availability quantity is the sum of the previous quantity plus all supply differences until the date of the bucket being processed. Total daily loads are also recalculated as before.
5. If the production quantities are valid, the work file (JT100AP) is updated with the changed production quantities.
6. Command keys on the detail screen (JT110S02) available to the user include F3-Exit, F2-Fast Path,
F5-Previous screen, F6-Next Screen, F9-Enter Inquiry, F10-Display Function Select, F12-Fold/Truncate, F15-Rekey Data, F16-Synchronization, 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 Screen (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 the part in all displayed production centers. The synchronization is not allowed if the start date from the select is greater than today. When the command key is pressed, the over/under bucket for all production centers 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 Load Calculation is requested on the select screen, it is recalculated for those cells where the displayed part has a past due total load. The past total load and availability of the part 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 is not updated on the Production Center Master file (JT180M). If you require this date to be updated, synchronize your schedule with Daily/Weekly Production Schedule Maintenance (JT100E).
F22 - Update Schedule posts the current production schedule. The following processing is performed:
(1) The work mode field (WKMODE) is changed to 'OL2' 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 production center have been processed. Records within a flow interval for a part and production center are processed first before processing the next flow interval. Once all records for a production center 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 to 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 and production center 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 and production center. 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, all flow requirements for the flow authorization are deleted.
F23 - ASYNC Update. The work mode field (WKMODE) is changed to 'AS2' 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 part. 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.