SAS Quality Knowledge Base for Contact Information 27

CURP (Validation)

Identification Analysis Definition

CURP (Validation)
Description

The CURP (Validation) identification analysis definition determines if a string is a Unique Population Registry Code (Clave Única de Registro de Población).

Possible Outputs VALID
INVALID
Examples Input Output Comments
ZAZD801124MBSYQN13 VALID  
RUNO390705HSLPTC02 VALID  
IMS120607120 INVALID Too short (only 12 characters)
KAOB750230MASLHJ07 INVALID Invalid date (Feb 30)
EOMR330613FDFPKT08 INVALID Invalid gender (F instead of H or M)
YOOR280801HXXLTK07 INVALID Invalid state (XX is not a state)
EIMV310211MQRPKT1X INVALID Invalid last character (X instead of a value 0-9)
L6NF640805MYNTNN10 INVALID Invalid second character (6 instead of an A-Z value)
MOJL020101HCLKWMXY09 INVALID Too long (over 18 characters)
Remarks

This definition validates on the following criteria:

  • The string is exactly 18 characters in length.
  • Characters 1-4 are alphabetic characters (A-Z, a-z), in a combination that is not deemed offensive.
  • Characters 5-10 are a valid date in YYMMDD format.
  • Character 11 is either H or M, representing the male or female gender respectively.
  • Characters 12-13 are a valid 2-letter Mexican state code, or "NE" for individuals who are foreign-born.
  • Characters 14-16 are alphabetic (A-Z, a-z).
  • Character 17 is alphanumeric (0-9, A-Z, a-z).
  • Character 18 is numeric (0-9).