Data Cart

Your data extract

0 variables
0 samples
View Cart
MIGRATE5
Migration status, 5 years

Codes and Frequencies



Can't find the category you are looking for? Try the Detailed codes

Explore how IPUMS created this variable

Download


      class Migrate5 : public Editor {

public:
  Migrate5(VarPointer varInfo) : Editor(varInfo) {}
  void edit() {

    long a = getRecoded();
    switch (dataSet) {
    case dataset_id::br1991a: {
      if (a != 11 && BR1991A_0430() != 0 && BR1991A_0430() <= 54 &&
          BR1991A_0425() < 5 && BR1991A_0425() != 99)
        a = 20;
      if (BR1991A_0415() < 5 && BR1991A_0430() == 0)
        a = 0;
    } break;
    case dataset_id::br2000a: {
      if ((BR2000A_0453() == 4 || BR2000A_0453() == 3) &&
          BR2000A_0449() != 999 && BR2000A_0449() < 5)
        a = 20;
      if (BR2000A_0415() < 5)
        a = 0;
    } break;
    case dataset_id::co1985a: {
      if (CO1985A_0409() == 2 && MIGCO2() != CO1985A_0001(0))
        a = 20;
    } break;
    case dataset_id::co1993a: {
      if (CO1993A_0417() == 2 && MIGCO2() != CO1993A_0001(0))
        a = 20;
    } break;
    case dataset_id::cl1970a: {
      if (AGE() < 5)
        a = 0;
    } break;
    case dataset_id::cl1982a: {
      a = 10;
      if (MIGCL3() != GEO2B_CL(0))
        a = 20;
      if (CL1982A_0404() >= 700 && CL1982A_0404() <= 965)
        a = 30;
      if (CL1982A_0404() == 0)
        a = 0;
    } break;
    case dataset_id::cl1992a: {
      a = 10;
      if (MIGCL3() != GEO2B_CL(0))
        a = 20;
      if (CL1992A_0433() >= 700 && CL1992A_0433() <= 998)
        a = 30;
      if (CL1992A_0433() >= 10 && CL1992A_0433() <= 130 ||
          CL1992A_0433() == 999)
        a = 99;
      if (CL1992A_0433() == 0)
        a = 0;
    } break;
    case dataset_id::cl2002a: {
      if (CL2002A_0414() == 2 && GEO2B_CL(0) != MIGCL3())
        a = 20;
    } break;
    case dataset_id::cr1973a: {
      if (CR1973A_0406() == 2 && CR1973A_0010(0) != MIGCR2())
        a = 20;
    } break;
    case dataset_id::cr1984a: {
      if (CR1984A_0409() == 2 && CR1984A_0012(0) != MIGCR2())
        a = 20;
    } break;
    case dataset_id::cr2000a: {
      if (CR2000A_0414() == 2 && CR2000A_0017(0) != MIGCR2())
        a = 20;
    } break;
    case dataset_id::ec1990a: {
      if (EC1990A_0425() <= 30 && MIGEC2() != GEO1B_EC(0))
        a = 20;
      if (AGE() < 5)
        a = 0;
    } break;
    case dataset_id::ec2001a: {
      if ((EC2001A_0419() <= 22 || EC2001A_0419() == 90) &&
          MIGEC2() != GEO1B_EC(0))
        a = 20;
    } break;
    case dataset_id::za2001a: {
      if (ZA2001A_0425() <= 9 && MIGZA2() != ZA2001A_0014(0))
        a = 20;
      if (ZA2001A_0425() <= 9 && ZA2001A_0014(0) == 9)
        a = 99;
      if (AGE() < 5)
        a = 0;
    } break;
    case dataset_id::mx1990a: {
      if (MX1990A_0406() >= 1 && MX1990A_0406() <= 32 &&
          MX1990A_0406() == MX1990A_0003(0))
        a = 10;
    } break;
    case dataset_id::mx2000a: {
      if (MX2000A_0420() >= 1 && MX2000A_0420() <= 32 &&
          MX2000A_0420() == MX2000A_0001())
        a = 10;
      if (MX2000A_0420() >= 1 && MX2000A_0420() <= 32 &&
          MX2000A_0420() == MX2000A_0001() &&
          MX2000A_0422() == MX2000A_0002() % 1000)
        a = 11;
      if (MX2000A_0420() >= 1 && MX2000A_0420() <= 32 &&
          MX2000A_0420() == MX2000A_0001() &&
          MX2000A_0422() != MX2000A_0002() % 1000)
        a = 12;
    } break;
    case dataset_id::us1990a: {
      if (US1990A_0479() == 2 && US1990A_0480() > 0 && US1990A_0480() <= 56 &&
          US1990A_0480() == US1990A_0010(0))
        a = 10;
      if (US1990A_0479() == 2 && US1990A_0480() > 0 && US1990A_0480() <= 56 &&
          US1990A_0480() != US1990A_0010(0))
        a = 20;
      if (US1990A_0479() == 2 && US1990A_0480() > 99)
        a = 30;
    } break;
    case dataset_id::us2000a: {
      if (US2000A_0475() == 2 && US2000A_0476() > 0 && US2000A_0476() <= 56 &&
          US2000A_0476() == US2000A_0010(0))
        a = 10;
      if (US2000A_0475() == 2 && US2000A_0476() > 0 && US2000A_0476() <= 56 &&
          US2000A_0476() != US2000A_0010(0))
        a = 20;
    } break;
    case dataset_id::ph2000a: {
      if (PH2000A_0427() >= 1 && PH2000A_0427() <= 83 &&
          PH2000A_0427() == PH2000A_0023(0))
        a = 12;
    } break;
    case dataset_id::ar1970a: {
      if (AR1970A_0408() >= 1 && AR1970A_0408() <= 24 &&
          AR1970A_0408() != AR1970A_0030(0))
        a = 20;
    } break;
    case dataset_id::ar1980a: {
      int d = AR1980A_0027(0);
      int e = AR1980A_0405();
      if (d == 2 && e == 1)
        a = 10;
      else if (d == 4 && e == 2)
        a = 10;
      else if (d == 6 && e >= 3 && e <= 7)
        a = 10;
      else if (d == 10 && e >= 8 && e <= 9)
        a = 10;
      else if (d == 14 && e >= 10 && e <= 12)
        a = 10;
      else if (d == 18 && e >= 13 && e <= 15)
        a = 10;
      else if (d == 22 && e >= 17 && e <= 18)
        a = 10;
      else if (d == 26 && e >= 19 && e <= 21)
        a = 10;
      else if (d == 30 && e >= 22 && e <= 24)
        a = 10;
      else if (d == 34 && e >= 25 && e <= 26)
        a = 10;
      else if (d == 38 && e >= 27 && e <= 29)
        a = 10;
      else if (d == 42 && e >= 30 && e <= 31)
        a = 10;
      else if (d == 46 && e >= 32 && e <= 33)
        a = 10;
      else if (d == 50 && e >= 34 && e <= 36)
        a = 10;
      else if (d == 54 && e >= 37 && e <= 38)
        a = 10;
      else if (d == 58 && e >= 39 && e <= 40)
        a = 10;
      else if (d == 62 && e >= 41 && e <= 43)
        a = 10;
      else if (d == 66 && e >= 44 && e <= 45)
        a = 10;
      else if (d == 70 && e >= 46 && e <= 47)
        a = 10;
      else if (d == 74 && e >= 48 && e <= 50)
        a = 10;
      else if (d == 78 && e >= 51 && e <= 52)
        a = 10;
      else if (d == 82 && e >= 53 && e <= 56)
        a = 10;
      else if (d == 86 && e >= 57 && e <= 59)
        a = 10;
      else if (d == 90 && e >= 60 && e <= 62)
        a = 10;
      else if (d == 94)
        a = 99;
    } break;
    case dataset_id::il1983a: {
      if (IL1983A_0416() <= 85 && IL1983A_0416() != IL1983A_0029(0))
        a = 20;
    } break;
    case dataset_id::pt1991a: {
      int b = PT1991A_0423();
      int c = PT1991A_0024(0);
      if (PT1991A_0421() == 22) {
        if (b == 11111 && c != 11111)
          a = 20;
        if (b == 11112 && c != 11112)
          a = 20;
        if (b == 11113 && c != 11113)
          a = 20;
        if (b == 11114 && c != 11114)
          a = 20;
        if (b == 11115 && c != 11115)
          a = 20;
        if (b == 11116 && c != 11116)
          a = 20;
        if (b == 11117 && c != 11117)
          a = 20;
        if (b == 11118 && c != 11118)
          a = 20;
        if (b == 15150 && c != 15150)
          a = 20;
        if (b == 16161 && c != 16161)
          a = 20;
        if (b == 16162 && c != 16162)
          a = 20;
        if (b == 16163 && c != 16163)
          a = 20;
        if (b == 16165 && c != 16165)
          a = 20;
        if (b == 16166)
          a = 99;
        if (b == 16167)
          a = 99;
        if (b == 16168)
          a = 99;
        if (b == 16169)
          a = 99;
        if (b == 16170)
          a = 99;
        if (b == 16171 && c != 16171)
          a = 99;
        if (b == 16172 && c != 16172)
          a = 20;
        if (b == 17171 && c != 17171)
          a = 20;
        if (b == 17172 && c != 17172)
          a = 20;
        if (b == 18181)
          a = 99;
        if (b == 18182)
          a = 99;
        if (b == 18183)
          a = 99;
        if (b == 18184)
          a = 99;
        if (b == 18185 && c != 18185)
          a = 20;
        if (b == 20200 && c != 20200)
          a = 20;
        if (b == 30300 && c != 30300)
          a = 20;
      }
    } break;
    case dataset_id::pt2001a: {
      int b = PT2001A_0426();
      int c = PT2001A_0024(0);
      if (PT2001A_0425() == 3) {
        if (b == 11111 && c != 11111)
          a = 20;
        if (b == 11112 && c != 11112)
          a = 20;
        if (b == 11113 && c != 11113)
          a = 20;
        if (b == 11114 && c != 11114)
          a = 20;
        if (b == 11115 && c != 11115)
          a = 20;
        if (b == 11116 && c != 11116)
          a = 20;
        if (b == 11117 && c != 11117)
          a = 20;
        if (b == 11118 && c != 11118)
          a = 20;
        if (b == 15150 && c != 15150)
          a = 20;
        if (b == 16161 && c != 16161)
          a = 20;
        if (b == 16162 && c != 16162)
          a = 20;
        if (b == 16163 && c != 16163)
          a = 20;
        if (b == 16165 && c != 16165)
          a = 20;
        if (b == 16166)
          a = 99;
        if (b == 16167)
          a = 99;
        if (b == 16168)
          a = 99;
        if (b == 16169)
          a = 99;
        if (b == 16170)
          a = 99;
        if (b == 16171 && c != 16171)
          a = 99;
        if (b == 16172 && c != 16172)
          a = 20;
        if (b == 17171 && c != 17171)
          a = 20;
        if (b == 17172 && c != 17172)
          a = 20;
        if (b == 18181)
          a = 99;
        if (b == 18182)
          a = 99;
        if (b == 18183)
          a = 99;
        if (b == 18184)
          a = 99;
        if (b == 18185 && c != 18185)
          a = 20;
        if (b == 20200 && c != 20200)
          a = 20;
        if (b == 30300 && c != 30300)
          a = 20;
      }
    } break;
    case dataset_id::co2005a: {
      if (CO2005A_0418() == 2 && CO2005A_0419() < 99 &&
          CO2005A_0419() != CO2005A_0029(0))
        a = 20;
    } break;
    case dataset_id::gh2000a: {
      if (GH2000A_0412() == GH2000A_0030(0))
        a = 11;
      if (GH2000A_0412() != GH2000A_0030(0) &&
          GH2000A_0411() == GH2000A_0029(0))
        a = 12;
    } break;
    case dataset_id::mx1995a: {
      if (MX1995A_0415() == MX1995A_0020(0))
        a = 11;
      if (MX1995A_0415() != MX1995A_0020(0) &&
          MX1995A_0414() == MX1995A_0019(0))
        a = 12;
    } break;
    case dataset_id::mx2005a: {
      if (MX2005A_0413() == MX2005A_0024(0))
        a = 10;
    } break;
    case dataset_id::my1991a: {
      if (MY1991A_0421() == MY1991A_0022(0))
        a = 11;
      if (MY1991A_0421() != MY1991A_0022(0) &&
          MY1991A_0420() == MY1991A_0021(0))
        a = 12;
      if (MY1991A_0406() < 5)
        a = 0;
    } break;
    case dataset_id::my2000a: {
      if (MY2000A_0413() == MY2000A_0022(0))
        a = 11;
      if (MY2000A_0413() != MY2000A_0022(0) &&
          MY2000A_0412() == MY2000A_0021(0))
        a = 12;
      if (MY2000A_0403() < 5)
        a = 0;
    } break;
    case dataset_id::bo1976a: {
      int b = BO1976A_0405();
      int c = BO1976A_0406();
      if (b == c) {
        if (b <= 999 && b != 100 && b != 200 && b != 300 && b != 400 &&
            b != 500 && b != 600 && b != 700 && b != 800 && b != 900)
          a = 11;
        if (b == 100 || b == 200 || b == 300 || b == 400 || b == 500 ||
            b == 600 || b == 700 || b == 800 || b == 900)
          a = 10;
      } else if ((b >= 101 && b <= 110 && (c >= 101 && c <= 110)) ||
                 (b >= 211 && b <= 228 && (c >= 211 && c <= 228)) ||
                 (b >= 329 && b <= 342 && (c >= 329 && c <= 342)) ||
                 (b >= 443 && b <= 452 && (c >= 443 && c <= 452)) ||
                 (b >= 553 && b <= 567 && (c >= 553 && c <= 567)) ||
                 (b >= 668 && b <= 673 && (c >= 668 && c <= 673)) ||
                 (b >= 774 && b <= 786 && (c >= 774 && c <= 786)) ||
                 (b >= 887 && b <= 894 && (c >= 887 && c <= 894)) ||
                 (b >= 995 && b <= 999 && (c >= 995 && c <= 999)))
        a = 12;
    } break;
    case dataset_id::bo1992a: {
      if (BO1992A_0416() == 2 && BO1992A_0417() > 0 &&
          BO1992A_0418() != BO1992A_0408() && BO1992A_0417() == BO1992A_0407())
        a = 12;
      if (BO1992A_0416() == 2 && BO1992A_0417() > 0 &&
          BO1992A_0418() != BO1992A_0408() && BO1992A_0417() != BO1992A_0407())
        a = 20;
    } break;
    case dataset_id::bo2001a: {
      if (BO2001A_0445() == 2 && BO2001A_0448() != BO2001A_0021(0) &&
          BO2001A_0447() == BO2001A_0020(0))
        a = 12;
      if (BO2001A_0445() == 2 && BO2001A_0448() != BO2001A_0021(0) &&
          BO2001A_0447() != BO2001A_0020(0) && BO2001A_0447() < 98)
        a = 20;
    } break;
    case dataset_id::mn2000a: {
      if (MN2000A_0406() < 5)
        a = 0;
    } break;
    case dataset_id::np2001a: {
      if (NP2001A_0452() >= 1 && NP2001A_0452() <= 14 &&
          NP2001A_0452() != NP2001A_0048(0))
        a = 20;
    } break;
    case dataset_id::pe2007a: {
      a = 11;
      if (PE2007A_0458() != PE2007A_0020(0) && PE2007A_0458() < 99)
        a = 20;
      if (PE2007A_0458() == PE2007A_0020(0) &&
          PE2007A_0415() != PE2007A_0021(0) && PE2007A_0415() < 9999)
        a = 12;
      if (PE2007A_0414() < 9999)
        a = 30;
      if (PE2007A_0403() < 5)
        a = 0;
    } break;
    case dataset_id::sn1988a: {
      if (MIGSN1() >= 11 && MIGSN1() <= 149 && MIGSN1() == SN1988A_0063(0))
        a = 11;
      else if (MIGSN1() >= 11 && MIGSN1() <= 149 && MIGSN1() != SN1988A_0063(0))
        a = 12;
    } break;
    case dataset_id::sn2002a: {
      if (SN2002A_0411() > 0 && SN2002A_0411() == SN2002A_0021(0))
        a = 11;
      else if (SN2002A_0411() > 0 && (SN2002A_0411() - SN2002A_0021(0) >= -3 &&
                                      SN2002A_0411() - SN2002A_0021(0) <= 3))
        a = 12;
      if (SN2002A_0404() < 5)
        a = 0;
    } break;
    case dataset_id::ma2004a: {
      a = 20;
      if (MA2004A_0444() == MA2004A_0021(0) && MIGMA2() == GEO2B_MA(0))
        a = 11;
      if (MA2004A_0444() == 90)
        a = 11;
      else if (MA2004A_0444() == MA2004A_0021(0) && MIGMA2() != GEO2B_MA(0))
        a = 12;
      if (MIGMA2() == 90000)
        a = 30;
      if (MA2004A_0444() == 99)
        a = 99;
      if (AGE() < 5)
        a = 0;
    } break;
    case dataset_id::id1976a: {
      if (ID1976A_0421() == 2 && MIGID2() == GEO1B_ID(0))
        a = 12;
      if (ID1976A_0423() == 998)
        a = 30;
    } break;
    case dataset_id::id1980a: {
      if (ID1980A_0413() == ID1980A_0019(0))
        a = 10;
    } break;
    case dataset_id::id1985a: {
      if (ID1985A_0417() == ID1985A_0017(0))
        a = 11;
      if (ID1985A_0416() == ID1985A_0016(0) &&
          ID1985A_0417() != ID1985A_0017(0))
        a = 12;
    } break;
    case dataset_id::id1990a: {
      if (ID1990A_0416() == ID1990A_0019(0))
        a = 10;
    } break;
    case dataset_id::id1995a: {
      if (AGE() < 5)
        a = 0;
      if ((ID1995A_0422() - 99) / 100 == ID1995A_0016(0))
        a = 10;
      else if (ID1995A_0422() == ID1995A_0017(0))
        a = 11;
      else if (ID1995A_0421() == ID1995A_0016(0) &&
               ID1995A_0422() != ID1995A_0017(0))
        a = 12;
    } break;
    case dataset_id::id2000a: {
      if ((ID2000A_0413() - 99) / 100 == ID2000A_0022(0))
        a = 10;
      else if (ID2000A_0413() == ID2000A_0023(0))
        a = 11;
      else if (ID2000A_0412() == ID2000A_0022(0) &&
               ID2000A_0413() != ID2000A_0023(0))
        a = 12;
    } break;
    case dataset_id::id2005a: {
      if (AGE() < 5)
        a = 0;
      if (ID2005A_0417() == ID2005A_0016(0))
        a = 12;
    } break;
    case dataset_id::id2010a: {
      if (ID2010A_0421() == ID2010A_0022(0))
        a = 11;
      if (ID2010A_0420() == ID2010A_0021(0) &&
          ID2010A_0421() != ID2010A_0022(0))
        a = 12;
    } break;
    case dataset_id::mx2010a: {
      if ((MX2010A_0487() - 99) / 100 == MX2010A_0021(0))
        a = 10;
      else if (MX2010A_0487() == MX2010A_0023(0))
        a = 11;
      else if (MX2010A_0446() == MX2010A_0021(0) &&
               MX2010A_0487() != MX2010A_0023(0))
        a = 12;
    } break;
    case dataset_id::ni1971a: {
      if ((NI1971A_0412() - 99) / 100 == NI1971A_0022(0))
        a = 10;
      else if (NI1971A_0412() == NI1971A_0023(0))
        a = 11;
      else if (NI1971A_0411() == NI1971A_0022(0) &&
               NI1971A_0412() != NI1971A_0023(0))
        a = 12;
    } break;
    case dataset_id::ni1995a: {
      if (NI1995A_0415() == 2 && NI1995A_0417() == NI1995A_0020(0))
        a = 12;
      else if (NI1995A_0415() == 2 && NI1995A_0417() != NI1995A_0020(0))
        a = 20;
    } break;
    case dataset_id::ni2005a: {
      if (NI2005A_0415() == 2 && NI2005A_0458() == NI2005A_0022(0))
        a = 12;
    } break;
    case dataset_id::uy1975a: {
      if (UY1975A_0410() < 20 && UY1975A_0410() == UY1975A_0406())
        a = 10;
    } break;
    case dataset_id::uy1985a: {
      if (UY1985A_0411() < 20 && UY1985A_0411() == UY1985A_0405())
        a = 10;
    } break;
    case dataset_id::uy1996a: {
      if (UY1996A_0410() == 1)
        a = 11;
      if (UY1996A_0411() < 20 && UY1996A_0410() == 2 &&
          UY1996A_0407() == UY1996A_0411())
        a = 12;
    } break;
    case dataset_id::uy2006a: {
      if (UY2006A_0740() == 1)
        a = 11;
    } break;
    case dataset_id::br2010a: {
      if (BR2010A_0427() == BR2010A_0022(0))
        a = 12;
      if (BR2010A_0428() == BR2010A_0024(0))
        a = 11;
      if (BR2010A_0426() == 2)
        a = 30;
      if (BR2010A_0404() < 5)
        a = 0;
    } break;
    case dataset_id::cm2005a: {
      if (CM2005A_0524() == 96)
        a = 99;
      if (CM2005A_0525() < 96 && CM2005A_0525() == CM2005A_0022(0) &&
          CM2005A_0524() < 96 && CM2005A_0524() != CM2005A_0023(0))
        a = 12;
      if (CM2005A_0525() < 96 && CM2005A_0525() != CM2005A_0022(0))
        a = 20;
    } break;
    case dataset_id::ec2010a: {
      if (EC2010A_0431() < 99 && EC2010A_0431() != 88 &&
          EC2010A_0431() != EC2010A_0022(0))
        a = 20;
    } break;
    case dataset_id::fj1976a: {
      if (FJ1976A_0412() < 16 && FJ1976A_0412() != FJ1976A_0029(0))
        a = 20;
    } break;
    case dataset_id::fj1986a: {
      if (FJ1986A_0416() < 16 && FJ1986A_0416() != FJ1986A_0044(0))
        a = 20;
    } break;
    case dataset_id::fj1996a: {
      if (FJ1996A_0416() < 16 && FJ1996A_0416() != FJ1996A_0084(0))
        a = 20;
    } break;
    case dataset_id::fj2007a: {
      if (FJ2007A_0419() < 16 && FJ2007A_0419() != FJ2007A_0024(0))
        a = 20;
    } break;
    case dataset_id::ht1982a: {
      if (HT1982A_0437() == 999 && HT1982A_0402() > 4)
        a = 11;
      if (a != 99 && HT1982A_0437() < 998 && HT1982A_0437() == HT1982A_0035(0))
        a = 11;
      if (a != 99 && HT1982A_0437() < 998 &&
          HT1982A_0437() != HT1982A_0035(0) &&
          HT1982A_0438() == HT1982A_0034(0))
        a = 12;
    } break;
    case dataset_id::ht2003a: {
      if (HT2003A_0464() < 98 && HT2003A_0464() != 1 &&
          HT2003A_0464() == HT2003A_0153(0))
        a = 11;
      if (HT2003A_0464() == 84 && HT2003A_0153(0) == 101 ||
          HT2003A_0464() == 85 && HT2003A_0153(0) == 102)
        a = 11;
      if (HT2003A_0464() < 98 && HT2003A_0464() != 1 &&
          HT2003A_0464() != HT2003A_0153(0) &&
          (HT2003A_0464() - HT2003A_0464() % 10) / 10 == HT2003A_0034(0))
        a = 12;
      if (HT2003A_0034(0) == 10 && HT2003A_0464() >= 84 &&
          HT2003A_0464() <= 85 && HT2003A_0153(0) >= 101 &&
          HT2003A_0153(0) <= 102)
        a = 12;
    } break;
    case dataset_id::do1981a: {
      if (DO1981A_0422() >= 101 && DO1981A_0422() <= 2703 &&
          (DO1981A_0422() - DO1981A_0422() % 100) / 100 == DO1981A_0023(0) &&
          DO1981A_0422() != DO1981A_0024(0))
        a = 12;
      if (DO1981A_0422() >= 101 && DO1981A_0422() <= 2703 &&
          (DO1981A_0422() - DO1981A_0422() % 100) / 100 != DO1981A_0023(0))
        a = 20;
    } break;
    case dataset_id::do2002a: {
      if (DO2002A_0441() >= 1 && DO2002A_0441() <= 32 &&
          DO2002A_0441() == DO2002A_0024(0) &&
          (DO2002A_0442() >= 10101 && DO2002A_0442() <= 91603) &&
          DO2002A_0442() != DO2002A_0027(0))
        a = 12;
      if (DO2002A_0441() >= 1 && DO2002A_0441() <= 32 &&
          DO2002A_0441() != DO2002A_0024(0))
        a = 20;
    } break;
    case dataset_id::do2010a: {
      if (DO2010A_0433() >= 101 && DO2010A_0433() <= 3207 &&
          (DO2010A_0433() - DO2010A_0433() % 100) / 100 == DO2010A_0023(0) &&
          DO2010A_0433() != DO2010A_0024(0))
        a = 12;
      if (DO2010A_0433() >= 101 && DO2010A_0433() <= 3207 &&
          (DO2010A_0433() - DO2010A_0433() % 100) / 100 != DO2010A_0023(0))
        a = 20;
    } break;
    case dataset_id::uy2011a: {
      if (UY2011A_0403() < 5)
        a = 0;
    } break;
    case dataset_id::cr2011a: {
      if ((CR2011A_0432() - CR2011A_0432() % 100) / 100 == CR2011A_0022(0))
        a = 12;
      if (CR2011A_0432() == CR2011A_0023(0))
        a = 11;
      if (CR2011A_0404() < 5)
        a = 0;
    } break;
    case dataset_id::mz1997a: {
      if (MZ1997A_0417() == MZ1997A_0021(0))
        a = 12;
      if (MZ1997A_0418() == MZ1997A_0022(0))
        a = 11;
      if (MZ1997A_0418() >= 1100 && MZ1997A_0418() <= 1105 &&
          MZ1997A_0022(0) >= 1101 && MZ1997A_0022(0) <= 1105)
        a = 11;
      if (a == 12 && (MZ1997A_0418() == 199 || MZ1997A_0418() == 299 ||
                      MZ1997A_0418() == 399 || MZ1997A_0418() == 499 ||
                      MZ1997A_0418() == 599 || MZ1997A_0418() == 699 ||
                      MZ1997A_0418() == 799 || MZ1997A_0418() == 899 ||
                      MZ1997A_0418() == 999 || MZ1997A_0418() == 1099 ||
                      MZ1997A_0418() == 1100))
        a = 10;
    } break;
    case dataset_id::mz2007a: {
      if (MZ2007A_0436() == MZ2007A_0021(0))
        a = 12;
      if (MZ2007A_0437() == MZ2007A_0022(0))
        a = 11;
      if (MZ2007A_0437() == 1100 && MZ2007A_0022(0) >= 1101 &&
          MZ2007A_0022(0) <= 1107)
        a = 11;
      if (a == 12 && (MZ2007A_0437() == 199 || MZ2007A_0437() == 299 ||
                      MZ2007A_0437() == 399 || MZ2007A_0437() == 499 ||
                      MZ2007A_0437() == 599 || MZ2007A_0437() == 699 ||
                      MZ2007A_0437() == 799 || MZ2007A_0437() == 899 ||
                      MZ2007A_0437() == 999 || MZ2007A_0437() == 1099 ||
                      MZ2007A_0437() == 1100))
        a = 10;
      if (MZ2007A_0437() >= 9998 && MZ2007A_0439() < 98)
        a = 30;
    } break;
    case dataset_id::pt2011a: {
      if (PT2011A_0414() == 5 && PT2011A_0415() < 99998 &&
          PT2011A_0415() != PT2011A_0025(0))
        a = 20;
    } break;
    case dataset_id::py1972a: {
      if (PY1972A_0414() == PY1972A_0022(0))
        a = 12;
      if (PY1972A_0415() == PY1972A_0023(0))
        a = 11;
      if (PY1972A_0415() == 0 && PY1972A_0023(0) <= 19)
        a = 11;
      if (a == 12 && (PY1972A_0415() == 199 || PY1972A_0415() == 299 ||
                      PY1972A_0415() == 399 || PY1972A_0415() == 499 ||
                      PY1972A_0415() == 599 || PY1972A_0415() == 699 ||
                      PY1972A_0415() == 799 || PY1972A_0415() == 899 ||
                      PY1972A_0415() == 999 || PY1972A_0415() == 1099 ||
                      PY1972A_0415() == 1199 || PY1972A_0415() == 1299 ||
                      PY1972A_0415() == 1399 || PY1972A_0415() == 1499 ||
                      PY1972A_0415() == 1599))
        a = 10;
    } break;
    case dataset_id::py1982a: {
      if (PY1982A_0408() == PY1982A_0023(0))
        a = 12;
      if (PY1982A_0409() == PY1982A_0024(0))
        a = 11;
      if (PY1982A_0409() == 0 && PY1982A_0024(0) <= 19)
        a = 11;
      if (a == 12 && (PY1982A_0409() == 199 || PY1982A_0409() == 299 ||
                      PY1982A_0409() == 399 || PY1982A_0409() == 499 ||
                      PY1982A_0409() == 599 || PY1982A_0409() == 699 ||
                      PY1982A_0409() == 799 || PY1982A_0409() == 899 ||
                      PY1982A_0409() == 999 || PY1982A_0409() == 1099 ||
                      PY1982A_0409() == 1199 || PY1982A_0409() == 1299 ||
                      PY1982A_0409() == 1399 || PY1982A_0409() == 1499 ||
                      PY1982A_0409() == 1599 || PY1982A_0409() == 1999 ||
                      PY1982A_0409() >= 1699 && PY1982A_0409() <= 1800))
        a = 10;
    } break;
    case dataset_id::py1992a: {
      if (PY1992A_0420() == PY1992A_0023(0))
        a = 12;
      if (PY1992A_0421() == PY1992A_0024(0))
        a = 11;
      if (PY1992A_0421() == 0 && PY1992A_0024(0) <= 18)
        a = 11;
      if (a == 12 && (PY1992A_0421() == 199 || PY1992A_0421() == 299 ||
                      PY1992A_0421() == 399 || PY1992A_0421() == 499 ||
                      PY1992A_0421() == 599 || PY1992A_0421() == 699 ||
                      PY1992A_0421() == 799 || PY1992A_0421() == 899 ||
                      PY1992A_0421() == 999 || PY1992A_0421() == 1099 ||
                      PY1992A_0421() == 1199 || PY1992A_0421() == 1299 ||
                      PY1992A_0421() == 1399 || PY1992A_0421() == 1499 ||
                      PY1992A_0421() == 1599 || PY1992A_0421() == 1699 ||
                      PY1992A_0421() == 1799))
        a = 10;
    } break;
    case dataset_id::py2002a: {
      if (PY2002A_0423() == PY2002A_0021(0))
        a = 12;
      if (PY2002A_0424() == PY2002A_0022(0))
        a = 11;
      if (a == 12 && (PY2002A_0424() == 199 || PY2002A_0424() == 299 ||
                      PY2002A_0424() == 399 || PY2002A_0424() == 499 ||
                      PY2002A_0424() == 599 || PY2002A_0424() == 699 ||
                      PY2002A_0424() == 799 || PY2002A_0424() == 899 ||
                      PY2002A_0424() == 999 || PY2002A_0424() == 1099 ||
                      PY2002A_0424() == 1199 || PY2002A_0424() == 1299 ||
                      PY2002A_0424() == 1399 || PY2002A_0424() == 1499 ||
                      PY2002A_0424() == 1599 || PY2002A_0424() == 1699 ||
                      PY2002A_0424() == 1799))
        a = 10;
      if (PY2002A_0403() < 5)
        a = 0;
    } break;
    case dataset_id::cn2000a: {
      if (CN2000A_0420() == 99 && CN2000A_0451() < 5)
        a = 0;
    } break;
    case dataset_id::tt2000a: {
      if (TT2000A_0414() == 2 && TT2000A_0515() != TT2000A_0517())
        a = 20;
    } break;
    case dataset_id::uy1975x: {
      if (UY1975X_0410() < 20 && UY1975X_0410() == UY1975X_0406())
        a = 10;
    } break;
    case dataset_id::uy1985x: {
      if (UY1985X_0411() < 20 && UY1985X_0411() == UY1985X_0405())
        a = 10;
    } break;
    case dataset_id::uy1996x: {
      if (UY1996X_0410() == 1)
        a = 11;
      if (UY1996X_0411() < 20 && UY1996X_0410() == 2 &&
          UY1996X_0407() == UY1996X_0411())
        a = 12;
    } break;
    case dataset_id::uy2011x: {
      if (UY2011X_0403() < 5)
        a = 0;
    } break;
    case dataset_id::pg1980a: {
      if (PG1980A_0418() == PG1980A_0022(0))
        a = 10;
      if (PG1980A_0419() == PG1980A_0023(0))
        a = 11;
      if (PG1980A_0418() == PG1980A_0022(0) &&
          PG1980A_0419() != PG1980A_0023(0))
        a = 12;
      if (PG1980A_0418() != PG1980A_0022(0) && PG1980A_0418() >= 1 &&
          PG1980A_0418() <= 20)
        a = 20;
    } break;
    case dataset_id::hn1974a: {
      if (HN1974A_0022(0) == HN1974A_0409() &&
          HN1974A_0023(0) == HN1974A_0410())
        a = 11;
      if (HN1974A_0022(0) == HN1974A_0409() &&
          HN1974A_0023(0) != HN1974A_0410() && HN1974A_0410() >= 101 &&
          HN1974A_0410() <= 1899 &&
          (HN1974A_0410() != 199 && HN1974A_0410() != 299 &&
           HN1974A_0410() != 399 && HN1974A_0410() != 499 &&
           HN1974A_0410() != 599 && HN1974A_0410() != 699 &&
           HN1974A_0410() != 799 && HN1974A_0410() != 899 &&
           HN1974A_0410() != 999 && HN1974A_0410() != 1099 &&
           HN1974A_0410() != 1199 && HN1974A_0410() != 1299 &&
           HN1974A_0410() != 1399 && HN1974A_0410() != 1499 &&
           HN1974A_0410() != 1599 && HN1974A_0410() != 1699 &&
           HN1974A_0410() != 1799 && HN1974A_0410() != 1899))
        a = 12;
      if (HN1974A_0022(0) != HN1974A_0409() && HN1974A_0022(0) >= 1 &&
          HN1974A_0022(0) <= 18 && HN1974A_0409() >= 1 && HN1974A_0409() <= 18)
        a = 20;
    } break;
    case dataset_id::hn1988a: {
      if (HN1988A_0022(0) == HN1988A_0412() &&
          HN1988A_0023(0) == HN1988A_0411())
        a = 11;
      if (HN1988A_0022(0) == HN1988A_0412() &&
          HN1988A_0023(0) != HN1988A_0411() && HN1988A_0411() >= 101 &&
          HN1988A_0411() <= 1899 &&
          (HN1988A_0411() != 199 && HN1988A_0411() != 299 &&
           HN1988A_0411() != 399 && HN1988A_0411() != 499 &&
           HN1988A_0411() != 599 && HN1988A_0411() != 699 &&
           HN1988A_0411() != 799 && HN1988A_0411() != 899 &&
           HN1988A_0411() != 999 && HN1988A_0411() != 1099 &&
           HN1988A_0411() != 1199 && HN1988A_0411() != 1299 &&
           HN1988A_0411() != 1399 && HN1988A_0411() != 1499 &&
           HN1988A_0411() != 1599 && HN1988A_0411() != 1699 &&
           HN1988A_0411() != 1799 && HN1988A_0411() != 1899))
        a = 12;
      if (HN1988A_0022(0) != HN1988A_0412() && HN1988A_0022(0) >= 1 &&
          HN1988A_0022(0) <= 18 && HN1988A_0412() >= 1 && HN1988A_0412() <= 18)
        a = 20;
    } break;
    case dataset_id::hn2001a: {
      if (HN2001A_0446() == HN2001A_0022(0) &&
          HN2001A_0445() == HN2001A_0023(0))
        a = 11;
      if (HN2001A_0446() == HN2001A_0022(0) &&
          HN2001A_0445() != HN2001A_0023(0) && HN2001A_0445() >= 101 &&
          HN2001A_0445() <= 1899 &&
          (HN2001A_0445() != 199 && HN2001A_0445() != 299 &&
           HN2001A_0445() != 399 && HN2001A_0445() != 499 &&
           HN2001A_0445() != 599 && HN2001A_0445() != 699 &&
           HN2001A_0445() != 799 && HN2001A_0445() != 899 &&
           HN2001A_0445() != 999 && HN2001A_0445() != 1099 &&
           HN2001A_0445() != 1199 && HN2001A_0445() != 1299 &&
           HN2001A_0445() != 1399 && HN2001A_0445() != 1499 &&
           HN2001A_0445() != 1599 && HN2001A_0445() != 1699 &&
           HN2001A_0445() != 1799 && HN2001A_0445() != 1899))
        a = 12;
      if (HN2001A_0022(0) != HN2001A_0446() && HN2001A_0022(0) >= 1 &&
          HN2001A_0022(0) <= 18 && HN2001A_0446() >= 1 && HN2001A_0446() <= 18)
        a = 20;
    } break;
    case dataset_id::gt1973a: {
      if (GT1973A_0414() <= 2299 && GT1973A_0414() == GT1973A_0027(0))
        a = 11;
      if (GT1973A_0414() <= 2299 &&
          (GT1973A_0414() == 199 || GT1973A_0414() == 299 ||
           GT1973A_0414() == 399 || GT1973A_0414() == 499 ||
           GT1973A_0414() == 599 || GT1973A_0414() == 699 ||
           GT1973A_0414() == 799 || GT1973A_0414() == 899 ||
           GT1973A_0414() == 999 || GT1973A_0414() == 1099 ||
           GT1973A_0414() == 1199 || GT1973A_0414() == 1299 ||
           GT1973A_0414() == 1399 || GT1973A_0414() == 1499 ||
           GT1973A_0414() == 1599 || GT1973A_0414() == 1699 ||
           GT1973A_0414() == 1799 || GT1973A_0414() == 1899 ||
           GT1973A_0414() == 1999 || GT1973A_0414() == 2099 ||
           GT1973A_0414() == 2199 || GT1973A_0414() == 2299))
        a = 99;
      if (GT1973A_0413() <= 22 && GT1973A_0413() != GT1973A_0026(0))
        a = 20;
    } break;
    case dataset_id::gt1981a: {
      if (GT1981A_0421() <= 2299 && GT1981A_0421() == GT1981A_0028(0))
        a = 11;
      if (GT1981A_0420() == GT1981A_0027(0) && GT1981A_0421() <= 2299 &&
          (GT1981A_0421() == 199 || GT1981A_0421() == 299 ||
           GT1981A_0421() == 399 || GT1981A_0421() == 499 ||
           GT1981A_0421() == 599 || GT1981A_0421() == 699 ||
           GT1981A_0421() == 799 || GT1981A_0421() == 899 ||
           GT1981A_0421() == 999 || GT1981A_0421() == 1099 ||
           GT1981A_0421() == 1199 || GT1981A_0421() == 1299 ||
           GT1981A_0421() == 1399 || GT1981A_0421() == 1499 ||
           GT1981A_0421() == 1599 || GT1981A_0421() == 1699 ||
           GT1981A_0421() == 1799 || GT1981A_0421() == 1899 ||
           GT1981A_0421() == 1999 || GT1981A_0421() == 2099 ||
           GT1981A_0421() == 2199 || GT1981A_0421() == 2299))
        a = 99;
      if (GT1981A_0420() <= 22 && GT1981A_0420() != GT1981A_0027(0))
        a = 20;
    } break;
    case dataset_id::gt1994a: {
      if (GT1994A_0414() <= 22 && GT1994A_0414() != GT1994A_0021(0))
        a = 20;
      if (GT1994A_0416() <= 84)
        a = 30;
      if (GT1994A_0401() < 4 && GT1994A_0414() == 99)
        a = 0;
    } break;
    case dataset_id::gt2002a: {
      if (GT2002A_0411() <= 2299 && GT2002A_0411() == GT2002A_0024(0))
        a = 11;
      if (GT2002A_0410() == GT2002A_0023(0) && GT2002A_0411() <= 2299 &&
          (GT2002A_0411() == 199 || GT2002A_0411() == 299 ||
           GT2002A_0411() == 399 || GT2002A_0411() == 499 ||
           GT2002A_0411() == 599 || GT2002A_0411() == 699 ||
           GT2002A_0411() == 799 || GT2002A_0411() == 899 ||
           GT2002A_0411() == 999 || GT2002A_0411() == 1099 ||
           GT2002A_0411() == 1199 || GT2002A_0411() == 1299 ||
           GT2002A_0411() == 1399 || GT2002A_0411() == 1499 ||
           GT2002A_0411() == 1599 || GT2002A_0411() == 1699 ||
           GT2002A_0411() == 1799 || GT2002A_0411() == 1899 ||
           GT2002A_0411() == 1999 || GT2002A_0411() == 2099 ||
           GT2002A_0411() == 2199 || GT2002A_0411() == 2299))
        a = 99;
      if (GT2002A_0410() <= 22 && GT2002A_0410() != GT2002A_0023(0))
        a = 20;
    } break;
    case dataset_id::np2011a: {
      if (NP2011A_0465() <= 14 && NP2011A_0465() != NP2011A_0065(0))
        a = 20;
    } break;
    case dataset_id::bo2012a: {
      if (BO2012A_0432() == 3)
        a = 0;
      if (BO2012A_0433() != BO2012A_0439() && BO2012A_0439() != 99 &&
          BO2012A_0433() < 98)
        a = 20;
      if (BO2012A_0433() == BO2012A_0439() && BO2012A_0439() != 99 &&
          BO2012A_0433() < 98 && BO2012A_0434() != BO2012A_0440() &&
          (BO2012A_0434() != 199 && BO2012A_0434() != 299 &&
           BO2012A_0434() != 399 && BO2012A_0434() != 499 &&
           BO2012A_0434() != 599 && BO2012A_0434() != 699 &&
           BO2012A_0434() != 799 && BO2012A_0434() != 899 &&
           BO2012A_0434() != 999 && BO2012A_0434() < 9998) &&
          (BO2012A_0440() != 199 && BO2012A_0440() != 299 &&
           BO2012A_0440() != 399 && BO2012A_0440() != 499 &&
           BO2012A_0440() != 599 && BO2012A_0440() != 699 &&
           BO2012A_0440() != 799 && BO2012A_0440() != 899 &&
           BO2012A_0440() != 999 && BO2012A_0440() < 9998))
        a = 12;
      if (BO2012A_0433() == BO2012A_0439() && BO2012A_0439() != 99 &&
          BO2012A_0433() < 98 && BO2012A_0434() == BO2012A_0440() &&
          (BO2012A_0434() != 199 && BO2012A_0434() != 299 &&
           BO2012A_0434() != 399 && BO2012A_0434() != 499 &&
           BO2012A_0434() != 599 && BO2012A_0434() != 699 &&
           BO2012A_0434() != 799 && BO2012A_0434() != 899 &&
           BO2012A_0434() != 999 && BO2012A_0434() < 9998) &&
          (BO2012A_0440() != 199 && BO2012A_0440() != 299 &&
           BO2012A_0440() != 399 && BO2012A_0440() != 499 &&
           BO2012A_0440() != 599 && BO2012A_0440() != 699 &&
           BO2012A_0440() != 799 && BO2012A_0440() != 899 &&
           BO2012A_0440() != 999 && BO2012A_0440() < 9998))
        a = 11;
      if (BO2012A_0433() == BO2012A_0439() && BO2012A_0439() != 99 &&
          BO2012A_0433() < 98 &&
          (BO2012A_0434() == 199 || BO2012A_0434() == 299 ||
           BO2012A_0434() == 399 || BO2012A_0434() == 499 ||
           BO2012A_0434() == 599 || BO2012A_0434() == 699 ||
           BO2012A_0434() == 799 || BO2012A_0434() == 899 ||
           BO2012A_0434() == 999 || BO2012A_0440() == 199 ||
           BO2012A_0440() == 299 || BO2012A_0440() == 399 ||
           BO2012A_0440() == 499 || BO2012A_0440() == 599 ||
           BO2012A_0440() == 699 || BO2012A_0440() == 799 ||
           BO2012A_0440() == 899 || BO2012A_0440() == 999))
        a = 10;
      if (BO2012A_0433() == 98)
        a = 99;
    } break;
    case dataset_id::il2008a: {
      if (IL2008A_0430() == 2)
        a = 30;
    } break;
    case dataset_id::mu1990a: {
      if (MU1990A_0453() != MU1990A_0452() && MU1990A_0452() >= 0 &&
          MU1990A_0452() <= 9 && MU1990A_0453() >= 0 && MU1990A_0453() <= 9)
        a = 20;
      if (MU1990A_0453() == MU1990A_0452() &&
          MU1990A_0410() != MU1990A_0406() && MU1990A_0452() >= 0 &&
          MU1990A_0452() <= 9 && MU1990A_0453() >= 0 && MU1990A_0453() <= 9 &&
          (MU1990A_0406() != 99 && MU1990A_0406() != 199 &&
           MU1990A_0406() != 299 && MU1990A_0406() != 399 &&
           MU1990A_0406() != 499 && MU1990A_0406() != 599 &&
           MU1990A_0406() != 699 && MU1990A_0406() != 799 &&
           MU1990A_0406() != 899 && MU1990A_0406() != 999 &&
           MU1990A_0410() != 99 && MU1990A_0410() != 199 &&
           MU1990A_0410() != 299 && MU1990A_0410() != 399 &&
           MU1990A_0410() != 499 && MU1990A_0410() != 599 &&
           MU1990A_0410() != 699 && MU1990A_0410() != 799 &&
           MU1990A_0410() != 899 && MU1990A_0410() != 999))
        a = 12;
      if (MU1990A_0453() == MU1990A_0452() &&
          (MU1990A_0406() == 99 || MU1990A_0406() == 199 ||
           MU1990A_0406() == 299 || MU1990A_0406() == 399 ||
           MU1990A_0406() == 499 || MU1990A_0406() == 599 ||
           MU1990A_0406() == 699 || MU1990A_0406() == 799 ||
           MU1990A_0406() == 899 || MU1990A_0410() == 99 ||
           MU1990A_0410() == 199 || MU1990A_0410() == 299 ||
           MU1990A_0410() == 399 || MU1990A_0410() == 499 ||
           MU1990A_0410() == 599 || MU1990A_0410() == 699 ||
           MU1990A_0410() == 799 || MU1990A_0410() == 899 ||
           MU1990A_0410() == 999))
        a = 10;
      if (MU1990A_0452() == 99)
        a = 99;
      if (MU1990A_0452() >= 91 && MU1990A_0452() <= 95)
        a = 0;
    } break;
    case dataset_id::mu2000a: {
      if (MU2000A_0412() != MU2000A_0406() && MU2000A_0412() >= 0 &&
          MU2000A_0412() <= 31 && MU2000A_0406() >= 0 && MU2000A_0406() <= 31)
        a = 20;
      if (MU2000A_0412() == MU2000A_0406() && MU2000A_0412() >= 0 &&
          MU2000A_0412() <= 31 && MU2000A_0406() >= 0 && MU2000A_0406() <= 31 &&
          MU2000A_0407() != MU2000A_0413() &&
          (MU2000A_0407() != 1199 && MU2000A_0407() != 1299 &&
           MU2000A_0407() != 1399 && MU2000A_0407() != 1499 &&
           MU2000A_0407() != 1599 && MU2000A_0407() != 1699 &&
           MU2000A_0407() != 1799 && MU2000A_0407() != 1899 &&
           MU2000A_0407() != 1999 && MU2000A_0407() != 2099 &&
           MU2000A_0407() != 2199 && MU2000A_0413() != 1199 &&
           MU2000A_0413() != 1299 && MU2000A_0413() != 1399 &&
           MU2000A_0413() != 1499 && MU2000A_0413() != 1599 &&
           MU2000A_0413() != 1699 && MU2000A_0413() != 1799 &&
           MU2000A_0413() != 1899 && MU2000A_0413() != 1999 &&
           MU2000A_0413() != 2099 && MU2000A_0413() != 2199))
        a = 12;
      if (MU2000A_0412() == MU2000A_0406() &&
          (MU2000A_0407() == 1199 || MU2000A_0407() == 1299 ||
           MU2000A_0407() == 1399 || MU2000A_0407() == 1499 ||
           MU2000A_0407() == 1599 || MU2000A_0407() == 1699 ||
           MU2000A_0407() == 1799 || MU2000A_0407() == 1899 ||
           MU2000A_0407() == 1999 || MU2000A_0407() == 2099 ||
           MU2000A_0407() == 2199 || MU2000A_0413() == 1199 ||
           MU2000A_0413() == 1299 || MU2000A_0413() == 1399 ||
           MU2000A_0413() == 1499 || MU2000A_0413() == 1599 ||
           MU2000A_0413() == 1699 || MU2000A_0413() == 1799 ||
           MU2000A_0413() == 1899 || MU2000A_0413() == 1999 ||
           MU2000A_0413() == 2099 || MU2000A_0413() == 2199))
        a = 10;
      if (MU2000A_0406() == 98)
        a = 99;
      if (MU2000A_0406() >= 91 && MU2000A_0406() <= 97)
        a = 0;
    } break;
    case dataset_id::mu2011a: {
      if (MU2011A_0421() != MU2011A_0410() && MU2011A_0421() >= 11 &&
          MU2011A_0421() <= 31 && MU2011A_0410() >= 11 && MU2011A_0410() <= 31)
        a = 20;
      if (MU2011A_0421() == MU2011A_0410() && MU2011A_0421() >= 11 &&
          MU2011A_0421() <= 31 && MU2011A_0410() >= 11 &&
          MU2011A_0410() <= 31 && MU2011A_0409() != MU2011A_0420() &&
          (MU2011A_0409() != 1199 && MU2011A_0409() != 1299 &&
           MU2011A_0409() != 1399 && MU2011A_0409() != 1499 &&
           MU2011A_0409() != 1599 && MU2011A_0409() != 1699 &&
           MU2011A_0409() != 1799 && MU2011A_0409() != 1899 &&
           MU2011A_0409() != 1999 && MU2011A_0409() != 2099 &&
           MU2011A_0409() != 2199 && MU2011A_0420() != 1199 &&
           MU2011A_0420() != 1299 && MU2011A_0420() != 1399 &&
           MU2011A_0420() != 1499 && MU2011A_0420() != 1599 &&
           MU2011A_0420() != 1699 && MU2011A_0420() != 1799 &&
           MU2011A_0420() != 1899 && MU2011A_0420() != 1999 &&
           MU2011A_0420() != 2099 && MU2011A_0420() != 2199))
        a = 12;
      if (MU2011A_0421() == MU2011A_0410() &&
          (MU2011A_0409() == 1199 || MU2011A_0409() == 1299 ||
           MU2011A_0409() == 1399 || MU2011A_0409() == 1499 ||
           MU2011A_0409() == 1599 || MU2011A_0409() == 1699 ||
           MU2011A_0409() == 1799 || MU2011A_0409() == 1899 ||
           MU2011A_0409() == 1999 || MU2011A_0409() == 2099 ||
           MU2011A_0409() == 2199 || MU2011A_0420() == 1199 ||
           MU2011A_0420() == 1299 || MU2011A_0420() == 1399 ||
           MU2011A_0420() == 1499 || MU2011A_0420() == 1599 ||
           MU2011A_0420() == 1699 || MU2011A_0420() == 1799 ||
           MU2011A_0420() == 1899 || MU2011A_0420() == 1999 ||
           MU2011A_0420() == 2099 || MU2011A_0420() == 2199))
        a = 10;
      if (MU2011A_0407() == 9)
        a = 99;
      if (MU2011A_0407() == 3)
        a = 0;
    } break;
    case dataset_id::sn2013a: {
      if (SN2013A_0423() != SN2013A_0022() && SN2013A_0423() >= 1 &&
          SN2013A_0423() <= 14)
        a = 20;
      if (SN2013A_0423() == SN2013A_0022() && SN2013A_0423() >= 1 &&
          SN2013A_0423() <= 14 && SN2013A_0424() != SN2013A_0023() &&
          (SN2013A_0424() != 10 && SN2013A_0424() != 20 &&
           SN2013A_0424() != 30 && SN2013A_0424() != 40 &&
           SN2013A_0424() != 50 && SN2013A_0424() != 60 &&
           SN2013A_0424() != 70 && SN2013A_0424() != 80 &&
           SN2013A_0424() != 90 && SN2013A_0424() != 100 &&
           SN2013A_0424() != 110 && SN2013A_0424() != 120 &&
           SN2013A_0424() != 130 && SN2013A_0424() != 140))
        a = 12;
      if (SN2013A_0423() == SN2013A_0022() && SN2013A_0423() >= 1 &&
          SN2013A_0423() <= 14 &&
          (SN2013A_0424() == 10 || SN2013A_0424() == 20 ||
           SN2013A_0424() == 30 || SN2013A_0424() == 40 ||
           SN2013A_0424() == 50 || SN2013A_0424() == 60 ||
           SN2013A_0424() == 70 || SN2013A_0424() == 80 ||
           SN2013A_0424() == 90 || SN2013A_0424() == 100 ||
           SN2013A_0424() == 110 || SN2013A_0424() == 120 ||
           SN2013A_0424() == 130 || SN2013A_0424() == 140))
        a = 10;
    } break;
    case dataset_id::bw2011a: {
      if (BW2011A_0472() >= 1 && BW2011A_0472() <= 6 && BW2011A_0411() == 4)
        a = 0;
      if (BW2011A_0472() >= 1 && BW2011A_0472() <= 6 && BW2011A_0411() == 8)
        a = 99;
    } break;
    case dataset_id::cl2017a: {
      if (CL2017A_0407() == CL2017A_0412())
        a = 11;
      if ((CL2017A_0407() != CL2017A_0412()) &&
          CL2017A_0406() == CL2017A_0411())
        a = 12;
      if (CL2017A_0406() != CL2017A_0411())
        a = 20;
      if (CL2017A_0407() == 1999 || CL2017A_0407() == 2999 ||
          CL2017A_0407() == 3999 || CL2017A_0407() == 4999 ||
          CL2017A_0407() == 5999 || CL2017A_0407() == 6999 ||
          CL2017A_0407() == 7999 || CL2017A_0407() == 8999 ||
          CL2017A_0407() == 9999 || CL2017A_0407() == 10999 ||
          CL2017A_0407() == 11999 || CL2017A_0407() == 12999 ||
          CL2017A_0407() == 13999 || CL2017A_0407() == 14999 ||
          CL2017A_0407() == 15999 || CL2017A_0412() == 1999 ||
          CL2017A_0412() == 2999 || CL2017A_0412() == 3999 ||
          CL2017A_0412() == 4999 || CL2017A_0412() == 5999 ||
          CL2017A_0412() == 6999 || CL2017A_0412() == 7999 ||
          CL2017A_0412() == 8999 || CL2017A_0412() == 9999 ||
          CL2017A_0412() == 10999 || CL2017A_0412() == 11999 ||
          CL2017A_0412() == 12999 || CL2017A_0412() == 13999 ||
          CL2017A_0412() == 14999 || CL2017A_0412() == 15999)
        a = 99;
    } break;
    case dataset_id::sl2015a: {
      if (SL2015A_0416() <= 4208)
        a = 12;
      if (SL2015A_0416() >= 6002 && SL2015A_0416() <= 9000)
        a = 30;
      if (SL2015A_0416() >= 1101 && SL2015A_0416() <= 4208 &&
          SL2015A_0030(0) == SL2015A_0416())
        a = 11;
      if (SL2015A_0416() >= 1101 && SL2015A_0416() <= 4208 &&
          SL2015A_0029(0) != SL2015A_0415())
        a = 20;
    } break;
    }

    setData(a);
  }
};

    

