int Token
The int token captures an account attribute that
is an integer. The attribute name and integer value will be added to the account
attribute map. The parse position will be advanced to the first character
after the integer.
Attributes
Attribute
|
Description
|
name
|
The name of the attribute to use in the attribute value map. The name
is usually the same as a resource user attribute on the schema map on the
resource adapter, but this is not a requirement.
|
len
|
Indicates the exact length of the expected integer. The length can have
the following values:
-
1 or higher captures the specified number of characters and
checks to see if the text is an integer value or if it matches the characters
specified in the noval attribute.
-
-1 indicates the parser will take the longest string of digits
starting at the current parse position unless the next characters equal the noval attribute. This is the default value.
|
noval
|
Optional. A label on the screen that indicates the attribute does not
have an integer value. Essentially, it is a null value indicator. The parse
position will be advanced to the first character after the noval string.
|
Data
None
Examples
int Token Examples
-
The following token matches a 6-digit integer and puts integer
value of those digits into the attribute value map for the SALARY attribute.
<int name=’SALARY’ len=’6’/>
|
If the value 010250 is found, AttrParse adds SALARY=10250
to the value map.
-
The following token matches any number of digits and adds that
integer value to the attribute map for the AGE attribute.
<int name=’AGE’ len=’-1’ noval=’NOT GIVEN’/>
|
If the value 34 is found, for example, AGE=34 would
be added to the attribute map. For string NOT GIVEN, a
value will not be added to the attribute map for the AGE attribute.