Hi,
It's hard to understand your goal. Can you please show five records of dataset1, five records of dataset2, and what you want to create when you combine them into work.asdf?
If you are combining variables from dataset1 and dataset2, typically you would do that with a MERGE statement.
If you are combining rows from dataset1 and dataset2, typically you would do that with a single SET statement which lists both datasets.
Your current code, with two SET statements, is almost certainly not doing what you want. But I'm not sure what you're trying to do, so not sure how to help.
The Boston Area SAS Users Group (BASUG) is hosting our
in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at
https://www.basug.org/events.