CacheProcessEquipmentTagMBF

Cache Process Equipment Tag MBF

Major Business Rule

Object Name: B1200280

Parent DLL: CCRIN

Location: Client/Server

Language: C

Functional Description

Purpose

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

functions on the Equipment Tag MBF Cache


Setup Notes and Prerequisites


• Cache Action Code
• '1' Get - retrieve the cache element.  If not found, fetch from F1217 and add it to cache. 
• '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 - NOT IMPLEMETED.
• '8' Terminate - terminate cache
• '9' Close Cursor and Free Data Ptr
'b7'b7'b7'b7'b7'b7'b7'b7

• Number of Keys 
• As a parameter 
• 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, update, or delete the first record.
• If the cache does not have a key, a zero should always be passed.
'b7'b7'b7'b7'b7'b7'b7'b7


Special Logic




Technical Specification


The index for this cache is made up of the Asset Item Number and Modified or Original fields. This 

index is UNIQUE.


Cache Name 

If the Input Cache Name is " " or NULL, this function will build, create a new cache based on this 

name and return the cache name.

The cache name that is returned is built using the following:

• "hhmmss" + 2 digit random number. Eg: "10253645"
'b7'b7'b7'b7'b7'b7'b7'b7

The actual cache that is created will be named using the concatenation of "EQPTAGMBF_" + Cache Name.


Perform setup functions 

A.Initialize cache to get handle.
B.If the Input Cache Name is Blank

C.Generate Cache Name and return to Input Cache Name

D.Create a new cache using "EQPTAGMBF _" + Input Cache Name

E.End If

F.If not successful, set error "032E", set Cache Error Code = '3', and return failure.

G.Validate input parameters Number Of Keys, Action Code, and Comparison Flag.

H.If not valid, set error "032E", set Cache Error Code = '2', and return failure.

I.Set Cache Error Code = '0'

J.Set return code to success.


II.Processing Based on Mode.


A.If Cache Action Code is '1' - GET:
1.Open cursor.  If the input Cursor Pointer is not NULL, retrieve the existing cursor and reset 
it.

2.Retrieve the first element on the cache matching the key values passed as input.  If the input 

Number of Keys is zero, fetch the first element in the cache.

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

calling program.

4.If SequentialFetch = '1', return cursor pointer to calling application.  Otherwise, close the 

cursor.

5.If Get Fails 

6.Fetch Record from F1201.

7.If Found

8.Load the values from the retrieved element into the data structure to be 

passed back to the calling program.

9.Insert a new cache element with values from data structure as Original rec.

10.Else

11.Set Cache Error Code = '6'.

12.End If

13.End If


B.If Cache Action Code is '2' - ADD:
1.Insert a new cache element with values from data structure.
2.If add fails set error "032E", set Cache Error Code = '4', and return failure.


C.If Cache Action Code is '3' - UPDATE:
1.Update existing cache element with values from data structure.
2.If update fails set error "032E", set Cache Error Code = '4', and return failure.


D.If Cache Action Code is '4' - DELETE:
1.If the Number of Keys is not 0, delete all elements in the cache matching the key values passed 
as input.

2.If the number of keys is 0, delete the first cache element.

3.If delete fails, set Cache Error Code = '5'.


E.If Cache Action Code is '5' - DELETE ALL:
1.Delete all elements in the cache.
2.If delete fails, set Cache Error Code = '5'.


F.If Cache Action Code is '6' - GET NEXT:
1.Using the input cursor pointer from the previous GET action, retrieve the next element in 
the cache matching the key values passed as input (the cursor should have been set through a 

previous "Get" action, i.e. action code '1'.  If the Number of Keys is zero then fetch the 

next record 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 the cursor and set Cache Error Code = '1'.


G.If Cache Action Code is '7' - ADD/UPDATE:
1.Not Implemented

H.If Cache Action Code is '8' - END
1.If the input CacheCursorPtr is not zero, retrieve the pointer and close the cursor.
2.Perform cleanup functions (Terminate cache).


I.If Cache Action Code is '9' - CLOSE CURSOR:
1.Retrieve the Data Ptr (Cache Cursor Ptr must not be Zero).
2.Close cursor.

   3.Free Data Ptr and Set Cache Cursor Ptr to 0.


Data Structure

D1200280 - Cache Process Equipment Tag MBF

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAssetItemNumberNUMBMATH_NUMERICOPTNONE

An 8-digit number that uniquely identifies an asset.

szCountryCTRcharOPTNONE

A user defined code (00/CN) that identifies a country. The country code has no effect on currency conversion. The Address Book system 
uses the country code for data selection and address formatting.

cCompanyOwnedCOOWNcharOPTNONE

A flag that indicates if an equipment record is company owned.

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.

mnOrderNumberDOCOMATH_NUMERICOPTNONE

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.

szOrderTypeDCTOcharOPTNONE

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

szCompanyKeyOrderNoKCOOcharOPTNONE

A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a 
sales order, and so on). If you use the Next Numbers by Company/Fiscal Year facility, the Automatic Next Numbers program (X0010) uses the 
order company to retrieve the correct next number for that company. If two or more order documents have the same order number and order 
type, the order company lets you locate the desired document. If you use the regular Next Numbers facility, the order company is not used to 
assign a next number. In this case, you probably would not use the order company to locate the document.

