CacheProcessSegementValues

Cache Process Segement Values

Major Business Rule

Object Name: B3200350

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

functions on the Segment Values cache used in Configurator Order Processing (P3294, X3294, P32943). 


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

• 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
1.Perform cursor close on cursor passed in.


Data Structure

D3200350 - Cache Process Segment Values




^

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.

mnConfigurationIDNumberCFGIDMATH_NUMERICOPTNONE

An identifier that represents a unique configuration. It is generated by a next number value and is the key to the configuration tables.

mnComponentIDNumberCFGCIDMATH_NUMERICOPTNONE

A number that represents a component in a configuration. This number, which is generated by next numbers, always restarts at 1 and 
increments, based on the number of components in the configuration.

mnSegmentNumberPELMATH_NUMERICOPTNONE

A number that establishes the sequence in which the segments were defined in the system. Segment numbers are user 
defined. Cross-segment editing rules reference the segment numbers to ensure that the set of values defines a valid configuration. Assembly inclusion rules 
reference segment numbers and their associated values to define prices, component parts, routing, and calculated values for configured items.

szSegmentValueSGVLcharOPTNONE

An answer to the configurator feature and option questions that appear during order entry. When you define cross-segment editing rules, 
you compare the segment answers to values to determine invalid configurations. When you define assembly inclusion rules, you create unique 
configurations by comparing the segment answers to values to assign parts, prices, calculated values, or routing steps.

szDescriptionLine1DSC1charOPTNONE

Brief information about an item; a remark or an explanation.

szDataItemDTAIcharOPTNONE

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.

cRequiredToBeATRQcharOPTNONE

A code that specifies whether a segment is required or optional in a configuration, or whether the system must calculate it to specification 
when you enter an order. Valid codes are: R Segment answer is required during order entry. O Segment answer is optional during order 
entry. C Segment is calculated during order entry. You define the calculation with assembly inclusion rules.

szSystemCodeSYcharOPTNONE

A user defined code (98/SY) that identifies a system. Valid values include: 01 Address Book 03B Accounts Receivable 04 Accounts 
Payable 09 General Accounting 11 Multicurrency

szUserDefinedCodesRTcharOPTNONE

A code that identifies the table that contains user defined codes. The table is also referred to as a UDC type.

szValueForEntryDefaultDVALcharOPTNONE

Used as the initial value on the data entry screen for the associated data item. The value entered must be the exact same length as the 
data item size. Place single quotes around the value if it contains any embedded blanks.  The keywords *BLANKS and *ZEROS can be used 
as the default value.  When entering a numeric data item with default values, the redisplay of the data item suppresses all leading 
zeros. CAUTION:  If a blank entry is allowed, default values should not be used.

szLowerAllowedValueLVALcharOPTNONE

The lower allowed value of this specific segment.  If you enter a value here,then you must also enter an upper allowed value.

szUpperAllowedValueUVALcharOPTNONE

The upper allowed value of this specific segment.  If you enter a value here,then you must also enter an lower allowed value.

cNumericYNCNUMcharOPTNONE

Determines whether a user defined code is numeric or alphanumeric. Valid values are:    Y Indicates that the code is numeric and should be 
right-justified.    N Indicates that the code is alphanumeric and should be left-justified.

mnSegmentDisplaySequenceDTASMATH_NUMERICOPTNONE

The field size of the data item. Note: All amount fields should be entered as 15 bytes, 0 decimals, and the data item type should be P 
(packed).

cDataDisplayDecimalsCDECcharOPTNONE

A value that designates the number of decimals in the currency, amount, or quantity fields the system displays. For example, U.S. Dollars 
would be 2  decimals, Japanese Yen would be no decimals, and Cameroon Francs would be 3  decimals.

cSaveSegmentATSAcharOPTNONE

A user defined code (32/YN) that specifices whether the segment value is significant enough to make the configuration unique. Valid values 
are: 0 The segment value is not significant. 1 The segment value is significant. If the configuration is unique, you must store the item in a 
separate location in inventory.

mnSpacesBeforeSegmentInforSPBNMATH_NUMERICOPTNONE

The number of spaces that should print before the segment information in the user defined format.

mnSpacesAfterSegmentInformSPANMATH_NUMERICOPTNONE

The number of spaces that should print after the segment information in the user defined format.

cPrintSegmentNumberATSNcharOPTNONE

A user defined code (32/YN) that specifies whether the system prints the segment number on the order paperwork. Valid values are: 0 Do 
not print the segment number on the order paperwork. 1 Print the segment number on the order paperwork. For a sales order, the system prints 
the segment number on the pick slip and invoice print. For a work order,  the system prints the segment number on the parts list print.

cPrintSegmentDescriptionATSDcharOPTNONE

A user defined code (32/YN) that specifies whether the system prints the segment description on the order paperwork. Valid values 
are: 0 Do not print the segment description on the order paperwork. 1 Print the segment description on the order paperwork. For a sales order, the 
system prints the segment description on the pick slip and invoice print. For a work order, the system prints the segment description on the parts 
list print.

cPrintSegmentValueATSVcharOPTNONE

A user defined code (32/YN) that specifies whether the system prints the segment value on the order paperwork. Valid values are: 0 Do not 
print the segment value on the order paperwork. 1 Print the segment value on the order paperwork. For a sales order, the system prints the 
segment value on the pick slip and invoice print. For a work order, the system prints the segment value on the parts list print.

cPrintSegmentValueDescriptionATVDcharOPTNONE

A user defined code (32/YN) that specifies whether the system prints the segment value description on the order paperwork. Valid values 
are: 0 Do not print the segment value description on the order paperwork. 1 Print the segment value description on the order paperwork. For a 
sales order, the system prints the segment value description on the pick slip and invoice print. For a work order, the system prints the segment 
value description on the parts list print.

cReturnandStartNewLineRTNLcharOPTNONE

A user defined code (32/YN) that indicates whether the system starts a new line after it prints the segment nformation. Valid values 
are: 1 Start a new line after the segment information. 0 Continue printing on the same line. If the system does not start a new line, it prints the configurator 
segment delimiter from the configurator constants.

cDerivedCalculationRoundRNDCcharOPTNONE

This field will be used to indicate how many positions to the right of the decimal a derived calculation should be rounded. For example,     o If 
the result of a derived calculation is 2190.123456789, enter 0 to round to the whole number 2190.     o Enter 4 to round up to 2190.1235.     o 
Leave the Derived Calculation Round field blank to avoid rounding. The system rounds up by one any digit followed by 5 through 9. The system 
does not round any digit followed by 0 through 4.

szUpdateCategoryCodeUPCCcharOPTNONE

A code that specifies which work order category code that the system populates with the segment value during order entry.

cValidFlagEV01charOPTNONE

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

szCodeURCDcharOPTNONE

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.

mnAmountURATMATH_NUMERICOPTNONE

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.

szSegmentErrorMessageIDDTAIcharOPTNONE

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