CacheSerialNumberAssociations

Cache Serial Number Associations

Minor Business Rule

Object Name: B3101280

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function will perform Get, Add, Update, Delete, Delete All, Get Next, Add/Update, and Terminate 

functions on the Serial Numbers Parts Lists cache.  


This cache is used in serial numbers processing in the Work Orders Serial Numbers Association program 

(P3107E) and in the Work Order Completions (P31114) program.  This cache function is used for several 

types of  cache:

• Associations - stores the parent to component serial number associations which are assigned in the 
Serial Numbers Associations program (P3107E). Also used in P3106 (Issued Items Inquiry) to filter out 

components which have already been associated.

• Parent Serial Nos - stores the information about the parent serial nos. assigned to a work order 
(i.e. F3105 information).

• De-associations - stores the "deleted" associations transactions from the Serial Numbers 
Associations program (P3107E).  These transactions are used to "blank out" the Parent Lot on the Item Ledger 

Issues (F3111) records during the completions process.

'b7

The calling application is responsible for loading all appropriate key values to the data structure 

and identifying the number of keys to use in retrieval/update processes.  


• Cache Action Code
• 
'1' Get - retrieve the cache element.  
• '2' Add - add a cache element.
• '3' Update - update a cache element.
• '4' Delete - delete a cache element.
• '5' Delete All - delete all cache elements
• '6' Get Next - retrieve the next cache element
• '7' Add/Update - will add if element does not exist, will change if it does exist.
• '8' Terminate - terminate cache
• '9' Close Cursor- closes cache cursor
'b7

• Number of Keys 
• 
If the number of keys is passed as a parameter, the business function uses this value to setup 
key values for a Get, Update, Delete, Get Next, and Add/Update.  

• A zero may be passed to retrieve or update the first record.
'b7

1.3Special Logic

There is no special logic within this function.


2.Technical Specifications

2.4Processing 

I.    Perform setup functions 

A. Initialize cache to get handle.
B. Set  DS Cache Error Code = '0';   

C. If not successful Set error "032E,"  "Error Processing Cache".


II.  Processing Based on Mode.


A.If Process Mode is "1" - GET:
1.Open cursor, reset cursor.
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.Load the values from the retrieved element into the data structure to be passed back to 

the calling program. 

4.If get fails DS Cache Error Code = '6'.


B.If Process Mode is "2" - ADD (same logic as mode "7").

1.Delete Record , if one exists,  that matches full key from Input.
2.Insert a new cache element with values from data structure.

3.If add fails set error "032E" and set DS Cache Error Code = '4'.


C.If Process Mode is "3" - UPDATE (same logic as mode "7").
1.Delete Record , if one exists,  that matches full key from Input.
2.Insert a new cache element with values from data structure.

3.If add fails set error "032E" and set DS Cache Error Code = '4'.


D.If Process Mode is "4" - DELETE:
1.Delete all elements on the cache matching the key values passed as input.
2.If delete fails DS Cache Error Code  = '5'.


E.If Process Mode is "5" - DELETE ALL:

1.Delete all elements in the cache.
2.If delete fails DS Cache Error Code  = '5'.


F.If Process Mode is "6" - GET NEXT:
1.Retrieve the next element on the cache matching the key values passed as input (the 
cursor should have been set through a previous "Get" action, i.e. process mode "1", if number of 

keys is "0" then fetch next record with out using any key). 

2.Load the values from the retrieved element into the data structure to be passed back to 

the calling program.

3.If there are no more elements close cursor and set  DS Cache Error Code = '1'.


G.If Process Mode is "7" - ADD/UPDATE:

1.Delete Record , if one exists,  that matches full key from Input.
2.Insert a new cache element with values from data structure.

3.If add fails set error "032E" and set DS Cache Error Code = '4'.


H.If Process Mode is "8" - END
    1. Perform cleanup functions (Close cursor and Terminate cache).

I.If Process Mode is "9" - CLOSE CURSOR
1.Perform cursor close on cursor passed in.


Data Structure

D3101280 - Cache Serial Number Associations

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAssocSeqNoOSEQMATH_NUMERICNONENONE

For OneWorld, the sequence by which users can set up the order in which their valid environments are displayed. For World, a sequence or 
sort number that the system uses to process records in a user defined order.

szParentLotPLOTcharNONENONE

An inventory separation device that allows tracking of the inventory by date received or similar convention to control lots or layers.

szParentLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szParentMemoLot1LOT1charNONENONE

A higher classification or grouping of serial number or lot processed items,maintained within the Lot Master (F4108).

szParentMemoLot2LOT2charNONENONE

A higher classification or grouping of memo lot 1 maintained within the lot master (F4108).

szCompItemNoUnknownUITMcharNONENONE

A number that the system assigns to an item. It can be in short, long, or third item number format.

szCompLotLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

szCompBranchPlantMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

szCompLocationLOCNcharNONENONE

The storage location from which goods will be moved.

mnCompQuantityTRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

mnParentQuantityTRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

mnOrderNumberDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

szOrderTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

mnParentItemNoShortKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    1.   Item Number (short) - An eight-digit, computer assigned, completely 
non-significant item number.    2.   2nd Item Number - The 25-digit, free form, user defined alphanumeric item number.    3.   3rd Item Number - Another 
25-digit, free form, user defined alphanumeric item number.

mnCompItemNoShortITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

cParentCompletionStatusEV01charNONENONE

An option that specifies the type of processing for an event.

nNumberOfKeysINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

cProcessModeEV01charNONENONE

An option that specifies the type of processing for an event.

cCacheCodeErrorEV01charNONENONE

An option that specifies the type of processing for an event.

cSuppressErrorMessagesEV01charNONENONE

An option that specifies the type of processing for an event.

szErrorMessageIDDTAIcharNONENONE

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

idCacheCursorGENLNGIDNONENONE

General purpose ID variable.

cReturnCursorEV01charNONENONE

An option that specifies the type of processing for an event.

mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

Related Functions

None

Related Tables

None