Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

Sequence Numbers

Sequential numbering is a requirement for many applications. Accounting data is a particularly heavy application usage with respect to invoices, quotations, and other receivables and payables documentation. c-treeACE offers several forms of automated numbering. The serial segment (SRLSEG) feature has long served this purpose. However, it suffers some limitations as it is an additional index overhead on a per-file basis. IDENTITY support is more flexible and performs better, although it is still limited to a single table. Consider global operations against multiple servers that require a single numbering scheme. This requires a persisted pool, and indeed, many c-treeACE applications have implemented their own unique solutions.

c-treeACE V10 introduces a generic method to create, maintain, and access multiple sources of sequential numbers through a persisted Sequence feature.

c-treeACE Sequence Number Store

A sequence has the following properties associated with it:

  • sequence name
  • initial value
  • current value
  • limit value
  • incrementing or decrementing sequence
  • increment or decrement amount
  • cycling or terminating sequence

Changes are immediately committed to the sequence number. This includes creation and deletion of the sequence, as well as changing sequence settings and current values. A complete API is provided to manage this sequence number store.

Attributes for each sequence are stored in a fixed-length record in the files SEQUENCEDT.FCS and SEQUENCEIX.FCS. c-treeACE creates these files when starting if they do not exist and these files are under full transaction control. An index on the sequence name field is used to find the record. Sequence values are stored as 64-bit values as shown in the ctSEQATTR structure definition.

TOCIndex