Your SAS variables listed in the BY statement must be of a consistent type, either NUMERIC or CHARACTER, and each of your input file specified on the MERGE statement must be sorted in the same sequence as listed in the BY list (in a typical scenario). Since you cannot have one variable with two different types, you are faced with doing a variable DROP and a RENAME process, so that you get back to having your BY variables all having the appropriate name.
So, one technical is to do the RENAME= on the SET for the file you want to modify, and then assign the same-named BY variable with the necessary ATTRIB (or LENGTH) attributes and derivation code, such as the INPUT function. After performing you data manipulation, verify the SAS variable results in each of your to-be-merged files using SAS PROC CONTENTS.
Once you have confirmed the SAS variable attributes are consistent, then move forward with your DATA step MERGE process.
The SAS support website
http://support.sas.com/ hosts SAS product documentation and also additional user community (SGF and SUGI) technical papers as well as SAS-contributed technotes.
For example, I did a Google advanced search against the SAS.COM site - here is the argument entered:
data step merge processing site:sas.com
A SEARCH facility is also provided at the SAS support website, in addition to the Google example.
Here is a tech doc paper found from a search:
http://support.sas.com/techsup/technote/ts644.pdf
Scott Barry
SBBWorks, Inc.