separated associated code search from find code

created new table setTokenCode() function from parts of findCode() for
checking if the data type of the code matches the specified data type
and if not searches for an associated code with a data type that matches

added simplified setTokenCode() function for setting the code of a token
to the correct code for the data type of a base code