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

Production Schedule Inquiry - Calculations

JT800E

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 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 C15) 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 Daily/Weekly Production Schedule Inquiry Function Select screen (JT800S01) 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 field 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, all parts having the entered production center equal to their main production center, and that have one or more sources of demand (component requirement, sales order, transfer order/requisition, or Synchro offset release) in the selected period will be loaded into the work file.  If the user selects the All Relationship field, each part having a relationship (JT160ML2) with the production center entered on the select screen will also 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. 

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 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 (JT800S01) is validated, the detail screen (JT800S02) is ready to be formatted for display.

a.   Each part selected in the work file is loaded into 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 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 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 = Y.  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 quantities for all parts may be viewed by pressing F12 - Fold/Truncate on the detail screen. 

e.   All firmed or planned flow authorizations (FAs) that fall within the schedule period for a part in the production are used to extract the daily or weekly planned production quantities from the Flow Authorization file (JT100M).  The planned production quantities are then added to the actual supply array (ASA).  This array is used to accumulate daily and weekly totals.  In weekly mode, if there are more than five days a week, the production quantities of the sixth or/and seventh days 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.  A work file record contains the information for each of the work days or weeks displayed on the detail screen. 

g.   Once all parts in the production 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 product in 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 (JT800S02), the user may scroll both horizontally and vertically if subfile records exist.

5.   Command keys on the detail screen (JT800S02) available to the user include F2 - Command, F3-Exit, F5-Previous Schedule, F6-Next Screen, F8-Daily Maintenance, F9-Weekly Maintenance, F11-Time Phased P/A, F12 - Fold/Truncate, F24-More Command Keys.  F2 - Command is used to display a  window where a fast path option, mnemonic or OS/400 command (if the user is authorized) can be entered.  F3 - Exit is used to end a session when all processing for a conversation is completed.

F5 - Previous Screen shifts left in order to view 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 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.

F8 - Daily Maintenance is used to enter the daily conversation of Daily/Weekly Production Schedule Maintenance. 

F9 - Weekly Maintenance is used to enter the weekly conversation of Daily/Weekly Production Schedule Maintenance.

F11 - Time Phased P/A is used to enter the Time Phased Part Availability Inquiry program.

F12 - Fold/Truncate enables the user to alternate between displaying only production quantities or both production quantities and availability quantities (alternates between one-and two-line display formats).  If on the select screen the user entered N in the Calculate Availability field blanks are displayed in the Availability field.

JT800E Program Menu