Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
Hi,
I had a file in below format.
Code:
000SSC ORDERS 207649220090507120353WFPOM - MAIN HEADER
030A7082598011111S708259801 - SUB HEADER
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
031AAAA3333220903054544010601800000000411111708259801 - DETAIL RECORD
031BBBB3333220903054544010604200000000411111708259801 - DETAIL RECORD
031CCCC3333220903054544010608300000000611111708259801 - DETAIL RECORD
031DDDD3333220903054544010611700000000611111708259801 - DETAIL RECORD
030A7082598555555S708259851 - SUB HEADER
03170825985944903054544010601800000001655555708259851 - DETAIL RECORD
03170825985944903054544010604200000001655555708259851 - DETAIL RECORD
999000011195 - TRAILER
1-3 -> ID
17-31 -> Sort Key
LRECL = 53
RECFM = FB
Header is identified by 000
Trailer is identified by 999
Sub Header is identified by 030
Detail record is identified by 031
i want to sort detail records under each sub header. Kindly guide me how i can do this.
Joined: 01 Feb 2007 Posts: 123 Location: Hyderabad
Hi Frank,
Thanks for providing solution. But my installation doesnt support WHEN=GROUP option. Is there any other way other than this. Kindly let me know whenther we can do this other than this option.