12-17-2012 02:51 AM
Request your help in SAS logic to list all number combinations. For example, lets say I have 12345. We know we can figure out several combinations such as 12345,21345, 31245,41235,51234..................and so on. I would like a SAS logic that would pick and list all combinations. Your help would be most appreciated. Merry Christmas. Thanks
12-17-2012 03:53 AM
This sounds like a mathematical quiz, rather than a business requirement...?
Like most programming, there are several ways to accomplish this. On could involve arrays and do loop in the data step. If you want it dynamic (like number of number) you might need to use macro logic.
12-17-2012 06:16 AM
Looks like you are want permutations. From the online documentation.