need help for column rename and column resort

HI,

we have multiple scenarios where we have to compare either 2 files or 2 tables, we have to compare column to column and add match/mismatch to it.

The Idea is to join these 2 files/tables and map column headers and resort them

and then compare them

The challenge we are facing is its getting very tedious as the number columns is as large as 200 to 400.

The column names are not the same and also not in the same order.

we are facing issue when renaming column to match both files/tables and resorting them to be in same order.

Example –

File A : First Name

File B : First_NM

File A : SSN_N

File B : ssn_n

we see cases where names are same , lower case vs upper cases, full name vs short form names,…

I am looking for something like a reference column re sorter or reference column mapper.

Please help