Are we only worried about duplicates for 6-byte values vs 7-byte values, or are there other variations such as 5-byte values vs 6-byte values. Please give a complete picture of the variations along with examples.
Do the output records have to be in the original order of the input records or can they be sorted by the numeric values?
REcord format is FB and LRECL = 300. The duplicates we need to handle i case of 7 and 6 bytes only.
In normal case there won't be any duplicates. But if the same Policy is coming from 2 different systems, then on esystem sends it by prefixing 0.
So when we query from database we all the policies get selected. Now while giving this Unload file as to our program, we don't want any duplicates. And in case there eg:- 0123456 and 123456 we want 0123456.
Here's a DFSORT/ICETOOL job that will do what you asked for. You didn't answer my question about whether the output records could be in sorted order, so I assumed you wanted them in their original order as shown in your example. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SELECT. If you don't have the April, 2006 PTF, you won't get the correct output, so ask your System Programmer to install the PTF (it's free). Alternatively, you could use COPY with INREC and SELECT without INREC instead of SELECT with INREC.