Documentation >
MAC-PAC Technical Library >
Manufacturing >
Just-in-Time >
Programs >
Part Production Schedule Inquiry - Purpose >
Part Production Schedule Inquiry - Calculations
Part Production Schedule Inquiry - Calculations
JT830E
. 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 find modules installed.
b. 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.
c. The operating system's file status codes (category 015) are retrieved in order to retrieve and format all CPF status codes for error message handling.
d. The user authorization (category 409) is retrieved from the Reference file.
e. The default plant (category 428) is retrieved from the Reference file.
f. The quantity field sizes record is retrieved from category 446. The quantity field sizes record is retrieved to determine the default number of decimal positions for order quantity fields. If this record is not found, a message is sent to the system operator and the program aborts.
B. Mainline
1. On the Part/Production Schedule Inquiry Function Select screen (JT830S01), 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 production center that will be loaded into the detail screen 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.
2. If a valid plant is entered, the calendar code and manufacturing company/warehouse are saved for other input/output 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 the 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 select screen (JT830S01) is validated, the detail screen (JT830S02) is ready to be formatted for display.
a. Each cell selected in the work file is written into the subfile. The part's main production center is written first. The other production centers are written in alphabetical order.
Each time a cell is written to the subfile, the Production Center Master file (JT180M) is accessed to retrieve all information needed to format the screen. Other information is retrieved from the work file record. 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 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 run units for each Part/Production center are retrieved from the Part/Production Center Relationship file (JT160M) for each Production Center Total Units calculation.
e. All firmed or planned flow authorizations from the Flow Authorization file (JT100ML1) that fall within the schedule period for the part in a 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 for the displayed part/production center relationships 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, the part's 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 availability calculation, 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 and total daily load quantities for the part are displayed at the bottom of the detail screen.
4. After display of the detail screen (JT830S02), the user may scroll both horizontally and vertically if subfile records exist.
5. Command keys on the detail screen (JT830S02) available to the user include F3-Exit, F2-Fast Path, F5-Previous Screen, F6-Next Screen, F9-Enter Maintenance, and F12-Fold/Truncate.
F3 - Exit is used to end a session when all processing for a conversation is completed.
F2 - Fast Path is used to call any program by entering a fast path code at the top right-hand corner of the screen after F2 is invoked.
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 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 view production in the next schedule period. When this command key is pressed, 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.
F9 - Enter Maintenance is used to initiate file maintenance from file inquiry.
F12 - Fold/Truncate enables the user to alternate between displaying only production quantities or both production quantities and percent load quantities (alternates between one- and two-line display formats). If on the select screen the user entered N in calculate load, zeros are displayed in the Percent Load field.