Depending on what you do in X and Y data steps and how you plan to use the data, use of SAS datastep view could help you avoid unnecessary IO, e.g.: data X / view=X; set largefile1; run; data Y / view=Y; set largefile2; run; data Z; set X Y; run; This way you skip writing X and Y to disk (physical table). Alternativelly, you can create Z as a view instead of X and Y.
... View more