![]() |
Copyright © Cloud Software Group, Inc. All Rights Reserved |
token_string = TOKEN(string)
The character string to parse. On return, it contains string with the token removed. Its syntax must be C (fixed-length character), UN (Unicode), or V (variable-length character) and its semantic type must be S (string).
• The input string for TOKEN must be a local variable or a field of a table.
• TOKEN parses string until it encounters a space (' '), a special character, a literal notation (r', R', u', U', x', or X'), or one of the following operators: ¬, &, |, *, /, **, +, -, =, ||, <, >, <=, >=, or ¬=. It then returns the first token and the string with the token removed. If string begins with an operator, the operator is the token returned.
• Valid tokens are: identifiers, positive numbers, quoted strings, Unicode literals, raw data literals, hexadecimal literals, operators, and special characters. For additional information about these valid tokens, refer to TIBCO Object Service Broker Parameters.
•
• If string is of syntax UN and the token to be returned contains any character that cannot be coerced to syntax V, token_string is a Unicode literal representing the value of the token.
Raised if there are unmatched quotation marks in the argument string.
If TOKEN_EXAMPLE2 is run with the argument 10-12-2000, the following message log is produced:
The following rules retrieve the keywords for a table, separate the keywords, and insert the name of the table associated with the keyword in a table instance for the keyword.
The second table, TKEYWORDINDEX, is parameterized by KEYWORD. Each table instance lists the table names that have the parameter value as a keyword. An example is shown here.
The parent rule is KEYWORD_PARSE. It retrieves each occurrence of the TABLE_KEYWORD table, and calls the KEYWORD_INDEX rule. The arguments for KEYWORD_INDEX are:
• The name of the table that is stored in the TABLE field of the TABLE_KEYWORD table.
KEYWORD_INDEX checks for valid keywords, and then inserts the table name into the TKEYWORDINDEX table. It also uses TOKEN to extract the next keyword.
The result of running KEYWORD_PARSE against the table TABLE_KEYWORD is a TKEYWORDINDEX table with table instances such as DEPARTMENT, MANAGER, and NAME. If you browse the NAME table instance of the TKEYWORDINDEX table, you see the following:
![]() |
Copyright © Cloud Software Group, Inc. All Rights Reserved |