Before answering your question, you need to be specific as to what you want
the final results (merged) to look like.
1. Are you trying to append X with Y?
2. If you are trying to actually merge X with Y, on what basis should the
records be merged on? You sort by "name" and "num" but only merge
on "name". What do you want to happen when "num" matches or does not match
between both files?
If you want to know more about "merge", may I suggest you look at
TIP00235 - TS-644 Everything you want to know about MERGE but were afraid
to ask by SAS Institute Inc. Technical Support
Sorry, but I would need more info from you to provide any further