R_Win, There are several features of your program to either correct or clarify. First, do not use both TRUNCOVER and MISSOVER. Pick one or the other. My choice would be neither, but to use: infile cards lrecl=100 pad; Since you want to read 100 characters from the data lines, make sure you have 100 characters to read. Second, you say you want three conditions to be met, using AND to join the three conditions. But the code uses | which means OR. I suspect you actually mean OR, since it is not possible for the length to be both less than 10 and greater than 200. But perhaps it is some combination of AND and OR. You need to clarify the conditions you want to meet. Third, since your program reads 100 characters as the value for ADD, it is not possible for the length to be greater than 200. Finally, the statement add_QC1=''; defines add_QC1 as being 1 character long. If the later statement executes (add_QC1 = add;), there is not enough room to store the full value of ADD. Instead, it will be truncated down to a single character. The easiest solution is to add a LENGTH statement toward the beginning of the DATA step, defining ADD_QC1 as being 100 characters long. Patch up this much, and we'll see if the questions remain. Good luck.
... View more