MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Manufacturing > Just-in-Time > Programs > Lot Control Inventory Relief - Purpose > Lot Control Inventory Relief - Calculations

Lot Control Inventory Relief - Calculations

JT150E

A.   Housekeeping

1.   See the Common Processing Routines - Housekeeping section of this manual 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.   The operating system's file status codes (category 015) are retrieved.  If the file access codes are not found, the program terminates.

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

c.   The default plant (category 428) is retrieved from the Reference file.

d.   The date format (category 049) 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.

e.   The quantity field sizes record (category 446) is retrieved.  If it is not found, the program terminates.

4.   The following information is retrieved from the System Control file (CT100M).

a.   The Lot Option is retrieved from the first Inventory Control control record (ICCTL1).  If the Lot Option equals Y, a lot control environment is in effect, and the lot control files are opened.

b.   The Warehouse Balance Types are retrieved from the second Inventory Control control record (ICCTL2).

B.   Mainline

1.   The Lot Control Inventory Relief/By-Product Receipt Function Select screen (JT150S01) is displayed.  If the program is running online.  If processing an EDC transaction, the transaction is read from the Lot Issue/Receipt EDC Async Transaction file (JT150DP).

2.   The input fields are validated.  See the Just-in-Time User Manual for validation rules.  If any fields are in error: 

The fields in error are returned to the screen in reverse image with an appropriate message in the error subfile (if the program is running online).

OR

The transaction is flagged as an error transaction and the transaction file is updated (if the program is processing an EDC transaction).

3.   If running online and all fields on the select screen are valid, the component parts for the specified plant are retrieved and loaded into the detail subfile.

a.   The flow authorization number for the entered plant, parent part, production center, and revision level is retrieved from the Flow Authorization file (JT100ML2).

b.   Using the flow authorization number, the program retrieves the component parts from the Flow Requirements file (JT120M).

c.   The program determines the quantity of each lot-controlled component part to be issued from a multiple location (ISSQTY).  Non lot-controlled parts are backflushed.

d.   The program determines if any of the component parts are configuration costed (PMCFCO = 1, 2, 3, or 4).

e.   The program then retrieves multiple location records from the Multiple Location file (IC130M) for each lot-controlled component part.  Successive multiple locations for a given component are retrieved until the inventory quantities of these locations satisfy the total quantity to be issued for that component.  This data is then written to the subfile.

4.   In online mode, the detail screen is displayed.  The user can modify or add subfile records.

5.   The program validates the fields in the subfile or their corresponding fields in the transaction record depending on whether the program is running online or asynchronously.  See Just-in-Time User Manual for validation rules.  If any fields are in error, they are redisplayed on the screen in reverse image with an appropriate message in the error subfile.  If the program is running online or the transaction is flagged as an error transaction and the transaction file is updated if the program is processing an EDC transaction.

6.   Once a part is valid and found to be configuration coded, the Configuration Assignment Master file (EC170M) is checked to see if the lot is assignable to a configuration code.  If it does not, an error has occurred.

7.   The Multiple Location file (IC130M) record is read for update.  If the record exists, it is locked.  If the multiple location record does not exist, the record will be added at update time, and the Location Validation file (DE140M) is read and locked to keep the location from being deleted.

8.   The record on the Warehouse Balance file (IC140M) is read for update and locked.

9.   The Part Master file (DE100M) is read and locked to keep the part from being deleted.

10.  All new quantities are calculated.  The Multiple Location file (IC130M) is updated as follows.  For lot control inventory relief, the transaction quantity (DZTQTY) is subtracted from the on-hand balance type (LLBLT1), or added for reversals (CZRVCD = R).  For by-product receipts, the transaction quantity is added to the on-hand balance type (LLBLT1), or subtracted for reversals (CZRVCD = R).  For non-reversal transactions only, the transaction quantity is added to the activity since last count (LLASLC).  The date of last activity (LLDTLT) is also updated.

The Warehouse Balance file (IC140M) is updated as follows.  For lot control inventory relief, the transaction quantity is subtracted from the on-hand balance type (WBBLT1), or added for reversals (CZRVCD = R).  The transaction quantity is added to the WIP balance quantity (WBWIPB) for non-reversals , or subtracted for reversals (CZRVCD = R).  For by-product receipt, the transaction quantity is added to the on-hand balance type (WBBLT1), or subtracted for reversals (CZRVCD = R)   The transaction quantity is subtracted from the WIP balance quantity (WBWIPB) for non-reversals, or added for reversals (CZRVCD = R).  The transaction quantity is added to the year-to-date usage (WBYTDU) for non reversal transactions only (CZRVCD = R).

The date of last transaction (WBDTLT) and date of last issue (WBDTLI) are also updated.

11.  Audit Trail (JT120BP2) records are written to record inventory activity.

12.  Transaction Register (JT120CP2) records are also written to record inventory activity.

13.  Warning errors for printing on the transaction register are written to the Inventory Control Transaction Error Register (IC505AP) if the transaction will cause the inventory balance to become negative.

For EDC transactions, critical errors may be reviewed and corrected online using the Lot Control Inventory Relief/By-Product Receipt Error Maintenance program (BC150E).

JT150E Program Menu