Description

MIGRATE5 indicates the person's place of residence 5 years ago. The first digit records movement across major administrative divisions and countries. The second digit reports movement across minor administrative divisions, for samples in which that detail is available.

Comparability — Index

GENERAL
Argentina
Bolivia
Brazil
Canada
Chile
China
Colombia
Dominican Republic
Ecuador
Fiji
France
Guatemala
Haiti
Indonesia
Israel
Italy
Malaysia
Mauritius
Mexico
Nepal
Nicaragua
Papua New Guinea
Paraguay
Philippines
Portugal
Puerto Rico
South Africa
Switzerland
United States
Uruguay

Comparability — General

This variable is conceptually similar across samples. The data are largely comparable at the first digit: movement between major administrative units or countries. Some samples provide further detail at the second digit, recording movement between minor administrative units.

The major administrative units are as follows:

- Administrative Zone: Nepal
- Canton: Switzerland
- Department: Bolivia, Colombia, Greece, Guatemala, Haiti, Honduras, Nicaragua, Paraguay, Peru, Uruguay
- District: Botswana, Guatemala, Mauritius, Sierra Leone
- Municipality: Puerto Rico
- Province: Argentina, Cameroon, Canada, Chile, China, Costa Rica, Dominican Republic, Ecuador, Fiji, Indonesia, Mongolia, Mozambique, Papua New Guinea, Philippines, Vietnam
- Region: France, Ghana, Italy, Morocco, Senegal, Trinidad and Tobago
South Africa, Spain
- State: Brazil, Malaysia, Mexico, United States.
- Subdistrict: Israel
- Subregion: Portugal

