CacheProcessWorkCenterMaster

Cache Process Work Center Master

Minor Business Rule

Object Name: B3001860

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 Master cache used in the Work Center Revisions 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

D3001860 - Cache Process Work Center Master

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.

szDispatchGroupMCUWcharNONENONE

A category code used to group work centers within an overall business unit. For example, you can use this code to group similar machines 
operating out of several work centers that report to one business unit.

szBranchPlantMMCUcharNONENONE

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.

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

cCriticalWorkCenterCRTWcharNONENONE

A code that indicates whether the work center is critical or not critical when the system calculates capacity. Valid values are: N Not a critical 
work center. 1 A critical work center in calculating RRP only. 2 A critical work center in calculating RCCP and CRP. 3 A critical work center in 
calculating RRP, RCCP, and CRP. The system also displays Type 3 work centers when you select Type 1 or Type 2 in this field. 4 Not a capacity 
work center. The system does not include this work center in capacity planning. Note: The data selection is a system feature that processes 
certain groups of information with the RRP, RCCP, and CRP programs.

cPrimeLoadCodePILCcharNONENONE

A code that determines if a work center is machine or labor intensive. The system also uses prime load codes in Resource Requirements 
Planning and Capacity Requirements Planning calculations to develop load profiles. Valid codes are:    L Run labor hours only    M Machine 
hours only    B Run labor plus setup labor hours    C Machine plus setup hours    O Other (will not generate resource units)

cPayPointCodeBFPFcharNONENONE

A code that indicates whether a work center has labor, material, or both,backflushed through it when quantities are reported against 
operations occurring in the work center. If you do not override the routing record, the system uses the work center value as the default. Valid codes 
are:    0   Not a backflush work center    B Backflush material and labor    M Backflush material only    L Backflush labor only    P Preflush material 
only

cDemoCalcCapacityDEMOcharNONENONE

Future use. A switch selecting either Demonstrated (D) or Calculated (C) capacity to use in CRP calculations for work center 
capacity. Demonstrated Capacity is the proven capacity calculated from actual output performance data. This is usually the number of items produced times 
standard hours per item. Calculated (or Rated) Capacity is the capacity calculated from such data as utilization, efficiency and planned 
hours.

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnReplenishmentHoursAVRTMATH_NUMERICNONENONE

The time required before a consuming location has a replacement kanban available from its supplying location. This value is used only for 
kanban card processing in Shop Floor Management.

mnResourceOffsetTRKSMATH_NUMERICNONENONE

A value used in the Resource Profile table (F3303) to determine the number of days that the actual use of a work center resource should be 
offset from the forecasted need date.

mnWorkHourPerDayWRHRMATH_NUMERICNONENONE

The number of work hours that the manufacturing plant operates per day.

mnWorkCenterEfficiencyWOREMATH_NUMERICNONENONE

A user defined value that indicates how efficiently a work center operates. This value usually refers to staff efficiency. When you enter a 
value in this field, and the Modify Cost by Work Center Efficiency field in the Job Shop Manufacturing Constants table (F3009) is set to Y, the 
system creates a new cost component (B4) from the cost calculated from the direct labor cost (B1). For example, if the constant is set to Y, the value 
of this field is 80%, and the direct labor cost is 10, the system creates a B4 cost component for 2 in the Item Cost Component Add-Ons table 
(F30026). The Refresh Resource Units program also uses this value as a default when calculating rated capacity. Enter percents as whole 
numbers. For example, enter 80% as 80.00. Note: The system expects that the routing times entered for each operator are the actual times it 
takes to complete an operation. Efficiency does not affect total cost. Efficiency does reassign some of the costs into different cost 
components. Efficiency does not change the duration or backscheduling of a work order.

mnWorkCenterUtilizationWORUMATH_NUMERICNONENONE

