SAS does have expected behavior when dealing with CHARACTER type variable assignments - pretty well documented and mostly consistent.
Suggest if you want to ensure an expected SAS CHARACTER variable length to avoid truncation, use an ATTRIB or LENGTH statement (and not a FORMAT statement, by the way). And you will want to code the statement ahead of the first reference to a given SAS CHARACTER variable, that being either with an assignment stmt, a SET, or a RETAIN, to cover most instances.
Scott Barry
SBBWorks, Inc.