I need to copy one column from one dataset to another dataset. Moreover, I need to do the same task many times (say I need to copy column1 from datase_1 to dataset_a, column1 from dataset_2 to dataset_b, and so on. How can I do this task? Should I use macro such as %macro, %copy etc? Further, I need to subtract that copied column from every variable in the dataset. Say, dataset_a has variables: date, Firm1, Firm2, … Firm100. Now column1 from dataset_1 will be copied to dataset_a. So dataset_a will look like: Date, Firm1, Firm2, … Firm100, column1. Now column1 will have to be subtracted from Firm1, Firm2 , … Firm100. In this way, column1 from dataset_2 will have to copied to dataset_b and that copied variable will have to be subtracted from other variables in dataset_b.
... View more