A percentage that indicates how intensively a work center is being used. This value usually refers to machine use. It is the ratio of the direct 
time charged for production activities to the planned hours. The Refresh Resource Units program also uses this value as a default when 
calculating rated capacity. Enter percents as whole numbers. For example, enter 80% as 80.00.

mnNumberOfEmployeesQMADMATH_NUMERICNONENONE

The normal number of employees in this work center. When you run the Work Center Resource Units Refresh program, the system 
multiplies this number by the Number of Work Hours Per Day from the Manufacturing Constants table (F3009) to generate the total gross labor hours 
available in the work center each day.

mnNumberOfMachinesNOMAMATH_NUMERICNONENONE

The normal number of machines in this work center. When you run the Work Center Resource Units Refresh program, this number is 
multiplied by the number of work hours per day from the Manufacturing Constants table (F3009) to generate the total gross machine hours available 
in the work center each day.

mnStandardQueueHoursSQDMATH_NUMERICNONENONE

Future Use The expected number of hours a job will wait in the queue at this work center before work on it begins.

mnMoveHoursMOVDMATH_NUMERICNONENONE

The planned hours that are required to move the order from this operation to the next operation in the same work center. If the Routing 
Master values are blank, the system retrieves the default value from the work order routing. However, the system uses these values only for 
backscheduling variable leadtime items.

mnQueueHoursQUEDMATH_NUMERICNONENONE

The total hours that an order is expected to be in queue at work centers and moving between work centers. The system stores this value in 
the Item Branch table (F4102). You can calculate this value using the Leadtime Rollup program or you can enter it manually. When you run the 
Leadtime Rollup program, the system overrides manual entries and populates the table with calculated values.

mnCrewSizeSETCMATH_NUMERICNONENONE

The number of people who work in the specified work center or routing operation. The system multiplies the Run Labor value in the Routing 
Master table (F3003) by crew size during costing to generate total labor amounts. If the Prime Load Code is L or B, the system uses the total 
labor hours for backscheduling. If the Prime Load Code is C or M, the system uses the total machine hours for backscheduling without 
modification by crew size.

mnHoursPerShift1DL1MATH_NUMERICNONENONE

Future use This is the planned number of hours for the duration of shift 1 for this work center.

mnHoursPerShift2DL2MATH_NUMERICNONENONE

Future use This is the planned number of hours for the duration of shift 2 for this work center.

mnHoursPerShift3DL3MATH_NUMERICNONENONE

Future use This is the planned number of hours for the duration of shift 3 for this work center.

mnShift1StartDE1MATH_NUMERICNONENONE

Future use. The demonstrated capacity for shift 1.

mnShift2StartDE2MATH_NUMERICNONENONE

Future use. The demonstrated capacity for shift 2.

mnShift3StartDE3MATH_NUMERICNONENONE

Future use The demonstrated capacity for shift 3.

cShift1CodeDC1charNONENONE

A user defined code (00/SH) that identifies daily work shifts.

cShift2CodeDC2charNONENONE

Future use. This is the planned number of standard hours available in this work center by multiplying number of machines or crew size by 
planned hours for shift 2.

cShift3CodeDC3charNONENONE

Future use. This is the planned number of standard hours available in this work center by multiplying number of machines or crew size by 
planned hours for shift 3.

jdUserReservedDateURDTJDEDATENONENONE

This is a 6 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

mnUserReservedAmountURATMATH_NUMERICNONENONE

This is a 15 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

mnUserReservedNumberURABMATH_NUMERICNONENONE

This is a 8 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

szUserReservedCodeURCDcharNONENONE

This is a 2 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

szUserReservedReferenceURRFcharNONENONE

A 15-position reference that is reserved for the user.  J.D. Edwards does not currently use this field and does not plan to use it in the future.

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.

idCursorHandleGENLNGIDNONENONE

General purpose ID variable.

cCacheCodeErrorEV01charNONENONE

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

cSuppressErrorMsgsEV01charNONENONE

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.

Related Functions

None

Related Tables

None