I have to sort one file , but it has 2 type of record layout in a file.
One has record indent (602), account number.(other fields are no impt)
The second has record indent (603), account number and date.(other fields are no impt)
I have to sort in the below format :
602 1234567 AAAAAA
603 1234567 20080503
602 1234568 AAAAAA
603 1234568 20080504
But the problem is since there is no date field in 602, if the account numbers and record indent are same then the output file will have a different output.
Please let me know if you have any sort utility in JCL which can solve this problem.
As I said, unless you can show some way to show which 602 relates to which 603 , I don't think this can be done.
Is there a 603 for every 602 (and vice-versa)? Does the 603 always follow its related 602 in the input? If so, you might add sequence numbers (SEQNUM) for purposes of the sort, removing them after sorting. This way, you establish a relationship between the 602 and 603. The sort would then sort on account, seqnum and ident.