The minor administrative units are:

- Arrondissement: Haiti
- Canton: Costa Rica
- Census Division: Canada 1981-2001
- Chiefdom: Sierra Leone
- Commune / Municipality: Switzerland
- County: Canada 1971, China, United States
- Department: Cameroon, France, Senegal
- District: Ghana, Malaysia, Mozambique, Mauritius, Nepal, Papua New Guinea, Paraguay, Vietnam
- Locality: Argentina, Israel, Uruguay
- Municipality: Brazil, Chile, Colombia, Dominican Republic, Greece, Guatemala, Honduras, Italy, Mexico, Nicaragua, Philippines, Portugal, Spain
- Province: Bolivia, Italy, Morocco, Peru
- Regency / Municipality: Indonesia

The 1994 and 2002 Guatemala samples provide place of residence 4 and 6 years ago, respectively.

The coding for MIGRATE5 corresponds to migration status variables available in other samples: MIGRATE1, MIGRATEP, MIGRATEC, and MIGRATE0. Those variables are conceptually similar to MIGRATE5, but differ in terms of their reference periods.

An alternative weight variable must be used to yield accurate statistics for 1991 Argentina.

Comparability — Argentina [top]

In 1991, roughly half the cases in the sample lack data for this and several other variables. Users should apply the alternative weight variable AR1991A_0434 when using one of these variables.

