flag Token
The flag token is often used inside an opt token
to determine if a flag that defines an account property exists on a user account.
This token searches for a specified string. If the text is found, AttrParse
assigns the boolean value true to the attribute, then adds
the entry to the attribute map.
The parse position will be advanced to the first character after the
matched text.
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.
|
offset
|
The number of characters to skip before searching for the text for the
token. The offset can have the following values:
-
1 or higher moves the specified number of characters before
trying to match the token’s text.
-
0 searches for text at the current parse position. This is
the default value.
-
-1 indicates the token’s text will be matched at the
current parse position, but the parse position will not go past the string
specified in the termToken attribute, if present.
|
termToken
|
A string to use as an indicator that the text being searched for is
not present. This string is often the first word or label in the next line
on the screen output.
The parse position will be the character after the termToken string.
The termToken attribute can only be used if the len attribute is negative
one (-1).
|
Data
The text to match.
Examples
flag Token Examples
-
The following token will match AUDIT at the
current parse position, and if found, adds AUDIT_FLAG=true to
the user attribute map.
<flag offset=’-1’ name=’AUDIT’>AUDIT_FLAG</flag>
|
-
The following token will match xxxxCICS at the current parse position, where xxxx are
any four characters, including spaces. If this string is found, AttrParse
adds CICS=true to the user attribute map.
<flag offset=’4’ name=’CICS’>CICS</flag>
|