CacheProcessVerifyCSID

Cache Process Verify CSID

Minor Business Rule

Object Name: B3200230

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will perform Get, Add, Update, Delete, Delete All, Get Next, Add, and Terminate 
functions on the Verify CSID cache used in Select Configured Item (P32053) 


1.2Setup Notes and Prerequisites

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

• 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.

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.Retrieve cursor (either from data pointer or new CACHE cursor)

C.Return CACHE cursor upon requested

D. Set  DS Cache Error Code = '0';   

E. 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").


C. If Process Mode is "3" - UPDATE (same logic as mode "7").

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 without 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.Fetch record with full key
2.If record in CACHE is found, update record with new value.

Otherwise add new record to CACHE.
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 (Terminate cache).

I. If  Process Mode is "9" - CLOSE CURSOR:
1.Perform close cursor.


^

Data Structure

D3200230 - Cache Process Verify CSID

Parameter NameData ItemData TypeReq/OptI/O/Both
cCacheActionCodeEV01charOPTNONE

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

nIndexNumberINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

nNumberOfKeysINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

cReturnCursorEV01charOPTNONE

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

idCursorGENLNGIDOPTNONE

General purpose ID variable.

cCacheCodeErrorEV01charOPTNONE

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

cSuppressErrorMessageSUPPScharOPTNONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

szErrorMessageIDDTAIcharOPTNONE

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.

mnJobNumberJOBSMATH_NUMERICOPTNONE

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

szUniqueConfigurationIDCFGSIDcharOPTNONE

An identifier that represents a unique configuration. It is generated from an encryption algorithm.  Regardless of the number of segments or 
levels in the configured item, the system always converts the information into a 32-character digest. The digest is always a full 32 characters 
in length, consists of numbers and characters, and does not contain any blanks. You cannot determine the initial value from the digest, and it 
has no significant meaning.

mnIdentifierShortItemITMMATH_NUMERICOPTNONE

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

mnQtyOnHandPrimaryUnPQOHMATH_NUMERICOPTNONE

The number of units that are physically in stock. The system displays the quantity on-hand in the primary unit of measure.

szCostCenterMCUcharOPTNONE

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.

szLocationLOCNcharOPTNONE

The storage location from which goods will be moved.

szLotLOTNcharOPTNONE

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

cPrimaryBinPSPBINcharOPTNONE

A code that indicates whether this is the primary or secondary location for this item within this stocking location. Valid values are:    P Primary 
storage location    S Secondary storage location  Note:  You can only have one storage area marked as primary within each branch or 
warehouse. In some cases, the system uses the primary storage area as the default.

Related Functions

None

Related Tables

None