The 2001 sample identifies persons who moved between localities within their province.

Comparability — Bolivia [top]

The 1992 sample does not have information on whether persons moved from abroad, although this was asked on the census questionnaire. Those cases are coded among the "unknown."

Comparability — Brazil [top]

This variable is comparable across samples.

Comparability — Canada [top]

The classification is consistent, but the administrative unit in 1971 was the county and in the later years was the census division.

Comparability — Chile [top]

The 1970, 2002, and 2017 samples indicate if the person moved between municipalities (comunas) within provinces; 1982 and 1992 samples indicate only inter-province moves.

Comparability — China [top]

In the 2000 sample, Hong Kong, Macau, and Taiwan are categorized with "abroad."

Comparability — Colombia [top]

This variable is generally comparable across samples, but the 1985 sample notes whether inter-departmental moves were from another department's capital. Moves between municipalities refer to the full detail of Colombian municipalities, not to the recoded municipality groupings used in MIGCO4.

For information on whether a person in the 1985 sample was living in the capital of another department 5 years ago, see MIGCAPCO

Comparability — Dominican Republic [top]

Numerous additional municipalities were created between 1981 and 2010; consequently, some proportion of identical migrations would be coded differently in the different Dominican samples in MIGRATE5.

Comparability — Ecuador [top]

