ComputerWizard CDF Libraries:
WizUnique

Back to Downloads Main Page | Back to the ComputerWizard’s Home Page


ComputerWizard Consulting also creates Custom Defined Function (CDF) libraries for use with DataEase for DOS and DataEase for Windows. CDF libraries can contain one or more special-purpose functions that extend the capabilities of DataEase beyond those provided by Sapphire.

ComputerWizard Unique Number & Pattern Generator CDF Library
File Name: wizUnique32 Demo.zip Flashing New thingy
Size: 320 KB
Date: 07-Feb-2005
Type: ShareWare, $50.00 per site.
Contact ComputerWizard Consulting directly regarding Vertical Market Application Licenses.
On line registration: RegSoftRegisterC.gif (3419 bytes) Click here for registration & payment via RegSoft's secure site. (RegSoft will process your credit card.) After your payment is processed, we will e-mail you a registered version.
The library in this download is fully functional, 15-day trial version; the days don't have to be consecutive, so if you try a function on Monday, and then again on the following Thursday—that's only two days used up. You'll see a reminder screen the first time any function in the library is used in a given DfW session.

Download the zip file to a temporary directory, unzip it, and read the manual for instructions on installing and using the library.

What does it do?
This library is a collection of seven functions to create, maintain, call/return unique sequential numbers or “patterns” from values stored in a file external to DataEase. The library addresses some shortcomings in DataEase’s sequence from operator (especially on networks) as well as some problems with the SetUneek() and GetUneek() functions from the CDFS2 library that ships with DataEase.

The unique values can be numeric or a “pattern” (like a license plate—e.g., AAA-001, AAA-002...).

The functions allow you to:

  • Create the external file with an initial value.
  • Change the current value of the key in order to restart the numbering sequence
  • Read the current value of the key.
  • Increment the current value by designer-specified amount.

What functions are in the library?

FUNCTION LIST
Function Name What It Does
Sequential Number Functions
wizSetUnique Creates or resets a numeric sequence control file.
wizSetUniqueExt() Creates or resets a numeric sequence control file with more detailed error messages.
wizGetUnique() Retrieves the current value from a numeric sequence control file and increments the file value by user-specified amount.
Sequential Pattern Functions
wizSetPattern() Creates or resets a pattern sequence control file.
wizSetPatternExt() Creates or resets a pattern sequence control file with more detailed error messages..
wizGetPattern() Retrieves the current value from a pattern sequence control file and increments the file value by user-specified amount.
wizWhatIsPatternValue() Retrieves the current value from a pattern sequence control file (e.g., tells you what the next sequence number will be).

What's wrong with “Sequence From”?

DataEase has a built-in automatic sequence feature via its sequence from keyword for numeric string fields. However, “sequence from” was never intended to generate unique numbers, especially on a network, and especially when subform records are involved.

A “sequence from” value is generated by DataEase keeping track of the last record in a table, and adding one to the “sequence from” item every time a new record is saved. If two people are entering records at the same time, the numbers can get crossed up depending on who presses the Save key first, leading to all sorts of problems.

You can avoid these problems by changing your data-entry routines to ones that use DQL procedures instead of direct entry so that the key number is assigned in this way, and using a native DataEase table to keep track of the numbers. Or you can use a CDF as part of a field derivation and make life much easier for yourself.

SetUneek & GetUneek (CDFS2)

There's nothing wrong with the CDFS2 library’s SetUneek() and GetUneek() combination—if you are running on a Novell network or an NT-based network with low-to-medium data-entry concurrency.

John Middleton, (from ShopEase.com) who has developed a POS system in DataEase (DOS and Windows versions) found a  problem with multi-user tests of SetUneek() and GetUneek() where the control file would get “caught” in the cache of an NT server and duplicate numbers would be issued. With DataEase 5.5 and the 16-bit version of CDFS2, he said it was “very easy to produce a duplicate value”. His testing with DataEase 6.0 and the 32-bit version of CDFS2 resulted in 3 duplicate numbers being generated over several hours out of 30,000 transactions—which is not bad. wizUnique did not generate any duplicate numbers during the same test.

 

Separator Line
Home | Staff | Clients | Products | Downloads | Technical | Site Map
Black Separator Line (994 bytes)

Please send your comments, questions and complaints to the Web Development Department
Copyright © 2002–2005 ComputerWizard Consulting. All rights reserved.
DataEase, DataEase for DOS, DataEase for Windows, DEDOS, DfW, DataEase 6, DataEase 6.x, ComputerWizard, ComputerWizard Consulting, DataEase Consultant, DataEase Consulting, DataEase Distributor, Canadian DataEase distributor, DataEase in Canada, DataEase distributor in Canada, DataEase Canada, DataEase Canada, ComputerLinks, dataease.com, DQL, CDF, CDF Library, CDF Libraries