How create a variable with ISO Code countries

I want create a new variable with the ISO code of countries inside dataframe with 720 obs (Data panel format).
For example, Chile will be a CHL (iso code) , Armenia will be ARM.... Help me!