mnLineNumberLNIDMATH_NUMERICOPTNONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

jdDateOrderedORDJJDEDATEOPTNONE

The date you entered the sales or purchase order into the system.

jdDateShippedSHPJJDEDATEOPTNONE

The date on which you confirm that a specific order line was shipped.

jdActualDeliveryDateADDJJDEDATEOPTNONE

The date on which the shipment to the customer is confirmed as shipped. During shipment confirmation, the system updates the Sales 
Order Detail table (F4211) with this date.

mnAddressNumberShipToSHANMATH_NUMERICOPTNONE

The address number of the location to which you want to ship this order. The address book provides default values for customer address, 
including street, city, state, zip code, and country.

mnAddressNumberParentPA8MATH_NUMERICOPTNONE

The address book number of the parent company. The system uses this number to associate a particular address with a parent company 
or location. Any value that you enter in this field updates the Address Organizational Structure Master table (F0150) for the blank structure 
type. This address number must exist in the Address Book Master table (F0101) for validation purposes. Examples of address book records 
that would have a parent number include:   o  Subsidiaries with parent companies     o  Branches with a home office     o  Job sites with a general 
contractor 

mnSalesperson1SLSMMATH_NUMERICOPTNONE

The first of two salespeople who have responsibility for or can receive a commission on sales to this customer. You create this code by 
using the Address Book system or the Related Salesperson form.

mnAddNumOwnerBillingANOBMATH_NUMERICOPTNONE

The address number of an alternate location to which the owner wants the invoice (application) sent.

szRelatedPoSoNumberRORNcharOPTNONE

A number that identifies a secondary purchase order, sales order, or work order that is associated with the original order. This number is for 
informational purposes only.

szRelatedOrderTypeRCTOcharOPTNONE

A user defined code (system 00, type DT) that indicates the document type of the secondary or related order. For example, a purchase 
order might be document type OP and might have been created to fill a related work order with document type WO.

jdDateCompletionSTRXJDEDATEOPTNONE

The date that the work order or engineering change order is completed or canceled.

mnPrimaryLastVendorNoVENDMATH_NUMERICOPTNONE

The address book number of the preferred provider of this item.

szOriginalPoSoNumberOORNcharOPTNONE

The original document number. This can be a voucher, an invoice, unapplied cash, a journal entry number, and so on Matching document 
numbers are also used to identify related documents in the Accounts Receivable and Accounts Payable systems. The document number 
(DOC) is always the original document number. The matching document number (DOCM) is the check, adjustment, or credit to be applied 
against the original document.

szOriginalOrderTypeOCTOcharOPTNONE

This code defines the order type. It is verified in user defined codes (40/OT). Reserved document types have been defined for voucher 
entry, invoice entry, receipts entry, and time sheet entry.  Because the offsetting entries for document types are created automatically during the 
post program, they will not be self-balancing on original entry. The reserved document types are:    PR Purchase Requisition Orders    PQ 
Purchase Quote    PO Purchase Order    PD Purchase Order - Direct Ship    PB Purchase Order - Blanket    SQ Sales Quote    SO Sales Order    
SD Sales Order - Direct Ship    SB Sales Order - Blanket 

szCompanyKeyOriginalOKCOcharOPTNONE

A number that is used in conjunction with the values in the ODOC and ODCT fields to identify a transaction.

szOrderSuffixSFXOcharOPTNONE

In the A/R and A/P systems, a code that corresponds to the pay item. In the Sales Order and Procurement systems, this code identifies 
multiple transactions for an original order. For purchase orders, the code is always 000. For sales orders with multiple partial receipts against an 
order, the first receiver used to record receipt has a suffix of 000, the next has a suffix of 001, the next 002, and so on.

mnOriginalLineNumberOGNOMATH_NUMERICOPTNONE

A number identifying which line on the original order that the current line matches.

szProductFamilyPRODFcharOPTNONE

A code that classifies an inventory item into a group for customer service. Some examples include: Laser Printer, Inkjet, or Fax.

szProductModelPRODMcharOPTNONE

A code that classifies an inventory item into a model for customer service. Some examples include: Laser Printer, Inkjet or Fax.

szProductComponentPRODCcharOPTNONE

The components that make an equipment number or components associated with a customer site.

szConfiguredModelCMODcharOPTNONE

szInstallKeySYEMcharOPTNONE

szVehicleIdentNumVINNUcharOPTNONE

szReferenceNumberREFNcharOPTNONE

A Reference number or identification number as defined for a particular EDI transaction set or as specified by the Reference Number 
Qualifier.

szCategoryCode01ZE01charOPTNONE

A user defined reporting code for equipment.

szCategoryCode02ZE02charOPTNONE

