It might be a bit tricky.
You have say x+y columns in dataset A and x+z columns in dataset B. You want a new dataset C where you have x columns and the data of both A and B.
Had it been a row-problem instead of a column problem, it could have been done very easily. Actually that is what I am going to propose.
Step 1: Proc Transpose datasets A and B to say A_ and B_, now these have x+y rows (not columns) and x+z rows respectively and if i remember correctly the first variable would be the original column-names (referenced by _NAME_).
Step 2: Merge A_ and B_ By _NAME_ (assuming the varaible names in both A and B were same for common variables to start with) when (IN=A_) and (IN=B_), i.e the intersection to get final dataset C_.
Step 3: Proc transpose C_ to C so that you get the original format of datasets. You might have to do some data cleaning, formating and renaming of the variables. If you would want to have A and B separate, then you have to insert a new variable to identify from which dataset the column is originally, can do it before step 1 or in step 2 and segregate into A nd B depending on that variable now.