Macro generation will destroy any formatting you might have added to your code to make it readable. So let's retype the statement from your posted log and see if that makes it easier to understand what is happening.
create table ALL_NPART as
select distinct
a.*
, b.MP_FIRSTNAME as _Fname
, b.MP_LASTNAME as _Lname
, b.indv_id
, b.MP_MANAGEDPERSONID
, b.MP_BIRTHDATE as _DOB
, b.MP_zip as _zip
from outlib.MCP_QUAL a
left join refdata.xwalk_careone_crm b
on UPCASE(COMPRESS(strip(a.PtFirst))) = UPCASE(COMPRESS(strip(b.MP_FIRSTNAME)))
and UPCASE(COMPRESS(strip(a.PtLast))) = UPCASE(COMPRESS(strip(b.MP_LASTNAME)))
;
So now that we can read the code it looks your problem is that your code expects that PTFIRST, PTLAST, MP_FIRSTNAME and MP_LASTNAME are character variables, which seems reasonable given their names, but unfortunately at least one of them is a number.
So you need to take a step back in your program's logic flow and figure out how you ended up making a variable like MP_LASTNAME as a number instead of string.
My bet is on using something like PROC IMPORT to guess at what types of variables to create.
... View more