The data are generally comparable between samples. Orellana province was new in 2001, and Santo Domingo de los Tsáchilas and Santa Elena were new in 2010.

Comparability — Fiji [top]

NOTE: In the 1976 sample, the census question asked for the province of residence when Fiji gained independence in 1970, thus the reference period was actually 6 years previous rather than 5.

Aside from the reference period issue noted above, the data are generally comparable across samples.

Comparability — France [top]

The variable is available only for the 2006 sample. For other France samples (1962-2011) migration status can be found in MIGRATEC (Migration status, last census) and MIGRATE1 (Migration status, 1 year). The unharmonized source variable retains detail on intra-department and intra-municipality migration, as well as distinguishing EU and non-EU international migration.

Comparability — Guatemala [top]

The reference period differs across samples: residence 4 years ago in 1994; 6 years ago in 2002; and 5 years ago in 1973 and 1981.

Comparability — Haiti [top]

In the 1982 sample, the unknown category includes persons who were residing outside of Haiti 5 years ago.

A new department, Nippes, was created between 1998 and 2003. In the household geography for the 2003 sample, Nippes is composed of the arrondissements of Miragoâne, L'Anse-à-Veau, and Baradères. In the reference period for this migration variable, however, Miragoâne and L'Anse-à-Veau are categorized as being in Grand'Anse; Baradères did not exist at the time. In the integrated variable MGRATE5, persons who reported living in Miragoâne and L'Anse-à-Veau both in 1998 and at the time of the census are coded as "same major, same minor administrative unit." Persons living in one of those arrondissements in 1998 living in a different arrondissement in Nippes in 2003 are coded as "same major, different minor administrative unit." Persons Persons living in one of those arrondissements in 1998 and living in a different arrondissement in Grand'Anse in 2003 are coded as "different major administrative unit."

