CacheProcessWorkCenterRates

Cache Process Work Center Rates

Major Business Rule

Object Name: B3001870

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, Terminate, and 

Close Cursor functions on the Work Center Rates cache used in the Work Center Rates Master Business 

Function. 


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 - frees memory for a cache 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. 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 (Terminate cache).

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

Data Structure

D3001870 - Cache Process Work Center Rates

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobnumberJOBSMATH_NUMERICNONENONE

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

szWorkCenterMCUcharNONENONE

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.

szCostMethodLEDGcharNONENONE

A user defined code (40/CM) that specifies the basis for calculating item costs. Cost methods 01 through 19 are reserved for J.D. Edwards 
use.

mnDirectLaborFrozSTLFMATH_NUMERICNONENONE

This rate, in cost per hour, is the rate used to calculate the standard labor cost as of the last simulation and update.

mnDirectLaborSimXSDLMATH_NUMERICNONENONE

A rate, in cost per person per hour, that the system uses with the Run Labor hours of the associated routing to calculate the standard run 
labor cost.

mnSetupLaborFrozSTFFMATH_NUMERICNONENONE

This rate, in cost per hour, is the rate used to calculate the standard setup labor cost as of the last simulation and update.

mnSetupLaborSimXSSLMATH_NUMERICNONENONE

A rate that the system uses with the Setup Labor Hours of the associated routing to calculate the standard setup labor cost.

mnIndirectLaborFrozSIDLMATH_NUMERICNONENONE

This rate, in cost per hour, is the rate used to calculate the standard indirect labor cost as of the last simulation and update.

mnIndirectLaborSimXSILMATH_NUMERICNONENONE

This rate, in cost per hour, is used with the indirect labor hours field of the associated routing to calculate the standard indirect labor cost.

mnLaborVarOHFrozSTRFMATH_NUMERICNONENONE

This rate, in cost per hour or percent of labor, is the rate used to calculate the standard variable labor overhead cost as of the last 
simulation and update.

mnLaborVarOHSimXSVOMATH_NUMERICNONENONE

A rate or percent, as determined on Manufacturing Constants, used to calculate the standard variable labor overhead cost. If this field is a 
rate, it is the cost per hour. If this field is a percent, it is the percent of direct labor. Enter percents as whole numbers. For example, enter five 
percent as 5.00.

mnLaborFixedOHFrozSTRZMATH_NUMERICNONENONE

This rate, in cost per hour or percent of labor, is the rate used to calculate the standard fixed labor overhead cost as of the last simulation 
and update.

mnLaborFixedOHSimXSFOMATH_NUMERICNONENONE

A rate or percent, as determined on Manufacturing Constants, used to calculate the standard fixed labor overhead cost. If this field is a rate, 
it is the cost per hour. If this field is a percent, it is the percent of direct labor. Enter percents as whole numbers. For example, enter five 
percent as 5.00.

mnMachineRunFrozMSFRMATH_NUMERICNONENONE

This rate, in cost per hour, is the rate used to calculate the standard machine cost as of the last simulation and update.

mnMachineRunSimXSMRMATH_NUMERICNONENONE

A rate that the system uses with the Run Machine hours of the associated routing to calculate the standard machine labor cost.

mnMachineVarOHFrozMSTFMATH_NUMERICNONENONE

This rate, in cost per hour, is the rate used to calculate the standard machine cost as of the last simulation and update.

mnMachineVarOHSimXSMVMATH_NUMERICNONENONE

A rate or percent, as determined on Manufacturing Constants, used to calculate the future standard machine overhead cost. If this field is a 
rate, it is the cost per hour. If this field is a percent, it is the percent of machine run. Enter percents as whole numbers. For example, enter five 
percent as 5.00.

mnMachineFixedOHFrozMSSFMATH_NUMERICNONENONE

This rate, in cost per hour or percent of labor, is the rate used to calculate the standard fixed machine overhead cost as of the last 
simulation and update.

mnMachineFixedOHSimXSMFMATH_NUMERICNONENONE

A rate or percent, as determined on Manufacturing Constants, used to calculate the standard fixed machine overhead cost. If this field is a 
rate, it is the cost per hour. If this field is a percent, it is the percent of machine run. Enter percents as whole numbers. For example, enter five 
percent as 5.00.

mnProductionHoursSTAFMATH_NUMERICNONENONE

Future use. The average of the standard time (hours) worked per period at a work center.

szProgramIdPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cActionCodeACTNcharNONENONE

A code that specifies the action that is performed. Valid values are: A Add C Change

nNumberOfKeysINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

cProcessModeEV01charNONENONE

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

cReturnCursorEV01charNONENONE

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

idCacheCurorIDGENLNGIDNONENONE

General purpose ID variable.

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.

szBranchMMCUcharOPTNONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

Related Functions

None

Related Tables

None