A user defined reporting code for equipment.

szCategoryCode03ZE03charOPTNONE

A user defined reporting code for equipment.

szCategoryCode04ZE04charOPTNONE

A user defined reporting code for equipment.

szCategoryCode05ZE05charOPTNONE

A user defined reporting code for equipment.

szCategoryCode06ZE06charOPTNONE

A user defined reporting code for equipment. Enter a value from UDC 17/B6.

szCategoryCode07ZE07charOPTNONE

A user defined reporting code for equipment.

szCategoryCode08ZE08charOPTNONE

A user defined reporting code for equipment.

szCategoryCode09ZE09charOPTNONE

A user defined reporting code for equipment.

szCategoryCode10ZE10charOPTNONE

A user defined reporting code for equipment.

szUserReservedCodeURCDcharOPTNONE

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.

jdUserReservedDateURDTJDEDATEOPTNONE

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

mnUserReservedNumberURABMATH_NUMERICOPTNONE

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.

szUserReservedReferenceURRFcharOPTNONE

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.

szCreatedByUserCRTUcharOPTNONE

The address book number of the user who created this record.

szUserIdUSERcharOPTNONE

The code that identifies a user profile.

szProgramIdPIDcharOPTNONE

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.

szWorkStationIdJOBNcharOPTNONE

The code that identifies the work station ID that executed a particular job.

jdDateUpdatedUPMJJDEDATEOPTNONE

The date that specifies the last update to the file record.

mnTimeLastUpdatedUPMTMATH_NUMERICOPTNONE

The time that specifies when the program executed the last update to this record.

cModifiedOrOriginalEV01charOPTNONE

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

szCacheActionCodeCACTNcharOPTNONE

A code that indicates the activity you want to perform. Valid codes:     o Get - Retrieve the cache element     o Add - Add a cache element     o 
Update - Update a cache element     o Delete - Delete a cache element     o Delete All - Delete all cache elements     o Get Next - Retrieve the 
next cache element     o Add/Update - Add a cache element if it does not exist; Update a cache element if it does exist     o Terminate - 
Terminate Cache

mnNumberKeysNKEYSMATH_NUMERICOPTNONE

The number of keys in an index that will be used to retrieve, delete, or update a record.

szCacheNameJBNMcharOPTNONE

This is the name of a job in the system.

idCacheCursorPtrGENLNGIDOPTNONE

General purpose ID variable.

cSequentialFetchEV01charOPTNONE

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

cErrorCodeERRCcharOPTNONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

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.

szLotLOTNcharOPTNONE

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

szLocationLOCNcharOPTNONE

The storage location from which goods will be moved.

mnECONumber_WODWODMATH_NUMERICOPTNONE

The order number from the work order.

szBillRevisionLevel_BREVBREVcharOPTNONE

A value that indicates the revision level of a bill of material. It is usually used in conjunction with an engineering change notice or 
engineering change order. The revision level of the bill of material should match the revision level of its associated routing, although the system does 
not check this. This value is defined and maintained by the user.

jdECOEffectiveDate_EFFFEFFFJDEDATEOPTNONE

A date that indicates one of the following:     o When a component part goes into effect on a bill of material     o When a routing step goes into 
effect as a sequence on the routing for an item     o When a rate schedule is in effect The default is the current system date. You can enter 
future effective dates so that the system plans for upcoming changes. Items that are no longer effective in the future can still be recorded and 
recognized in Product Costing, Shop Floor Management, and Capacity Requirements Planning. The Material Requirements Planning system 
determines valid components by effectivity dates, not by the bill of material revision level. Some forms display data based on the effectivity 
dates you enter.

mnDefaultDealer_AN8DLAN8DLMATH_NUMERICOPTNONE

The default Dealer for the Customer.

mnAssessorNumber_AN8ASAN8ASMATH_NUMERICOPTNONE

The address book number that identifies the assessor.

cTermsAcceptedFlag_TERMYNTERMYNcharOPTNONE

A code that specifies whether the owner of the equipment has agreed to the the terms and conditions presented regarding the ownership of 
the equipment.

jdInServiceDate_INSDTEINSDTEJDEDATEOPTNONE

The date that the equipment was placed into service.

cMeterReadingRequired_MRRYNMRRYNcharOPTNONE

A code that specifies whether the system requires a value in one of the meter readings fields when you enter a warranty claim against a 
piece of equipment.

szRegistrationStatus_REGSTSREGSTScharOPTNONE

A code that specifies the current registration status for an equipment record. Enter a value from UDC 17/RS. 

mnDistributor_AN8DRAN8DRMATH_NUMERICOPTNONE

The address book number that identifies the distributor of the equipment.

szSalesType_SATYPSATYPcharOPTNONE

A code that specifies the sales type for the equipment. Enter a value from UDC 17/SY.

mnEquipmentPartsNumberEQPNMATH_NUMERICOPTNONE

szMfgWOBranchPlant_MMCUMMCUcharOPTNONE

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

F1217 Equipment Master Extension