When / How Is The Sequential Bill Number Assigned

Warning:

This section is a technical explanation of how sequential bill numbers are assigned. It contains background information for those who wish to understand the rationale of the design.

The batch billing background process BILLING takes advantage of parallel processing to allow multiple bills to be produced concurrently. In addition, we allow groups of bills to be committed in "chunks" (based on the commit frequency assigned to the billing background process). These two facts make it impossible to allocate sequential bill numbers during batch billing (because back outs could result in gaps and parallel processing could result in duplicates). This is why sequential bill numbers are allocated as follows:

  • A sequential bill number is allocated when a bill is completed online (by clicking the Complete button on Bill - Main).
  • If you submit the batch billing process with the following parameters, sequential bill numbers will be allocated when bills are completed:
  • Batch thread number must equal 1.
  • Batch thread count must equal 1.
  • Override maximum records between commits must equal 1.

    The above parameters mean that bills are not being produced in parallel and they are not being committed in "chunks". This allows the system to allocate sequential bill numbers when the bills are completed.

  • If you do not run batch billing single-threaded, you must schedule the Assign Sequential Bill Numbers background process (ASSGNSBN) to run immediately after batch billing. This single-threaded process assigns sequential bill numbers to completed bills.
  • The following measures are in place as a fail-safe:
  • If the bill print download background process (POSTROUT) encounters a bill without a sequential bill number, it will abort with an appropriate error message.
  • Users are not allowed to delete a completed bill with a sequential bill number. Note, deletion of completed bills is typically prohibited due to the presence of frozen bill segments. However, it's possible to create a bill without frozen bill segments and additional logic exist to inhibit the deletion of such bills if they have sequential bill numbers.