Page History
...
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).
The NUMBERKEY1 value, if specified, should be 32 characters or less.
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.
The NUMBERKEY2 value, if specified, should be 32 characters or less.
RESTART: Optional
This parameter may be used to conditionally or unconditionally trigger the number series to restart at 1 (one). You may specify one of the following values:
...
*VALUE: compares the value specified in the RESTARTVALUE parameter with one that was previously stored from the a prior instance of the NEXTNUMBER activity. If they are different, then the numbering will restart at 1 (one). If they are the same, numbering will not be restarted.
RESTARTVALUE: Optional
This optional parameter is used mainly if *VALUE is specified for the RESTART parameter. It provides the application value that will be compared with a previous stored value to determine whether numbering will restart at 1 (one). If they are different, then numbering will restart at 1 (one) and the value provided will be stored for future comparisons.
...
Note that if you wish to restart numbering on a time basis, you may use built-in variables such as *NOW_LOCAL_DATE, *NOW_LOCAL_YYYY, *NOW_LOCAL_YYYYMM, *NOW_LOCAL_MM, *NOW_LOCAL_WEEK and *NOW_LOCAL_DOW as the value of the RESTARTVALUE parameter.
The value used and stored is a maximum of 256 characters long.
OUTPUT Parameters:
NUMBEROUT:
Upon completion, this parameter contains the next sequential number in the series identified by the specified (or assumed) "keys".