dBASE.gms : Reads a dBASE table from United Nations Statistics Division

Description

Reads dBASE table:

 Table 2. Population by sex, residence, and intercensal rates of increase
          for total population, each census: 1948-1997
Source:
   United Nations - Demographic Yearbook, Historical supplement. New York, 1999


Category : GAMS Data Utilities library


Main file : dBASE.gms   includes :  dBASE.gms  Table02.dbf

$ontext
   Reads dBASE table:

    Table 2. Population by sex, residence, and intercensal rates of increase
             for total population, each census: 1948-1997
   Source:
      United Nations - Demographic Yearbook, Historical supplement. New York, 1999

$offtext

$callTool win32.msappavail Access
$if errorlevel 1 $abort.noError "No Access available"

set country /
102005 "Algeria"
103005 "Angola"
106305 "Benin"
107405 "Botswana"
109605 "Burkina Faso"
110405 "Burundi"
110805 "Cameroon"
112005 "Cape Verde"
112405 "Central African Republic"
113005 "Chad"
115405 "Comoros"
116105 "Congo"
116905 "Cote d'Ivoire"
118005 "Democratic Republic of the Congo"
118205 "Djibouti"
119205 "Egypt"
120405 "Equatorial Guinea"
120505 "Eritrea"
120805 "Ethiopia"
121005 "Former Ethiopia"
126005 "Gabon"
126405 "Gambia"
127805 "Ghana"
130405 "Guinea"
130605 "Guinea-Bissau"
138805 "Kenya"
142405 "Lesotho"
143405 "Liberia"
143805 "Libyan Arab Jamahiriya"
145405 "Madagascar"
145605 "Malawi"
147805 "Mali"
148805 "Mauritania"
149005 "Mauritius"
149015 "Mauritius, Island of Mauritius"
149025 "Mauritius, Rodrigues"
149035 "Mauritius, Others"
151005 "Morocco"
151405 "Mozambique"
152005 "Namibia"
156205 "Niger"
156605 "Nigeria"
164405 "Reunion"
165205 "Rwanda"
165715 "Saint Helena ex. dep."
165725 "Saint Helena: Ascension"
165735 "Saint Helena: Tristan da Cunha"
166805 "Sao Tome and Principe"
167605 "Senegal"
168005 "Seychelles"
168805 "Sierra Leone"
169605 "Somalia"
170005 "South Africa"
173105 "Sudan"
174005 "Swaziland"
176405 "Togo"
178405 "Tunisia"
179405 "Uganda"
185505 "United Republic of Tanzania"
185515 "United Republic of Tanzania: Tanganyika"
185525 "United Republic of Tanzania: Zanzibar"
190205 "Western Sahara"
192805 "Zambia"
193805 "Zimbabwe"
202905 "Anguilla"
203105 "Antigua and Barbuda"
203705 "Aruba"
204805 "Bahamas"
205405 "Barbados"
206105 "Belize"
206205 "Bermuda"
208805 "British Virgin Islands"
211605 "Canada"
212205 "Cayman Islands"
216805 "Costa Rica"
217005 "Cuba"
218505 "Dominica"
218805 "Dominican Republic"
220005 "El Salvador"
229005 "Greenland"
229105 "Grenada"
229405 "Guadeloupe"
230005 "Guatemala"
231205 "Haiti"
232005 "Honduras"
237405 "Jamaica"
248005 "Martinique"
249605 "Mexico"
250705 "Montserrat"
253305 "Netherlands Antilles"
255805 "Nicaragua"
259405 "Panama"
259605 "Panama: Former Canal Zone"
263905 "Puerto Rico"
266205 "Saint Kitts-Nevis"
266305 "Saint Lucia"
266405 "Saint Pierre and Miquelon"
266505 "Saint Vincent and the Grenadines"
277405 "Trinidad and Tobago"
279105 "Turks and Caicos Islands"
286005 "United States"
286405 "United States Virgin Islands"
303405 "Argentina"
306805 "Bolivia"
307805 "Brazil"
313405 "Chile"
315005 "Colombia"
319405 "Ecuador"
322405 "Falkland Islands (Malvinas)"
324005 "French Guiana"
330805 "Guyana"
360405 "Paraguay"
360805 "Peru"
373405 "Suriname"
387405 "Uruguay"
387805 "Venezuela"
401405 "Afghanistan"
403605 "Armenia"
404605 "Azerbaijan"
405005 "Bahrain"
405205 "Bangladesh"
406405 "Bhutan"
409205 "Brunei Darussalam"
410705 "Cambodia"
413805 "China"
413905 "China: Hong Kong SAR"
417405 "Cyprus"
419005 "East Timor"
426305 "Georgia"
434005 "India"
434405 "Indonesia"
435005 "Iran (Islamic Republic of)"
435405 "Iraq"
436205 "Israel"
437805 "Japan"
438405 "Jordan"
438505 "Kazakhstan"
439005 "Korea (Dem. People's Republic of)"
439405 "Korea (Republic of)"
439805 "Kuwait"
440005 "Kyrgyzstan"
440205 "Lao People's Democratic Republic"
441205 "Lebanon"
445005 "Macau"
445805 "Malaysia"
445825 "Malaysia: Peninsular Malaysia"
445835 "Malaysia: Sabah"
445845 "Malaysia: Sarawak"
447405 "Maldives"
450605 "Mongolia"
451605 "Myanmar"
452605 "Nepal"
458605 "Oman"
459005 "Pakistan"
461205 "Philippines"
464005 "Qatar"
467205 "Saudi Arabia"
469405 "Singapore"
472905 "Sri Lanka"
475205 "Syrian Arab Republic"
475605 "Tajikistan"
476005 "Thailand"
478805 "Turkey"
478905 "Turkmenistan"
483005 "United Arab Emirates"
487305 "Uzbekistan"
487905 "Viet Nam"
488105 "West Bank and Gaza Strip"
491905 "Yemen"
492005 "Yemen: Former Democratic Yemen"
492105 "Yemen: Former Yemen Arab Republic"
501805 "Albania"
502805 "Andorra"
504405 "Austria"
505805 "Belarus"
506005 "Belgium"
507105 "Bosnia and Herzegovina"
509405 "Bulgaria"
513205 "Channel Islands"
513215 "Channel Islands: Guernsey"
513225 "Jersey"
517105 "Croatia"
517805 "Former Czechoslovakia"
517905 "Czech Republic"
518405 "Denmark"
520705 "Estonia"
522005 "Faeroe Islands"
523405 "Finland"
523805 "France"
526805 "Germany: Federal Republic of Germany"
526905 "Germany: Former German Democratic Republic"
528005 "Gibraltar"
528805 "Greece"
531605 "Holy See"
532805 "Hungary"
533205 "Iceland"
535805 "Ireland"
536005 "Isle of Man"
536605 "Italy"
540705 "Latvia"
544205 "Liechtenstein"
544405 "Lithuania"
544605 "Luxembourg"
547905 "Malta"
550205 "Monaco"
553005 "Netherlands"
558405 "Norway"
562005 "Poland"
562405 "Portugal"
564105 "Republic of Moldova"
564805 "Romania"
565005 "Russian Federation"
566605 "San Marino"
569305 "Slovakia"
569505 "Slovenia"
571605 "Spain"
573805 "Svalbard and Jan Mayen Islands"
574405 "Sweden"
574805 "Switzerland"
576205 "The Former Yugoslav Rep. of Macedonia"
579805 "Ukraine"
584005 "United Kingdom"
584015 "United Kingdom: England and Wales"
584025 "United Kingdom: Northern Ireland"
584035 "United Kingdom: Scotland"
592405 "Former Yugoslavia"
592505 "Yugoslavia"
602405 "American Samoa"
604205 "Australia"
614405 "Christmas Islands"
614805 "Cocos (Keeling) Islands"
616405 "Cook Islands"
623005 "Fiji"
624405 "French Polynesia"
629805 "Guam"
638705 "Kiribati"
648105 "Marshall Islands"
649805 "Micronesia"
652205 "Nauru"
654205 "New Caledonia"
655405 "New Zealand"
658005 "Niue"
658205 "Norfolk Island"
658305 "Northern Mariana Islands"
659105 "Palau"
660205 "Papua New Guinea"
661605 "Pitcairn"
667005 "Samoa"
670205 "Solomon Islands"
676805 "Tokelau"
677005 "Tonga"
679005 "Tuvalu"
687505 "Vanuatu"
690005 "Wallis and Futuna Islands"
780005 "Former USSR"
/;

