ProcessComponentWorkFile

Process Component Locator Work File

Major Business Rule

Object Name: B3001240

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This business function will read the Components Locator Work File records from F30UI001 and depending 
on the mode passed in as input, will:

• count the number of "non-blank" locators on the work file
• clear the work file of all records associated with this session
• update, delete, or write the information to the Components Locator table (F3015) and clear the work 
file


The work file can be cleared using one of two methods:

• If all records matching the input Computer Id should be cleared from the work table, the Job Number 
(JOBS) input parameter should be left blank. This option is used when entering a form using the work 

file to clear out any possible records leftover from abnormal exits from the form.

• If all records for the current session, i.e. all records matching the input Computer Id and the Job 
Number, should be cleared from the work table, the Computer Id and Job Number should be entered in the 

input parameters.  This option is used on "normal" exits (OK, Hyperexits, Cancel) from the form using 

the work file.


1.2Setup Notes and Prerequisites

• None

1.3Special Logic

None

2.Technical Specifications


2.4Processing 

1.If the Mode = 2, clear the work file table of all rows that match the Job Number (JOBS) and 
Computer ID (CTID) passed as input.  If only the Computer ID (CTID) has been provided as input, clear 

rows that match only the Computer ID value.  Return to the calling program after clearing the table.


2.If the Mode = 3, count the number of locators on each row that matches the Job Number (JOBS) 

and Computer ID (CTID) passed as input but do not perform any updates.  Return the total number of 

locators to the calling program at the end of reading all selected rows.  If the current locator is blank, 

do not increment the total count of locators.


3.If the Mode = 1, process each set of locator fields (i.e. current locator, previous locator, 

unique key id) on each record retrieved from the work file that matches the Job Number (JOBS) and 

Computer ID (CTID) passed as input.

       a)Delete logic:

            -  If the current locator field is spaces, and the previous locator field is not 

spaces, delete the F3015 record using the unique key id field associated with this locator.  

-  If the record is not found when the delete is attempted, do not set an error       

flag.

       b)Add/Copy  logic:

              -  If the record is found on the add to F3015, update the existing record with the 

current locator value from the work file (do not set an error flag).

              -If the current locator field is not spaces and the previous value is spaces (or 

unique key id is zero), this record must be added to F3015. 

              -  The Unique Key Id for any new record is determined by calling Get Unique Key ID for 

Mfg (B3100490.c).

-Audit information for the any new or updated record is retrieved using Get Audit Info 
(B9800100.c)

              -      Load DS PID into F3015 pid field
       c)Change logic

              -Compare the current locator value with the previous locator value.  If they are 

different, update the existing F3015 record with the new locator value using the Unique Key Id.

              -Retrieve current audit information using Get Audit Info (B9800100.c) and update 

this information on the F3015 record.

              -     Load DS PID into F3015 pid field

-If the record is not found on the update, do not set an error.


Data Structure

D3001240 - Process Component Locator Work File

Parameter NameData ItemData TypeReq/OptI/O/Both
cModeEV02charNONENONE

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

szComputerIDCTIDcharNONENONE

szBranchMMCUcharNONENONE

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.

mnParentItemNumberKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    1.   Item Number (short) - An eight-digit, computer assigned, completely 
non-significant item number.    2.   2nd Item Number - The 25-digit, free form, user defined alphanumeric item number.    3.   3rd Item Number - Another 
25-digit, free form, user defined alphanumeric item number.

mnComponentItemNumberITMMATH_NUMERICNONENONE

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

jdEffectiveFromDateEFFFJDEDATENONENONE

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.

jdEffectiveThruDateEFFTJDEDATENONENONE

A date that indicates one of the following:     o When a component part is no longer in effect on a bill of material     o When a routing step is no 
longer in effect as a sequence on the routing for an item     o When a rate schedule is no longer active The default is December 31 of the 
default year defined in the Data Dictionary for Century Change Year. 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.

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.

mnNumberOfLocatorsMATH01MATH_NUMERICNONENONE

- - - Good Performance Low Value. 

mnJobnumberJOBSMATH_NUMERICNONENONE

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

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.

mnComponentLineNumberCPNBMATH_NUMERICOPTNONE

A number that specifies how the system displays the sequence of components on a single-level bill of material. This number initially 
indicates the sequence in which a component was added to the bill of material. You can modify this number to change the sequence in which the 
components appear.

Related Functions

B3100490 Get Next Unique ID For Mfg.
B9800100 Get Audit Information

Related Tables

F3015 Component Locator File
F30UI001 Component Locators Work File