Hi @Tom , I did not know that RETAIN statement, it is very usefull, thanks! In my third post, I placed a second text file, more real to my data, The idea, more or less; it is search the NumS_Com info in the NumS column, if find the NumS_Com then i need look for my PRINCIPAL NumS associated, THAT "NumS" has the "-" character. Sorry for the BAD drawing hahaha, Sees the relation each the rows, the other values are complementary to "1-1-598". "1-1-598" is my PRINCIPAL value associted to "-" character. IMPORTANT: I can not sort.
... View more