Monday, April 3, 2017

How can I reset the Batch Instance Identifier (ID) value in Ephesoft?

Sometimes, for an Ephesoft deployment, it is advantageous to reset the Batch Instance Identifier (ID) or BI#. This might also be required because there is a "feature", some would say a bug, in MariaDB where the sequence value will reset to '1' when there are no batches in the queue and the DB is bounced.

First, we should determine the current BI# using the following command:

            select ID from BATCH_INSTANCE;

NOTE: It will be the highest value returned.

Remember the Batch Instance Identifier is displayed in Hexadecimal format when viewed in the Ephesoft interface. However, we will use an integer when updating the BI# at the DB level and Ephesoft will convert it to a Hexa Decimal value.  In this first example, we will set the BI# to '40001'. Ephesoft will display this as 'BI9C41'.

           alter table BATCH_INSTANCE auto_increment = 40001;

You can check the value using the previous select statement after you submit your next batch.

If you want to start with a specific Hexadecimal value, say A100, you will need to first convert it to a decimal. In this case, the decimal value '41216' would be used.

            alter table BATCH_INSTANCE auto_increment = 41216;

NOTE: To verify that the change has occurred you will need to process a new Ephesoft batch.

No comments:

Post a Comment