1.Functional Description
1.1Purpose
B3101570, Cache Process Co/By Completions performs the cache handling activity used to maintain co/by 
completions.  This includes: initialize, add, update, delete, get, etc. The parameter Cache Action 
Code contains the value that determines what cache operation(s) are to be performed during the specific 
call.
1.2Setup Notes and Prerequisites
None.
1.3Special Logic
When using Cache Action Code mode '6' processing (Get Next), it is necessary to maintain the returned 
cursor value and pass that value back to subsequent mode '6' calls. 
2.Technical Specifications
2.4Processing 
2.Retrieve the first element on the cache matching the key values passed as input; the 
number of keys to be used is passed in the input parameters,  If  "0" fetch first element in the 
list.
3.Check to see if the keys change. 
4.Load the values from the retrieved element into the data structure to be passed back to 
the calling program.
5.If get fails return failure.
2.If add fails set error "032E"(Error Processing Cache) and return failure.
2.If update fails set error "032E" (Error Processing Cache)  and return failure.
2. If the number of keys is not 0, Delete the first cache element matching the key values 
passed as input. 
3. If delete fails, return failure.
4.If delete fails, return failure;
 subsequent GetNext operations require the cursor to be sent as a parameter, otherwise the 
GetNext will re-establish the cursor to the initial record in the key.
 if number of keys is "0" then fetch next record with out using any key 
3.Load the values from the retrieved element into the data structure to be passed back to 
the calling program and return the cursor value.
4.If there are no more elements close cursor and return failure.
2.Insert a new cache element with values from data structure.
3.If add fails set error "032E" (Error Processing Cache) and return failure.
D3101570 - Cache Co/By Product Completion
Data Item   Data Structure Description   I/O  Required     Notes
CACTN      Cache Action Code           I    Yes  '1' - Get 
                                                        '2' - Add 
                                                        '3' - Update 
                                                        '4' - Delete 
                                                        '5' - Delete All 
                                                        '6' - Get Next 
                                                        '7' - Add/Update 
                                                        '8' - End Cache 
                                                        '9' - Close Cursor
NKEYS      Number of Keys           I            The input parameter Number 
                                                        of Keys is required for 
                                                        processing when using 
                                                        Cache Action Code value 
                                                        equal to '1', '2', '3', 
                                                        '4', '5', '6', and mode 
                                                        '7'. Cache Action Code 
                                                        values '8' and '9' do not 
                                                        require Number of Keys to 
                                                        be entered. 
EV01      Suppress Error Message     I    No  '1' suppresses error 
                                                        messages
DTAI      Error Message ID           O
GENLNGCache Cursor           I/O          Required for Cache Action 
                                                        Code '6'
JOBS      Job Number                 I/O  Yes  Job Number should always 
                                                        the first field within 
                                                        each cache's index
SEQ      Sequence Number           I/O  Yes  Index field
NUMR      Record Number           I/O  Yes  Index field
ITM      Short Item Number           I/O
CMCU      Component Branch
LOCN      Location                 I/O
LOTN      LotSN                       I/O
MTST      Material Status Code     I/O
LOTS      Lot Status Code           I/O
LOTG      Lot Grade                 I/O
LOTP      Lot Potency                 I/O
UORG      Quantity Ordered           I/O
SOQS      Quantity Completed     I/O
SOCN      Quantity Scrapped           I/O
UOM      Unit of Measure as Input     I/O
STRX      Completion Date           I/O
DRQJ      Request Date           I/O
OPSQ      Operation Sequence     I/O
QT2      Transaction Quantity     I/O
CPCN      Quantity Scrap Variance     I/O
UM      Unit Of Measure           I/O  
COBY      CoBy Product            I/O
RSCP      Resource Percent           I/O
RCD      Reason Code                 I/O
ACTI      Saved Action Code           I/O
LOT1        Memo Lot 1                   I/O  No
LOT2        Memo Lot 2                   I/O  No
^
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| szCacheActionCode | CACTN | char | OPT | NONE | 
A code that indicates the activity you want to perform. Valid codes:
    o Get - Retrieve the cache element
    o Add - Add a cache element
    o 
  | ||||
| mnNumberKeys | NKEYS | MATH_NUMERIC | OPT | NONE | 
The number of keys in an index that will be used to retrieve, delete, or update a record.  | ||||
| cSuppressErrorMessage | EV01 | char | OPT | NONE | 
An option that specifies the type of processing for an event.  | ||||
| szErrorMessageID | DTAI | char | OPT | NONE | 
A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
  | ||||
| idCacheCursor | GENLNG | ID | OPT | NONE | 
General purpose ID variable.  | ||||
| mnJobNumber | JOBS | MATH_NUMERIC | OPT | NONE | 
The job number (work station ID) which executed the particular job.  | ||||
| mnSequenceNumber | SEQ | MATH_NUMERIC | OPT | NONE | 
A number that specifies the sequence of information.  | ||||
| mnRecordNumber | NUMR | MATH_NUMERIC | OPT | NONE | 
The equipment number or work order number associated with a change of status.  | ||||
| mnShortItemNumber | ITM | MATH_NUMERIC | OPT | NONE | 
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
  | ||||
| szBranchComponent | CMCU | char | OPT | NONE | 
A secondary or lower-level business unit. The system uses the value that you enter to indicate that a branch or plant contains several 
  | ||||
| szLocation | LOCN | char | OPT | NONE | 
The storage location from which goods will be moved.  | ||||
| szLotSN | LOTN | char | OPT | NONE | 
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.  | ||||
| szMaterialStatusCode | MTST | char | OPT | NONE | 
A user defined code (31/MS) that identifies the current status of a particular component on the work order.  | ||||
| cLotStatusCode | LOTS | char | OPT | NONE | 
A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes 
  | ||||
