Returns a parsed character value and a status flag.
Valid in: DATA step, PROC SQL, and SCL
Restriction: Always use the DQPARSETOKENGET function to extract tokens from parsed values. To extract tokens from values that do not contain delimiters, use the DQTOKEN function.
Requirement: If specified, the locale must be loaded into memory as part of the locale list.


CALL DQPARSE ( parse-string, parse-definition, 'parse-result, parse-return-code
<, 'locale '>)

Required Arguments

the input value that is parsed according to the specified parse definition. The value must be the name of a character variable, or a character value in quotation marks. Also valid, an expression that evaluates to a variable name or quoted value.
the name of the parse definition. The definition must exist in the locale that is used.
an output character variable that receives the result of the parse operation.
an output numeric variable that returns 1 when the parse operation is successful. Otherwise, this variable receives a 0.

Optional Argument

specifies a character constant, variable, or expression that contains the locale name.
Default:The default locale is the first locale in the locale list. If no value is specified, the default locale is used.


The DQPARSE CALL routine returns a parsed character value and a return code into separate variables. The parsed character value contains delimiters that identify the elements in the value that correspond to the tokens that are enabled by the parse definition. The delimiters in the value allow functions such as DQPARSETOKENGET to access the elements in the value based on specified token names.

Example: DQPARSE CALL Routine

The following example parses the name of an individual.
data a;
    length parsename $ 40;
    call dqparse (name, 'Name', parsename, solution);
    if solution= 1 then
      put 'found solution';
      put 'no solution';