Comparability — Indonesia [top]

The 1980 and 1990 censuses only identify movements at the provincial level, while all other years provide detail on regency/municipality movements. The 1995 and 2000 samples contain some cases where the regency/municipality of residence was not indicated -- these cases are coded to the more general category.

The 1995 census did not enumerate persons from Kalimantan, Sulawesi, Maluku, or Papua; the 2005 census did not enumerate persons from Aceh. Therefore, migrants to the non-enumerated regions will not be recorded.

Comparability — Israel [top]

The 1995 and 2008 samples identify persons who moved between localities within sub-districts. Only movement between sub-districts is identified in 1983. The age universe for the question changes from 5+ in 1983 to 15+ in 1995 and 2008.

The 1972 sample has information on locality of residence 5 years ago, but we are unable to infer district 5 years ago from the data.

Comparability — Italy [top]

The sample data identify moves between provinces as well as between the regions and municipalities identified in MIGRATE5 (provinces are intermediate units between regions and municipalities). Those intermediate moves are reported in the unharmonized source variable.

Comparability — Malaysia [top]

In the original samples, persons under age five received the mother's migration information. This information is retained in the unharmonized source variables.

Comparability — Mauritius [top]

The 1990, 2000, and 2011 samples only include persons age 5+ with usual residence in Mauritius in their universes.

