Hi All,
I am having a Sequential file having LRECL = 1199 & RECFM = FB. File is Sorted on First 16 Bytes i.e. (1,16,CH,A). My Requirement is, For all the Records where First 15 Bytes are same & there is a Difference in the Remaning Field then I need to write the Record to the Output File. O/P File having same Attribute as Input File. Below is Example.
Input File
1234|ABCDE|XYZ98|HELLO|MAINFRAME|XYZ12345|..... ---> To be written to O/P File. First 16 Bytes = 1234|ABCDE|XYZ98
1234|ABCDE|XYZ98|HELLO|MAINFRAME|ABC12345|.....---> To be written to O/P File. First 16 Bytes = 1234|ABCDE|XYZ98
1234|HIJKL|XYZ98|HELLO|MAINFRAME|XYZ12345|..... ---> Not To be written to O/P File. First 16 Bytes = 1234|ABCDE|XYZ98
5678|IJKLM|99999|HELLO|MAINFRAME|XYZ12345|.....----> Not to be written to O/P file. First 16 Bytes = 5678|IJKLM|99999
5678|IJKLM|99999|HELLO|MAINFRAME|XYZ12345|.....----> Not to be written to O/P file. First 16 Bytes = 5678|IJKLM|99999
7899|ABCDE|88888|WORLD|MAINFRAME|XYZ12345|.... To be written to O/P File. First 16 Bytes = 7899|ABCDE|88888
7899|ABCDE|88888|WORLD|MAINFRAME|XYZ12345|.... Not to be written to O/P file. First 16 Bytes = 7899|ABCDE|88888
7899|ABCDE|88888|WORLD|MAINFRAME|XYZ99999|.... To be written to O/P File. First 16 Bytes = 7899|ABCDE|88888
7899|ABCDE|88888|WORLD|MAINFRAME|XYZ88888|.... To be written to O/P File. First 16 Bytes = 7899|ABCDE|88888
Can this be achieved using SORT.
Thanks
Kind Rgd's
Vineet Anand