This function is used to create the sequence number counters and to store their value in the supervisor table APLCOM. Each sequence number counter can be indexed. Each sequence number counter is available in a variable class [C] of the same name. These are the class [C] variables that must be used in the processed for the allocation of sequential numbers (for example the import process number). The characteristics of these class [C] variables are as follows :
Refer to documentation Implementation
Presentation
Close
Fields
The following fields are present on this tab :
Block number 1
|
This code identifies the current record in a unique way. |
|
Nature of the parameter :
|
|
The length can be entered in an alphanumeric sequence counter. |
Grid List of values
|
  |
|
Define the current index in the grid. |
|
Indicate the value of the parameter for each index. By convention, this is the value last allocated. |
Close
Code | Use |
EXPORT | Export number |
INTERLOC | Automatic coding of employees |
NUMFIL | Bank file number |
NUMIMP | Import/Export process number |
Text number |
All variables in class [C] must be modified in an entry transaction. In addition, a symbol locking operation is carried out on this variable before the modification of a variable of class [C]. It is not necessary to declare table APLCOM in the processes ; the engine will read this table to fill the variables of class [C] as well as to automatically update the file once any change is made to the value of a class [C] variable.
Example : allocation of a chrono used in the construction of a process name for an import or export .
#-----------------#
$TR_NUMIMP
Trbegin APLCOM
Gosub MAJ_NUMIMP
Commit
Return
#-----------------#
$MAJ_NUMIMP
Lock NUMIMP
If fstat=0
NUMIMP = [C]NUMIMP
[C]NUMIMP += 1
If fstat : ER = 2 : Endif
Else
ER = 1
Endif
Return