Comparability — Mexico [top]

The 1995, 2000, 2010, and 2020 samples have greater detail, indicating moves between municipalities that did not cross state boundaries; the 1990 and 2005 samples only identify inter-state migration.

Comparability — Nepal [top]

For the 2011 sample, there is no indication of the Administrative Zone in which the person lived 5 years ago. Therefore, those who indicated to have lived in a different district 5 years ago are integrated as having moved across Administrative Units. This is not the case for the 2001 sample, where it is possible to identify both units 5 years ago.

Comparability — Nicaragua [top]

The samples are comparable. The 1971 sample contains some cases where the municipality of residence in 1966 was not indicated -- these cases are coded to the more general category.

Comparability — Papua New Guinea [top]

In 1980, the census question refers to the province and district of residence 5 years ago, which corresponds to the year of independence for Papua New Guinea (in 1975.)

Comparability — Paraguay [top]

The Paraguay data are fully comparable between samples, identifying moves between departments and districts.

Comparability — Philippines [top]

The Cotabato and Marawi provinces in the 2000 sample are not present in 2010. The 2010 sample contains four new provinces that did not exist in the 2000 sample.

Comparability — Portugal [top]

The period of reference is somewhat more than 5 years in each sample. The 1991, 2001 and 2011 census questions asked for place of residence on December 31 of 1985, 1995, and 2005, respectively. Each of the censuses was taken in April or March.

Comparability — Puerto Rico [top]

The variable is comparable over time - with the exception that the universe in 1980 is restricted to the migration sample. Therefore, this variable's NIU for the 1980 Puerto Rico sample includes both those who do not belong to the migration sample and those in the migration sample who are younger than 5. The variable's NIU for the 1970 sample, instead, includes only persons younger than 5, and contains no migration sample.