set reliability /
 0 "Final figure, complete"
 1 "Provisional figure"
 2 "Final figure, incomplete/questionable reliability"
 3 "Provisional figure with questionable reliability"
 4 "No information available on reliability"
 5 "United Nations Population Division estimates"
 6 "Other estimates"
/;

set vardef 'this is used to define the data record' /
 1 "Enumerated population: Total"
 2 "Enumerated population: Male"
 3 "Enumerated population: Female"
 4 "Urban population: Number"
 5 "Urban population: Per cent"
 6 "Rural population: Number"
 7 "Rural population: Per cent"
 8 "Annual rate of increase (%)"
/;

set year /1948*1998/;
set day /0,1*31/;
set month /0,1*12/;

set rectype /
 1 "Census, complete tabulation: de facto"
 2 "Census, sample tabulation: de facto"
 3 "Census, complete tabulation: de jure"
 4 "Census, sample tabulation: de jure"
 5 "Sample survey: de facto"
 6 "Sample survey: de jure"
 7 "Estimate: de facto"
 8 "Estimate: de jure"
/;

$onecho > table02.cmd
q=select country,year,month,day,variable,rectype,datum from Table02
c=DRIVER=Microsoft dBase Driver (*.dbf);dbq=%system.fp%;
o=table02.inc
$offecho
$call sql2gms @table02.cmd > %system.nullfile%

parameter population(country,year,month,day,vardef,rectype) /
$include table02.inc
/;
display population;