DQGENDER Function

Returns a gender determination from the name of an individual.

Valid in: DATA step, PROC SQL, and SCL
Requirement: The specified locale must be loaded into memory as part of the locale list.

Syntax

Required Arguments

char

specifies a character constant, variable, or expression that contains the value that is evaluated to determine the gender.

gender-analysis-definition

specifies the gender analysis definition, which must exist in the specified locale. The value must be the name of a character variable, in quotation marks. An expression that evaluates to a variable name, or a quoted value is also valid.

You can run the %DQPUTLOC autocall macro to determine which gender definitions are present in your Quality Knowledge Base.

Optional Argument

locale

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.

Details

The DQGENDER function evaluates the name of an individual to determine the gender of that individual. If the evaluation finds substantial clues that indicate gender, the function returns a value that indicates that the gender is female or male. If the evaluation is inconclusive, the function returns a value that indicates that the gender is unknown. The exact return value is determined by the specified gender analysis definition and locale.

Example: DQGENDER Function

The following example returns the value M for the variable GENDER.
gender=dqGender('Mr. John B. Smith', 'Gender', 'ENUSA');
The gender-analysis-definition must exist in the specified locale. Because recent versions of the locales use the variable NAME instead of GENDER, this example could also be coded as follows:
gender=dqGender('Mr. John B. Smith', 'Name', 'ENUSA');

See Also