Suppose that I had a data set that contained a list of names that contained additional columns that group names based on name type (first, last, or middle) and length (short or long):
| ID | NameType | Length | Name |
| 1 | First | Short | Jon |
| 2 | First | Long | Alexander |
| 3 | Middle | Short | Todd |
| 4 | Middle | Long | William |
| 5 | Last | Short | Smith |
| 6 | Last | Long | Stephanopoulos |
How can I create all unique combinations of names from each of the groups by selecting only 1 first name that is either short or long, 1 middle name that is either short or long, and 1 last name that is either short or long? For example:
| Jon | Todd | Smith |
| Jon | William | Smith |
| Jon | Todd | Stephanopoulos |
| Jon | William | Stephanopoulos |
| Alexander | Todd | Smith |
| Alexander | William | Smith |
| Alexander | Todd | Stephanopoulos |
| Alexander | William | Stephanopoulos |
I thought that proc plan would work but I can't figure out how to do it. Any help would be greatly appreciated.