I @Astounding wrote: Don't create a blank. Delete it entirely. Sorry if that wasn't clear. However .... if you don't expect to the new files to have the same structure, APPEND is not the best route. Just change the name of the output data set from NEW to &SEG. Then OUTSIDE of the macro, use a DATA step to combine the data sets: data out.new; set op_l_tx op_l_rv op_s_rvlr; run; However, if you are going that route, it opens up new possibilities. You could simply use a single step with no macro language: data out.new; length flag $ 9; set in.op_l_tx (in=in1) in.op_l_rv (in=in2) in.op_s_rvlr (in=in3); if in1 then flag='op_l_tx'; else if in2 then flag='op_l_rv'; else flag='op_s_rvlr'; run; I have 200 datasets so this wont work on that. ill try without the null table
... View more