Here is an example:
// create some example data
clear
input ///
str13 state int year
"Noord-Holland" 1962
"Zuid-Holland" 1963
"Utrecht" 1964
"Zeeland" 1965
"Noord-Brabant" 1966
"Limburg" 1967
"Gelderland" 1968
"Flevoland" 1969
"Overijsel" 1970
"Drente" 1971
"Friesland" 1972
"Groningen" 1973
end
// create the variable
gen str18 state_year = state + "_" + string(year)
// admire the result
list
If the + operator appears between two string, then it means that Stata has to concatenate the two strings.
So, the part state + "_" means add the string "_" after the content of the string variable state. To make sure that + also means concatenate for the part "_" + string(year), I used the string() function, which turns the numeric values of the variable year into strings.
The str18 part means that you want the variable state_year to be a string with 18 characters. This works for the Dutch states in this examples, but you will need to count the number of characters in the state with the longest name and add 5 to that, to determine the maximum length of the string in your case. Say that number is 21, then you need to replace str18 with str21