DeleteListOfItemWords

Inventory String Parsing Business Function

Minor Business Rule

Object Name: B4101190

Parent DLL: COPBASE

Location: Client/Server

Language: C

Data Structure

D4101190C - Delete List of Item Words Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
idListPtrGENLNGIDOPTNONE

General purpose ID variable.

cDoneDONEcharOPTNONE

Related Functions

None

Related Tables

None
RetrieveListOfItemWords

RetrieveListOfItemWords

Inventory String Parsing Business Function

Minor Business Rule

Object Name: B4101190

Parent DLL: COPBASE

Location: Client/Server

Language: C

RetrieveWordsFromList

Input:

idListPtr =pointer to a linked list of words 

cSortByNumOccurrencesYorN


Output:

szSearchWord = next word retrieved from list

cDone = status character


Functionality:

This business function takes in a pointer to the head of a linked list of words created by the 

StringToWords business function. The function returns the next word in the list as well as a status 

character. 


You MUST pass the same cSortByNumOccurrencesYorN value here that you passed to StringToWords when 

creating the linked list.


If the cDone character is returned as 'N', there are more words in the linked list; if the cDone 

character is returned as 'Y', there are no more words in the linked list. 


Call this function within a while loop (while cDone != Y) to return all the words from the list.


Do not call this function when DONE has a value of 'Y'.


Data Structure

D4101190B - Inventory Word Retrieval Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
idListPtrGENLNGIDOPTNONE

General purpose ID variable.

cDoneDONEcharOPTNONE

szSearchWord999SRWDcharOPTNONE

The character string used to search for item records with common descriptions. Enter text that is specific and descriptive of the item. The 
program searches without regard to capitalization, spaces, and special characters such as commas.

Related Functions

None

Related Tables

None
StringToItemWords

StringToItemWords

Inventory String Parsing Business Function

Minor Business Rule

Object Name: B4101190

Parent DLL: COPBASE

Location: Client/Server

Language: C

StringToWords

Input:

szSearchString = string to parse

cSortByNumOccurrencesYorN

idTableHRequest = handle to Occurrences Table

cDoubleByteUserYN


Output:

nNumberOfWords = number of words in resulting linked list

cDone = status character

idWordListPtr = pointer to head of linked list of words created


Functionality:

This function takes in a string and parses it out into a linked list of words. These words can then be retrieved using the 

RetrieveWordsFromList.


Pass a 'Y' into cSortByNumOccurrencesYorN if you would like to create the list of words sorted by number of 

occurrences (as with a Search Application). In order to sort this way, you must also pass in a handle to the Occurrences Table via 

idTableHRequest. (The resulting list's first word will be the word with the least number of occurrences.)


Pass a 'N' into cSortByNumOccurrencesYorN if you don't care about sorting the resulting list of words by number of 

occurrences (as with a Word Search Build). If you pass in a 'N', do not pass anything to idTableHRequest. The words in the 

list will be sorted alphabetically.


If cSortByNumOccurrencesYorN = Y:

- The function will look for generic characters (* and _) and replace any '*' with '%'. In addition, if a word contains a 

generic character, a '%' will be put at the end of the word. 

- The function will remove any special characters (from the H95/SC UDC) and put all words in uppercase. The function 

will remove any words specified as stop words in the 98/SW UDC. The resulting list will contain all valid words (no 

duplicates) parsed out from the search string in order of least occurrences.

- If cDoubleByteUserYN is equal to '1' OR a double-byte word is found, the function not remove special characters, will 

not uppercase, and will not check for words to ignore. 


If cSortByNumOccurrencesYorN = N:

- The function will remove any special characters (from the H95/SC UDC) and put all words in uppercase. The function 

will remove any words specified as stop words in the 98/SW UDC. The resulting list will contain all valid words (no 

duplicates) parsed out from the search string in alphabetical order.

- If cDoubleByteUserYN is equal to '1' the function not remove special characters and it will not uppercase. If a 

double-byte word is found, the function will not do any parsing at all - it will simply put the entire search string as a word into the 

list.


If the search string contained no valid words, cDone will equal 'E', otherwise cDone will equal 'Y'.


You MUST call DeleteListOfWords, passing in idWordListPtr, at some point in order to free memory allocated by this 

function.

^

Data Structure

D4101190A - String To Words Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szSearchStringSRCHSTRNGcharOPTNONE

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

idTableHRequestGENLNGIDOPTNONE

General purpose ID variable.

nNumberOfWordsINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

cDoneDONEcharOPTNONE

idWordListPtrGENLNGIDOPTNONE

General purpose ID variable.

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.

cDoubleByteuserYNEV01charOPTNONE

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

Related Functions

None

Related Tables

None