NEXTNUMBER

LANSA Composer

NEXTNUMBER

This activity generates the next number in a series that is identified by the two "key" values that can be specified in the input parameters. It may be suitable in some applications for generating sequential batch numbers or similar for processed data.

The series from which the number is generated is determined by the two number "keys" specified in the parameters. You can use the keys to generate a sequence number identified appropriately for your purpose or application. For example, you might specify "ORDER_IN" as the first key and "BATCHNUMBER" as the second key. The first time the activity runs (in any processing sequence) with these keys, the number 1 (one) is returned. Each subsequent invocation with these keys (in any processing sequence) returns the next number in the ORDER_IN/BATCHNUMBER series.

The numbers generated have a maximum precision of 30, 0. When the number reaches its maximum capacity it will roll-over to zero. The numbers and the keys are held in a Composer database file.

This activity may not meet the standards for data integrity and security required for some applications. You should consider the requirements of your application carefully before using this activity.

INPUT Parameters:

NUMBERKEY1 : Optional

This is the first of two optional "keys" that are used to uniquely identify the series from which the next sequential number will be generated. If this parameter is not specified, the activity will use the internal identifier of the containing processing sequence (a unique 32 character string). This results in a series of numbers unique to that processing sequence. But two instances of the activity in the same processing sequence would generate numbers from the same series (unless you specify a value for the NUMBERKEY2 parameter).

NUMBERKEY2 : Optional

This is the second of two optional "keys" that are used to uniquely identify the series from which the next sequential number will be generated. This parameter has no default - if not specified, a blank key value will be used.

OUTPUT Parameters:

NUMBEROUT :

Upon completion, this parameter contains the next sequential number in the series identified by the specified (or assumed) "keys".