I have a list of ranges, data looks like this: Enteral Formulas and Additives B4100-B4162 B4100 B4162 Parenteral Solutions and Supplies B4164-B5200 B4164 B5200 Nutrition Infusion Pumps and Supplies Not Otherwise Classified B9002-B9999 B9002 B9999 Other Theraputic Procedures C1052-C1062 C1052 C1062 Outpatient PPS C1713-C9899 C1713 C9899 Walking Aids and Attachments E0100-E0159 E0100 E0159 Sitz Bath/Equipment E0160-E0162 E0160 E0162 Commode Chair and Supplies E0163-E0175 E0163 E0175 I need to turn it into a list that includes all the values in between, single column, something like to include every value in every range: B9002 B9003 B9004 B9005 C1052 C1053 C1054 C1055 C1056 C1057 C1058 C1059 C1060 C1061 C1062 E0100 E0101 E0102 My thought was create a list with all the values A0001-A9999, B0001-B9999, etc for every letter of the alphabet then compare it back to my range list and only keep those that fall within one of the ranges. I was thinking a nested loop, the outside loop increments for the letter (runs 26 times), the inside loop increments for the numbers (runs 9999 times for each letter). I can figure out a loop to create the values 0001-9999 but I can't figure out how to increment the letter. I've tried converting the letter to ascii, hex, octal, so I can increment it as a number, can't get any of that to work (example below). It runs but it's not doing anything useful with the letter..the result is the same with ascii, hex, and octal. data Proc_List; ltr = 'A'; put ltr $ascii3.; do i = 1 to 9999 by 1; Proc = cat(ltr, put(i, z4.)); /* values are 1, 2.25, 4, ..., 16, 20.25, 25 */ output; end; run; Any ideas?
... View more