Except in the case prescribed in the following paragraph, when the mayor of the municipality makes an entry in a certificate of residence, the mayor is to enter the resident record code most recently entered in that certificate of residence by the mayor of the municipality who most recently made an entry in the certificate of residence of the person pertaining to that entry.
When the mayor of the municipality makes an entry in a certificate of residence for a person who is to be newly recorded in the basic resident register of that municipality, if that person has never been recorded in the basic resident register of any municipality, the mayor is to enter in the certificate of residence pertaining to that person one resident record code selected from among the resident record codes designated by the Agency under Article 30-2, paragraph (1). In this case, the mayor of the municipality is to select and enter a resident record code that is different from the resident record codes entered in the certificates of residence pertaining to persons other than the person pertaining to that entry.
When the mayor of the municipality has entered a resident record code pursuant to the preceding paragraph, the mayor must promptly notify the person pertaining to that entry, in writing, of that fact and of the resident record code.
Read this with the articles around it
resident record codemachine translation
「住民票コード」
The resident record code: a number, symbol or other code, of a form set by Ministry of Internal Affairs and Communications Order (総務省令), entered on each person's certificate of residence (住民票) under Article 7, item (xiii).
Defined inArticle 7, paragraph (1), item (xiii)
the Agencymachine translation
「機構」
The Japan Agency for Local Authority Information Systems (地方公共団体情報システム機構), which designates the resident record codes (住民票コード) municipal mayors may use and keeps the identity confirmation information (本人確認情報) that prefectural governors pass to it.
Short name set inArticle 19-3, paragraph (1)