DQGENDERINFOGET Function

Returns the name of the parse definition that is associated with the specified gender definition.

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

Syntax

DQGENDERINFOGET('gender-analysis-definition' <,'locale'>)

Required Argument

gender-analysis-definition

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

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.

Example: DQGENDERINFOGET Function

The following example writes the parse definition that is associated with GENDER to the SAS log. The parse definition that is returned is then used to display the names of the tokens that are enabled for that parse definition. The tokens are then used to construct a parsed value and write the results of the gender to the log.
/* display the parse definition associated with the */
/* GENDER definition and display the tokens in that */
/* parse definition.                            */
data _null_;
   parseDefn=dqGenderInfoGet('Gender', 'ENUSA');
   tokens=dqParseInfoGet(parseDefn, 'ENUSA');
   put parseDefn= / tokens=;
run;
/* build a parsed value from two tokens and display    */
/* in the log the gender determination for that value. */
data _null_;
   length parsedValue $ 200 gender $ 1;
   parsedValue=dqParseTokenPut(parsedValue, 'Sandi', 'Given Name', 'Name');
   parsedValue=dqParseTokenPut(parsedValue, 'Baker', 'Family Name', 'Name');
   gender=dqGenderParsed(parsedValue, 'Gender');
   put gender=;
run;