CREATETOKENFORMATTOKENLENGTH
Create a new token format specifying token's length, the "leading" and "trailing" position to be preserved in the input value. The mask, if specified, is a fixed number of digits which will mask the leading positions of input value ignoring the "leading" parameter.
Import Parameters
- LEADPOS - The number of positions to preserve (if any) on the left side of the value. 
- TRAILPOS - The number of positions to preserve (if any) on the right side of the value. 
- LEADMASK - A fixed number of digits to mask the leading positions. For example, if - leadMaskis set to 7777, the first four digits of the token will be 7’s. When- leadMaskis set, the- leadPositionsvalue is ignored. For example, for input value 1234 5678 9012 3456, setting- leadMaskto 7777 and- leadPositionto 6 results in 7777 8031 4902 1531 and not 7777 5631 4902 1531.
- LUNH - Indicates if the token should fail the check (-1), pass the check (1), or does not matter (0). 
- TOKENLENGTH - Indicates the length of the token if it is different from the input data. 
From the common parameters, refer to the source code below for exact parameters.
Export Parameters
- FORMATNUMBER - The integer representing the new token format. This value will be greater than 100.
Source Code
FUNCTION CREATETOKENFORMATTOKENLENGTH.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(NAEUSER) TYPE STRING
*" VALUE(NAEPASSWORD) TYPE STRING
*" VALUE(DBUSER) TYPE STRING
*" VALUE(DBPASSWORD) TYPE STRING
*" VALUE(LEADPOS) TYPE INTEGER
*" VALUE(TRAILPOS) TYPE INTEGER
*" VALUE(LEADMASK) TYPE STRING
*" VALUE(LUHN) TYPE INTEGER
*" VALUE(TOKENLENGTH) TYPE INTEGER
*" EXPORTING
*" VALUE(FORMATNUMBER) TYPE INTEGER
*"----------------------------------------------------------------------
ENDFUNCTION.