Using Modify I have two datasets as follows. The first dataset is an inventory and the second dataset contains the transactions. dataset1 Inventory item_no description 1 Dunlop tyre 2 tube 3 windshield 4 Boss speakers dataset2 Transactions purchase_id item_no desc 1 1 dunlop 2 1 Dunlop 3 1 Dun 4 3 windshi 5 2 tub 6 2 tub 7 4 Boss 8 4 Boss Sp 9 3 wind For some reason the description is truncated in the transaction table and I would like to replace it with the description from the inventory. My transaction table should look like this. purchase_id item_no desc 1 1 Dunlop tyre 2 1 Dunlop tyre 3 1 Dunlop tyre 4 3 windshield 5 2 tube 6 2 tube 7 4 Boss speakers 7 4 Boss speakers 9 3 windshield I used the modify statement in the data step. this was my code data transaction; modify transaction inventory; by item_no; desc=description; run; But this does not work it. My transaction table ends up like this. It replaces only the first occurence of the item_no with the description from the inventory table. purchase_id item_no desc 1 1 Dunlop tyre 2 1 Dunlop 3 1 Dun 4 3 windshield 5 2 tube 6 2 tub 7 4 Boss speakers 9 3 wind Could anybody suggest what can be done
... View more