/*
	'GETDATA': module to import data
	Author: Duarte Goncalves (duarte.goncalves.dg@outlook.com)
	Last update: 24 March 2016
	Version 1.22

	This program uses the SDMX Connector for STATA, licensed to Banca d'Italia (Bank of Italy) under a European Union Public Licence
	(world-wide, royalty-free, non-exclusive, sub-licensable licence).
	See https://github.com/amattioc/SDMX/wiki/SDMX-Connector-for-STATA and
	https://joinup.ec.europa.eu/sites/default/files/eupl1.1.-licence-en_0.pdf


	I dearly thank Attilio Mattiocco (Attilio.Mattiocco@bancaditalia.it) for all the help regarding the SDMX Connector for STATA
	and Bo Werth (Bo.WERTH@oecd.org) for additional clarifications.
*/





cap program drop getdata_imf_alpha3
program getdata_imf_alpha3
args geo2
version 13
replace `geo2' = "AFG" if `geo2' == "512"
replace `geo2' = "WLD" if `geo2' == "001"
replace `geo2' = "ALB" if `geo2' == "914"
replace `geo2' = "DZA" if `geo2' == "612"
replace `geo2' = "ASM" if `geo2' == "859"
replace `geo2' = "AND" if `geo2' == "171"
replace `geo2' = "AGO" if `geo2' == "614"
replace `geo2' = "ATG" if `geo2' == "311"
replace `geo2' = "AZE" if `geo2' == "912"
replace `geo2' = "ARG" if `geo2' == "213"
replace `geo2' = "AUS" if `geo2' == "193"
replace `geo2' = "AUT" if `geo2' == "122"
replace `geo2' = "BHS" if `geo2' == "313"
replace `geo2' = "BHR" if `geo2' == "419"
replace `geo2' = "BGD" if `geo2' == "513"
replace `geo2' = "ARM" if `geo2' == "911"
replace `geo2' = "BRB" if `geo2' == "316"
replace `geo2' = "BEL" if `geo2' == "124"
replace `geo2' = "BMU" if `geo2' == "319"
replace `geo2' = "BTN" if `geo2' == "514"
replace `geo2' = "BOL" if `geo2' == "218"
replace `geo2' = "BIH" if `geo2' == "963"
replace `geo2' = "BWA" if `geo2' == "616"
replace `geo2' = "BRA" if `geo2' == "223"
replace `geo2' = "BLZ" if `geo2' == "339"
replace `geo2' = "IOT" if `geo2' == "585"
replace `geo2' = "SLB" if `geo2' == "813"
replace `geo2' = "VGB" if `geo2' == "371"
replace `geo2' = "BRN" if `geo2' == "516"
replace `geo2' = "BGR" if `geo2' == "918"
replace `geo2' = "MMR" if `geo2' == "518"
replace `geo2' = "BDI" if `geo2' == "618"
replace `geo2' = "BLR" if `geo2' == "913"
replace `geo2' = "KHM" if `geo2' == "522"
replace `geo2' = "CMR" if `geo2' == "622"
replace `geo2' = "CAN" if `geo2' == "156"
replace `geo2' = "CPV" if `geo2' == "624"
replace `geo2' = "CYM" if `geo2' == "377"
replace `geo2' = "CAF" if `geo2' == "626"
replace `geo2' = "LKA" if `geo2' == "524"
replace `geo2' = "TCD" if `geo2' == "628"
replace `geo2' = "CHL" if `geo2' == "228"
replace `geo2' = "CHN" if `geo2' == "924"
replace `geo2' = "TWN" if `geo2' == "528"
replace `geo2' = "CXR" if `geo2' == "814"
replace `geo2' = "CCK" if `geo2' == "865"
replace `geo2' = "COL" if `geo2' == "233"
replace `geo2' = "COM" if `geo2' == "632"
replace `geo2' = "MYT" if `geo2' == "920"
replace `geo2' = "COG" if `geo2' == "634"
replace `geo2' = "COD" if `geo2' == "636"
replace `geo2' = "COK" if `geo2' == "815"
replace `geo2' = "CRI" if `geo2' == "238"
replace `geo2' = "HRV" if `geo2' == "960"
replace `geo2' = "CUB" if `geo2' == "928"
replace `geo2' = "CYP" if `geo2' == "423"
replace `geo2' = "CZE" if `geo2' == "935"
replace `geo2' = "BEN" if `geo2' == "638"
replace `geo2' = "DNK" if `geo2' == "128"
replace `geo2' = "DMA" if `geo2' == "321"
replace `geo2' = "DOM" if `geo2' == "243"
replace `geo2' = "ECU" if `geo2' == "248"
replace `geo2' = "SLV" if `geo2' == "253"
replace `geo2' = "GNQ" if `geo2' == "642"
replace `geo2' = "ETH" if `geo2' == "644"
replace `geo2' = "ERI" if `geo2' == "643"
replace `geo2' = "EST" if `geo2' == "939"
replace `geo2' = "FRO" if `geo2' == "816"
replace `geo2' = "FJI" if `geo2' == "819"
replace `geo2' = "FIN" if `geo2' == "172"
replace `geo2' = "ALA" if `geo2' == "323"
replace `geo2' = "FRA" if `geo2' == "132"
replace `geo2' = "GUF" if `geo2' == "333"
replace `geo2' = "PYF" if `geo2' == "887"
replace `geo2' = "ATF" if `geo2' == "876"
replace `geo2' = "DJI" if `geo2' == "611"
replace `geo2' = "GAB" if `geo2' == "646"
replace `geo2' = "GEO" if `geo2' == "915"
replace `geo2' = "GMB" if `geo2' == "648"
replace `geo2' = "PSE" if `geo2' == "487"
replace `geo2' = "DEU" if `geo2' == "134"
replace `geo2' = "GHA" if `geo2' == "652"
replace `geo2' = "GIB" if `geo2' == "823"
replace `geo2' = "KIR" if `geo2' == "826"
replace `geo2' = "GRC" if `geo2' == "174"
replace `geo2' = "GRL" if `geo2' == "326"
replace `geo2' = "GRD" if `geo2' == "328"
replace `geo2' = "GLP" if `geo2' == "329"
replace `geo2' = "GUM" if `geo2' == "829"
replace `geo2' = "GTM" if `geo2' == "258"
replace `geo2' = "GIN" if `geo2' == "656"
replace `geo2' = "GUY" if `geo2' == "336"
replace `geo2' = "HTI" if `geo2' == "263"
replace `geo2' = "VAT" if `geo2' == "187"
replace `geo2' = "HND" if `geo2' == "268"
replace `geo2' = "HKG" if `geo2' == "532"
replace `geo2' = "HUN" if `geo2' == "944"
replace `geo2' = "ISL" if `geo2' == "176"
replace `geo2' = "IND" if `geo2' == "534"
replace `geo2' = "IDN" if `geo2' == "536"
replace `geo2' = "IRN" if `geo2' == "429"
replace `geo2' = "IRQ" if `geo2' == "433"
replace `geo2' = "IRL" if `geo2' == "178"
replace `geo2' = "ISR" if `geo2' == "436"
replace `geo2' = "ITA" if `geo2' == "136"
replace `geo2' = "CIV" if `geo2' == "662"
replace `geo2' = "JAM" if `geo2' == "343"
replace `geo2' = "JPN" if `geo2' == "158"
replace `geo2' = "KAZ" if `geo2' == "916"
replace `geo2' = "JOR" if `geo2' == "439"
replace `geo2' = "KEN" if `geo2' == "664"
replace `geo2' = "PRK" if `geo2' == "954"
replace `geo2' = "KOR" if `geo2' == "542"
replace `geo2' = "KWT" if `geo2' == "443"
replace `geo2' = "KGZ" if `geo2' == "917"
replace `geo2' = "LAO" if `geo2' == "544"
replace `geo2' = "LBN" if `geo2' == "446"
replace `geo2' = "LSO" if `geo2' == "666"
replace `geo2' = "LVA" if `geo2' == "941"
replace `geo2' = "LBR" if `geo2' == "668"
replace `geo2' = "LBY" if `geo2' == "672"
replace `geo2' = "LIE" if `geo2' == "147"
replace `geo2' = "LTU" if `geo2' == "946"
replace `geo2' = "LUX" if `geo2' == "137"
replace `geo2' = "MAC" if `geo2' == "546"
replace `geo2' = "MDG" if `geo2' == "674"
replace `geo2' = "MWI" if `geo2' == "676"
replace `geo2' = "MYS" if `geo2' == "548"
replace `geo2' = "MDV" if `geo2' == "556"
replace `geo2' = "MLI" if `geo2' == "678"
replace `geo2' = "MLT" if `geo2' == "181"
replace `geo2' = "MTQ" if `geo2' == "349"
replace `geo2' = "MRT" if `geo2' == "682"
replace `geo2' = "MUS" if `geo2' == "684"
replace `geo2' = "MEX" if `geo2' == "273"
replace `geo2' = "MCO" if `geo2' == "183"
replace `geo2' = "MNG" if `geo2' == "948"
replace `geo2' = "MDA" if `geo2' == "921"
replace `geo2' = "MNE" if `geo2' == "943"
replace `geo2' = "MSR" if `geo2' == "351"
replace `geo2' = "MAR" if `geo2' == "686"
replace `geo2' = "MOZ" if `geo2' == "688"
replace `geo2' = "OMN" if `geo2' == "449"
replace `geo2' = "NAM" if `geo2' == "728"
replace `geo2' = "NRU" if `geo2' == "836"
replace `geo2' = "NPL" if `geo2' == "558"
replace `geo2' = "NLD" if `geo2' == "138"
replace `geo2' = "CUW" if `geo2' == "354"
replace `geo2' = "ABW" if `geo2' == "314"
replace `geo2' = "SXM" if `geo2' == "352"
replace `geo2' = "BES" if `geo2' == "357"
replace `geo2' = "NCL" if `geo2' == "839"
replace `geo2' = "VUT" if `geo2' == "846"
replace `geo2' = "NZL" if `geo2' == "196"
replace `geo2' = "NIC" if `geo2' == "278"
replace `geo2' = "NER" if `geo2' == "692"
replace `geo2' = "NGA" if `geo2' == "694"
replace `geo2' = "NIU" if `geo2' == "851"
replace `geo2' = "NFK" if `geo2' == "849"
replace `geo2' = "NOR" if `geo2' == "142"
replace `geo2' = "FSM" if `geo2' == "868"
replace `geo2' = "MHL" if `geo2' == "867"
replace `geo2' = "PLW" if `geo2' == "565"
replace `geo2' = "PAK" if `geo2' == "564"
replace `geo2' = "PAN" if `geo2' == "283"
replace `geo2' = "PNG" if `geo2' == "853"
replace `geo2' = "PRY" if `geo2' == "288"
replace `geo2' = "PER" if `geo2' == "293"
replace `geo2' = "PHL" if `geo2' == "566"
replace `geo2' = "PCN" if `geo2' == "863"
replace `geo2' = "POL" if `geo2' == "964"
replace `geo2' = "PRT" if `geo2' == "182"
replace `geo2' = "GNB" if `geo2' == "654"
replace `geo2' = "TLS" if `geo2' == "537"
replace `geo2' = "PRI" if `geo2' == "359"
replace `geo2' = "QAT" if `geo2' == "453"
replace `geo2' = "REU" if `geo2' == "696"
replace `geo2' = "ROU" if `geo2' == "968"
replace `geo2' = "RUS" if `geo2' == "922"
replace `geo2' = "RWA" if `geo2' == "714"
replace `geo2' = "SHN" if `geo2' == "865"
replace `geo2' = "KNA" if `geo2' == "361"
replace `geo2' = "AIA" if `geo2' == "312"
replace `geo2' = "LCA" if `geo2' == "362"
replace `geo2' = "SPM" if `geo2' == "363"
replace `geo2' = "VCT" if `geo2' == "364"
replace `geo2' = "SMR" if `geo2' == "135"
replace `geo2' = "STP" if `geo2' == "716"
replace `geo2' = "SAU" if `geo2' == "456"
replace `geo2' = "SEN" if `geo2' == "722"
replace `geo2' = "SRB" if `geo2' == "942"
replace `geo2' = "SYC" if `geo2' == "718"
replace `geo2' = "SLE" if `geo2' == "724"
replace `geo2' = "SGP" if `geo2' == "576"
replace `geo2' = "SVK" if `geo2' == "936"
replace `geo2' = "VNM" if `geo2' == "582"
replace `geo2' = "SVN" if `geo2' == "961"
replace `geo2' = "SOM" if `geo2' == "726"
replace `geo2' = "ZAF" if `geo2' == "199"
replace `geo2' = "ZWE" if `geo2' == "698"
replace `geo2' = "ESP" if `geo2' == "184"
replace `geo2' = "SSD" if `geo2' == "733"
replace `geo2' = "SDN" if `geo2' == "732"
replace `geo2' = "ESH" if `geo2' == "793"
replace `geo2' = "SUR" if `geo2' == "366"
replace `geo2' = "SWZ" if `geo2' == "734"
replace `geo2' = "SWE" if `geo2' == "144"
replace `geo2' = "CHE" if `geo2' == "146"
replace `geo2' = "SYR" if `geo2' == "463"
replace `geo2' = "TJK" if `geo2' == "923"
replace `geo2' = "THA" if `geo2' == "578"
replace `geo2' = "TGO" if `geo2' == "742"
replace `geo2' = "TKL" if `geo2' == "818"
replace `geo2' = "TON" if `geo2' == "866"
replace `geo2' = "TTO" if `geo2' == "369"
replace `geo2' = "ARE" if `geo2' == "466"
replace `geo2' = "TUN" if `geo2' == "744"
replace `geo2' = "TUR" if `geo2' == "186"
replace `geo2' = "TKM" if `geo2' == "925"
replace `geo2' = "TCA" if `geo2' == "381"
replace `geo2' = "TUV" if `geo2' == "869"
replace `geo2' = "UGA" if `geo2' == "746"
replace `geo2' = "UKR" if `geo2' == "926"
replace `geo2' = "MKD" if `geo2' == "962"
replace `geo2' = "EGY" if `geo2' == "469"
replace `geo2' = "GBR" if `geo2' == "112"
replace `geo2' = "GGY" if `geo2' == "113"
replace `geo2' = "JEY" if `geo2' == "117"
replace `geo2' = "IMN" if `geo2' == "118"
replace `geo2' = "TZA" if `geo2' == "738"
replace `geo2' = "USA" if `geo2' == "111"
replace `geo2' = "VIR" if `geo2' == "373"
replace `geo2' = "BFA" if `geo2' == "748"
replace `geo2' = "URY" if `geo2' == "298"
replace `geo2' = "UZB" if `geo2' == "927"
replace `geo2' = "VEN" if `geo2' == "299"
replace `geo2' = "WLF" if `geo2' == "857"
replace `geo2' = "WSM" if `geo2' == "862"
replace `geo2' = "YEM" if `geo2' == "474"
replace `geo2' = "ZMB" if `geo2' == "754"
replace `geo2' = "CSHH" if `geo2' == "934"
replace `geo2' = "EU" if `geo2' == "998"
replace `geo2' = "EA" if `geo2' == "163"
end