| szLotGrade | LOTG | char | OPT | NONE | 
A code that indicates the grade of a lot. The grade is used to indicate the quality of the lot. Examples include the following:
   A1   Premium 
  | ||||
| mnLotPotency | LOTP | MATH_NUMERIC | OPT | NONE | 
A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol 
  | ||||
| mnQuantityOrdered | UORG | MATH_NUMERIC | OPT | NONE | 
The quantity of units affected by this transaction.  | ||||
| mnQuantityCompleted | SOQS | MATH_NUMERIC | OPT | NONE | 
The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
  | ||||
| mnQuantityScrapped | SOCN | MATH_NUMERIC | OPT | NONE | 
The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
  | ||||
| szUnitOfMeasureAsInput | UOM | char | OPT | NONE | 
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).  | ||||
| jdCompletionDate | STRX | JDEDATE | OPT | NONE | 
The date that the work order or engineering change order is completed or canceled.  | ||||
| jdRequestedDate | DRQJ | JDEDATE | OPT | NONE | 
The date that an item is scheduled to arrive or that an action is scheduled for completion.  | ||||
| mnOperationSequence | OPSQ | MATH_NUMERIC | OPT | NONE | 
A number used to indicate an order of succession.
In routing instructions, a number that sequences the fabrication or assembly steps in the 
  | ||||
| mnTransactionQuantity | QT2 | MATH_NUMERIC | OPT | NONE | 
Generic Quantity field.  | ||||
| mnQuantityScrapVairance | CPCN | MATH_NUMERIC | OPT | NONE | 
The difference between the original Sales Order cancel amount and the new calculated Sales Order cancel quantity. This field maintains 
  | ||||
| szUnitOfMeasure | UM | char | OPT | NONE | 
A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
  | ||||
| cCoByProduct | COBY | char | OPT | NONE | 
A code that distinguishes standard components or ingredients from co-products,by-products, and intermediates. Co-products are 
  | ||||
| mnResourcePercent | RSCP | MATH_NUMERIC | OPT | NONE | 
A number that indicates what percent of the ingredients should be issued separately to co-products and by-products.  | ||||
| szReasonCode | RCD | char | OPT | NONE | 
A user defined code (42/RC) that explains the purpose for a transaction. For example, you can indicate the reason that you are returning 
  | ||||
| cActionCode | ACTI | char | OPT | NONE | 
A code that indicates the activity you want to perform.  Valid codes are:
   A Add
   C Change
   I Inquire
   D Delete
   .     End the program
   Blank 
  | ||||
| szMemoLot1 | LOT1 | char | OPT | NONE | 
A higher classification or grouping of serial number or lot processed items,maintained within the Lot Master (F4108).  | ||||
| szMemoLot2 | LOT2 | char | OPT | NONE | 
A higher classification or grouping of memo lot 1 maintained within the lot master (F4108).  | ||||
| szLocationFileFormat | LOCN | char | OPT | NONE | 
The storage location from which goods will be moved.  | ||||
| jdLotExpirationDate | MMEJ | JDEDATE | OPT | NONE | 
The date on which a lot of items expires.
The system automatically enters this date if you have specified the shelf life days for the item on 
  | ||||
| szSecondaryUnitOfMeasure | UOM2 | char | OPT | NONE | 
A user defined code (00/UM) that indicates an alternate unit of measure for the item.  | ||||
| mnSecondaryCompletedQty | SSTQ | MATH_NUMERIC | OPT | NONE | 
The number of units, expressed in the secondary unit of measure, that the system has recorded as completed or issued. This value can 
  | ||||
| mnSecCompletedToDate | SSTQ | MATH_NUMERIC | OPT | NONE | 
The number of units, expressed in the secondary unit of measure, that the system has recorded as completed or issued. This value can 
  | ||||
| cDualUnitOfMeasureItem | DUAL | char | OPT | NONE | 
An option that indicates that the system must maintain inventory balances and record transactions for an item in a secondary unit of 
  | ||||
| jdLotEffectiveDate | DLEJ | JDEDATE | OPT | NONE | 
The date on which a lot becomes available. The system uses this date for availability and commitment processing to indicate that the lot is 
  | ||||
| jdSellByDate | SBDJ | JDEDATE | OPT | NONE | 
The date by which a lot should be completely sold. The system uses this date as a "through" date for commitment processing. The system 
  | ||||
| jdBestBeforeDate | BBDJ | JDEDATE | OPT | NONE | 
The last date on which the products in a lot should be consumed. The system calculates the date by retrieving the value from the Best 
  | ||||
| jdBasedOnDate | BODJ | JDEDATE | OPT | NONE | 
The date that the system uses in conjunction with the shelf life days to calculate the lot expiration date. You can enter this date during 
  | ||||
| jdUserLotDate1 | U1DJ | JDEDATE | OPT | NONE | 
A date that the system can use as a through date for commitment processing. The system stores this date in the Lot Master table (F4108). If 
  | ||||
| jdUserLotDate2 | U2DJ | JDEDATE | OPT | NONE | 
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to the Lot Expiration 
  | ||||
| jdUserLotDate3 | U3DJ | JDEDATE | OPT | NONE | 
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to Lot Expiration Date, 
  | ||||
| jdUserLotDate4 | U4DJ | JDEDATE | OPT | NONE | 
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to Lot Expiration Date, 
  | ||||
| jdUserLotDate5 | U5DJ | JDEDATE | OPT | NONE | 
A user-defined date that can be used for commitment purposes and is stored in the Lot Master table (F4108). Similar to Lot Expiration Date, 
  | ||||
| None | 
| None |