Documentation >
MAC-PAC Technical Library >
Distribution >
Job Control >
Programs >
Inventory Stock Status Inquiry by Job - Purpose >
Inventory Stock Status Inquiry by Job - Calculations
Inventory Stock Status Inquiry by Job - Calculations
JC840E
A. Housekeeping
1. See Section 2.1 (Common Processing Routines - Housekeeping) of this manual for a general discussion of this subroutine. Processing specific to this program is described below.
2. The company name (COMNAM), manufacturing company (MANCO), manufacturing warehouse (MANWSE), Lot Control option (LOTOPT), Potency Control option (POTOPT), and balance type data (BTYPE1-3, MOPAC2-4, DSTAC2-4) are retrieved from the System Control file.
3. The date format (category 049), applications installed (category 012), and user/company authorization (category 409) records are retrieved from the Reference file (REFERP). Part type codes and descriptions (category 405), and production type codes and descriptions (category C01) are also retrieved and loaded into arrays.
B. Mainline
Function Select Screen
1. The company/warehouse and stock location are validated. (see the Inventory Control and Purchasing User Manuals for validation rules.) The company/warehouse is entered on the select screen in one of three ways:
a. The default value is retrieved from the Reference file.
b. The user enters a company/warehouse if no default value is specified.
c. The user changes the company/warehouse value using F17 - New Co/Whs.
Note: Fast path for company/warehouse changes is available only during the initial inquiry when a default company/warehouse is not available.
2. When the company/warehouse combination is valid, the job/group number, part number, and configuration code entered by the user are validated.
3. When the company/warehouse combination, job number, part number, and configuration code are valid the detail screen is displayed. If the part is configuration coded the Detail for Configuration Code screen (JC840S05) is displayed. Otherwise the Detail by Job screen (JC840S02) is displayed.
C. Detail by Job Screen
1. The part type code (MTYPN) on the Part Master file is used to retrieve the description from the part types array. Also, the production type code (PMPDTP) on the Part Master file is used to retrieve the description from the production types array.
a. If a job or group number was specified on the select, the Job or group description is retrieved from the Job Master file or the Reference file respectively.
2. The multiple location records for the job number/part number are accessed and processed. The location balances are totaled for each stock location. They are then formatted for each line and displayed on the last line of the subfile records for a given stock location.
a. If no job or group was specified on the select, all job, group, or common inventory for the part is retrieved.
b. If the environment and part are both potency controlled, the location balances are calculated in terms of potent units and totaled. This figure is stored in hidden fields and displayed when the user requests potent unit figures via F19.
c. If a particular lot is on hold, the lot number is highlighted and a warning message is displayed.
3. The balance types (CBAL) are determined. The available quantity-manufacturing (CAVMFG) and available quantity-distribution (CAVDIS) are accumulated according to the parameters on the system control record (ICCTL2, CT100M).
4. The detail screen is displayed.
5. The Enter key returns the user to the select screen for selection of another company/warehouse/job number/part number/configuration code combination.
D. Detail for Configuration Code Screen
1. The part type code (MTYPN) on the Part Master file is used to retrieve the description from the part types array. Also, the production type code (PMPDTP) on the Part Master file is used to retrieve the description from the production types array.
a. If a job or group number was specified on the select screen, the Job or group description is retrieved from the Job Master file or the Reference file respectively.
2. The multiple location records for the job/part number are accessed. The lot on the multiple location record is used to retrieve its configuration assignment record. If a configuration code search was entered, the configuration code retrieved is validated against the search to make sure it is greater than or equal to the search. If the lot is valid, the location balances are totaled for each stock location. They are then formatted for each line and displayed on the last line of the subfile records for a given stock location.
a. If no job or group was specified on the select screen, all job, group, or common inventory for the part is retrieved.
b. If the environment and part are both potency controlled, the location balances are calculated in terms of potent units and totaled. This figure is stored in hidden fields and displayed when the user requests potent unit figures via F19.
c. If a particular lot is on hold, the lot number is highlighted and a warning message is displayed.
3. The balance types (CBAL) are determined. The available quantity-manufacturing (CAVMFG) and available quantity-distribution (CAVDES) are accumulated according to the parameters on the system control record (DCCT22, CT100M).
4. The detail screen is displayed.
5. The Enter key returns the user to the select screen for selection of another company/warehouse/job number/part number/configuration code combination.