DQ.PARSE Function

Parses a string.

Category: Data Quality

Syntax

DQ.PARSE(definition, string)

Required Arguments

definition

a string representing the parsed data.

returns

the number of tokens.

string

the input string to be parsed into tokens.

Details

The DQ.PARSE function parses the input string into tokens. The first parameter is the name of the QKB parse definition. The second parameter is the string from which the tokens are parsed. This returns the number of tokens created. It returns 0 if it fails.

Example

/* Parse (using QKB CI 2013A) */
o = dq.parse("Name", "Mr. John Q Public Sr")
 
/* print all of the tokens available */
print (o & " tokens filled")
for i = 1 to o
begin
     dq.token(i, output)
     print ("token #" & i & " = " & output)
     dq.value(i, output)
     print ("value #" & i & " = " & output)
end
 
/* Get a token value by the name. */
dq.tokenvalue("Given Name", output)
print ("Given Name= " & output)