Comparability — South Africa [top]

The variable identifies individuals who moved from another province since October 1996. Individuals who changed localities can be identified in a separate unharmonized source variable.

Comparability — Switzerland [top]

The variable is comparable across census years. Additional detail about whether the person lives at the same address is available in the source variable for each sample.

Comparability — United States [top]

The universe for 1980 differs from other years. Only half the persons in the 1980 U.S. sample were coded for purposes of migration; the other half are included in the NIU category.

The amount of geographic detail available varies across samples. 1990 and 2000 report only moves between states, while earlier U.S. samples also record moves between counties within states. The 1990 and 2000 samples, however, has a separate variable indicating whether the person was living in a different house (located anywhere) five years ago. See MIGHOUSE. Persons who lived in the same house are coded in MIGRATE5 as living in the same county.

Comparability — Uruguay [top]

The 1975 and 1985 samples only distinguish movements at the department level (major), whereas the 1996, 2006 and 2011 samples further distinguish localities (minor). From 1975-1996, only persons with a usual residence in Uruguay were included in the universe. The 2006 sample was a survey and only a subset of the population was asked the migration question. See MIGRATEP for additional migration information.

Universe

  • Argentina 1970: Persons age 5+
  • Argentina 1980: Persons age 5+
  • Argentina 1991: Persons age 5+
  • Argentina 2001: Persons age 5+
  • Bolivia 1976: Persons age 5+
  • Bolivia 1992: Persons age 5+
  • Bolivia 2001: Persons age 5+
  • Bolivia 2012: Persons age 5+ with usual residence in Bolivia
  • Botswana 2011: Persons age 5+ with usual residence in Botswana
  • Brazil 1991: Persons age 5+
  • Brazil 2000: Persons age 5+
  • Brazil 2010: Persons age 5+
  • Cameroon 2005: Residents age 5+
  • Canada 1971: Persons age 5+
  • Canada 1981: Persons age 5+
  • Canada 1991: Persons age 5+ in private households
  • Canada 2001: Persons age 5+ in private households
  • Chile 1970: Persons age 5+
  • Chile 1982: Persons age 5+
  • Chile 1992: Persons age 5+
  • Chile 2002: Persons age 5+
  • Chile 2017: Persons age 5+
  • China 1990: Persons age 5+
  • China 2000: Persons age 5+
  • Colombia 1985: Persons age 5+
  • Colombia 1993: Persons age 5+
  • Colombia 2005: Persons age 5+
  • Costa Rica 1973: Persons age 5+
  • Costa Rica 1984: Persons age 5+
  • Costa Rica 2000: Persons age 5+
  • Costa Rica 2011: Persons age 5+
  • Dominican Republic 1981: Persons age 5+
  • Dominican Republic 2002: Persons age 5+
  • Dominican Republic 2010: Persons age 5+
  • Ecuador 1990: Persons age 5+
  • Ecuador 2001: Persons age 5+
  • Ecuador 2010: Persons age 5+
  • Fiji 1976: Persons age 6+
  • Fiji 1986: Persons age 5+
  • Fiji 1996: Persons age 5+
  • Fiji 2007: Persons age 5+
  • France 2006: Persons age 5+
  • Ghana 2000: Persons age 5+
  • Greece 1971: Persons born before 1966
  • Greece 1981: Persons born before 1976
  • Greece 1991: Persons born before 1986
  • Greece 2001: Persons born before 1996
  • Guatemala 1973: Persons age 5+
  • Guatemala 1981: Persons age 5+
  • Guatemala 1994: Persons age 4+
  • Guatemala 2002: Persons age 6+
  • Haiti 1982: Persons age 5+
  • Haiti 2003: Persons age 5+
  • Honduras 1974: Persons age 5+
  • Honduras 1988: Persons age 5+
  • Honduras 2001: Persons age 5+
  • Indonesia 1976: Persons age 5+
  • Indonesia 1980: Persons age 5+
  • Indonesia 1985: Persons age 5+
  • Indonesia 1990: Persons age 5+
  • Indonesia 1995: Persons age 5+
  • Indonesia 2000: Persons age 5+
  • Indonesia 2005: Persons age 5+
  • Indonesia 2010: Persons age 5+ in regular enumeration areas
  • Israel 1983: Persons age 5+
  • Israel 1995: Persons age 15+
  • Israel 2008: Persons age 15+
  • Italy 2011: Persons age 5+
  • Malaysia 1991: Persons age 5+
  • Malaysia 2000: Persons age 5+
  • Mauritius 1990: Persons age 5+ with usual residence in Mauritius
  • Mauritius 2000: Persons age 5+ with usual residence in Mauritius
  • Mauritius 2011: Persons age 5+ with usual residence in Mauritius
  • Mexico 1990: Persons age 5+
  • Mexico 1995: Persons age 5+
  • Mexico 2000: Persons age 5+
  • Mexico 2005: Persons age 5+
  • Mexico 2010: Persons age 5+
  • Mexico 2020: Persons age 5+
  • Mongolia 2000: Persons age 5+
  • Morocco 2004: Persons age 5+
  • Mozambique 1997: Residents age 5+
  • Mozambique 2007: Residents age 5+
  • Nepal 2001: Persons age 5+
  • Nepal 2011: Persons age 5+
  • Nicaragua 1971: Persons age 5+
  • Nicaragua 1995: Persons age 5+
  • Nicaragua 2005: Persons age 5+
  • Papua New Guinea 1980: Persons age 5+ in urban areas
  • Paraguay 1972: Persons age 5+
  • Paraguay 1982: Persons age 5+
  • Paraguay 1992: Persons age 5+
  • Paraguay 2002: Persons age 5+
  • Peru 2007: Persons age 5+
  • Peru 2017: Persons age 5+
  • Philippines 2000: Persons age 5+
  • Philippines 2010: Persons age 5+
  • Portugal 1991: Persons born before 1986
  • Portugal 2001: Persons born before 1996
  • Portugal 2011: Persons born before 2006
  • Puerto Rico 1970: Persons age 5+
  • Puerto Rico 1980: Persons age 5+ in migration sample
  • Senegal 1988: Persons age 5+
  • Senegal 2002: Persons age 5+
  • Senegal 2013: Residents age 5+ in ordinary households
  • Sierra Leone 2015: Persons age 5+
  • South Africa 2001: Persons age 5+
  • Spain 1991: Persons age 5+
  • Switzerland 1970: Persons age 5+
  • Switzerland 1980: Persons age 5+
  • Switzerland 1990: Persons age 5+
  • Switzerland 2000: Persons age 5+
  • Trinidad and Tobago 2000: Persons age 5+
  • United States 1960: Persons age 5+
  • United States 1970: Persons age 5+
  • United States 1980: Persons age 5+ included in the migration sample
  • United States 1990: Persons age 5+
  • United States 2000: Persons age 5+
  • Uruguay 1975: Persons age 5+ with a usual residence in Uruguay
  • Uruguay 1985: Persons age 5+ with a usual residence in Uruguay
  • Uruguay 1996: Persons age 5+ with a usual residence in Uruguay
  • Uruguay 2006: Persons age 6+ in the fourth sample trimester
  • Uruguay 2011: Persons age 5+
  • Vietnam 1989: Persons age 5+
  • Vietnam 1999: Persons age 5+
  • Vietnam 2009: Persons age 5+
  • Vietnam 2019: Persons age 5+

Availability

  • Argentina: 1970, 1980, 1991, 2001
  • Bolivia: 1976, 1992, 2001, 2012
  • Botswana: 2011
  • Brazil: 1991, 2000, 2010
  • Cameroon: 2005
  • Canada: 1971, 1981, 1991, 2001
  • Chile: 1970, 1982, 1992, 2002, 2017
  • China: 1990, 2000
  • Colombia: 1985, 1993, 2005
  • Costa Rica: 1973, 1984, 2000, 2011
  • Dominican Republic: 1981, 2002, 2010
  • Ecuador: 1990, 2001, 2010
  • Fiji: 1976, 1986, 1996, 2007
  • France: 2006
  • Ghana: 2000
  • Greece: 1971, 1981, 1991, 2001
  • Guatemala: 1973, 1981, 1994, 2002
  • Haiti: 1982, 2003
  • Honduras: 1974, 1988, 2001
  • Indonesia: 1976, 1980, 1985, 1990, 1995, 2000, 2005, 2010
  • Israel: 1983, 1995, 2008
  • Italy: 2011
  • Malaysia: 1991, 2000
  • Mauritius: 1990, 2000, 2011
  • Mexico: 1990, 1995, 2000, 2005, 2010, 2020
  • Mongolia: 2000
  • Morocco: 2004
  • Mozambique: 1997, 2007
  • Nepal: 2001, 2011
  • Nicaragua: 1971, 1995, 2005
  • Papua New Guinea: 1980
  • Paraguay: 1972, 1982, 1992, 2002
  • Peru: 2007, 2017
  • Philippines: 2000, 2010
  • Portugal: 1991, 2001, 2011
  • Puerto Rico: 1970, 1980
  • Senegal: 1988, 2002, 2013
  • Sierra Leone: 2015
  • South Africa: 2001
  • Spain: 1991
  • Switzerland: 1970, 1980, 1990, 2000
  • Trinidad and Tobago: 2000
  • United States: 1960, 1970, 1980, 1990, 2000
  • Uruguay: 1975, 1985, 1996, 2006, 2011
  • Vietnam: 1989, 1999, 2009, 2019