I am working on a requirement to sort the files in to 2 different sort sequences and append the records.
First sort should be done as, SORT FIELDS=(1,1,BI,A,27,6,BI,A,11,1,BI,A)
Then i have to separate the '3' in first byte and sort like as, SORT FIELDS=(80,12,BI,A,11,1,BI,D)
Then I have to append these records at the end of the first file before trailer record.
Files is PS,FB, LRECL=227
Please suggest if its possible in a single step. Your help will be much appreciated.
VIEW SHOG.W3SODS.CHS.ODSCHSOE Columns 00001 00124
Command ===> Scroll ===> CSR
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----
000001 11230804
000002 255356090515102700007500000000063290000000000000230804000000B0000000000000000000CH21 29Apr2022 SGB CHS SCN014 OFI
000003 210021180915102700007400000000002530000000000000230804000000B0000000000000000000Ofi dd
000004 210021180913207700008400000000002530000000000000230804000000B0000000000000000000INWARD PAYMENT Muhammed CBA ACC
000005 210015030513207700007600000000005920000000000000230804000000B0000000000000000000MD06 20 Jun 2022 INWARD PAYMENT Muhammed
000006 3130067297ADD00000000004012308041440143361657001093240104411 230804114456 0000
000007 3130067297DEL00000000004012308041440143361657001093240104411 230804114605 0000
000008 3130067297ADD00000000008022308041440143361657001093240104411 230804114605 0000
000009 3130067297DEL00000000008332308041505143361657001093240150511 230804115255 0000
000010 3130067297ADD00000000008332308041505143361657001093240150511 230804115117 0000
000011 210015030513207700007600000000022930000000000000230804000000B0000000000000000000WBC API
000012 210015030563202700008600000000022930000000000000230804000000B0000000000000000000 PARTNERSHIP SECURITIES PTY LIMITED
000013 210010562715102700007800000007331000000000000000230804000000B0000000000000000000 FTH ODS CHS SCN001 Tania England
000014 210034530515102700007800000000079310000000000000230804000000B0000000000000000000Nazia Shaik OFI
000015 210034530513507700008800000000079310000000000000230804000000B0000000000000000000OFI 2.0
000016 3130067297ADD00000000005102308041251043361657001093240015211 230804112559 0000
000017 3130067297DEL00000000004012308041440143361657001093240104411 230804114758 0000
000018 3130067297ADD00000000009162308041440143361657001093240104411 230804114945 0000
000019 3130067297ADD00000000002112308041270343361657001093240307211 230804112841 0000
000020 3130067297ADD00000000003112308041302343361657001093240320311 230804113045 0000
000021 3130067297ADD00000000011352308041193543361657001093240539111 230804112328 0000
000022 3130067297ADD00000000003002308041234543361657001093240543211 230804112456 0000
000023 255356090513207700008500000000063290000000000000230804000000B0000000000000000000SGB CHS SCN014 OFI
000024 210021180915102700007400000000019160000000000000230804000000B0000000000000000000CH21 29Apr2022 SGB CHS SCN014 OFI
000025 3130067297ADD00000000004162308041341643361657001093240614311 230804113538 0000
000026 3130067297DEL00000000004162308041341643361657001093240614311 230804113757 0000
000027 3130067297ADD00000000005472308041341643361657001093240614311 230804113757 0000
000028 3130067297DEL00000000005472308041341643361657001093240614311 230804113921 0000
000029 3130067297ADD00000000006102308041341643361657001093240614311 230804113921 0000
000030 3130067297DEL00000000006102308041341643361657001093240614311 230804114126 0000
000031 3130067297ADD00000000009502308041341643361657001093240614311 230804114126 0000
000032 3130067297ADD00000000008562308041285643361657001093240658211 230804112934 0000
000033 9000000192
****** ****************************************************** Bottom of Data ******************************************************
Command ===> Scroll ===> CSR
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----
000001 11230804
000002 255356090515102700007500000000063290000000000000230804000000B0000000000000000000CH21 29Apr2022 SGB CHS SCN014 OFI
000003 210021180915102700007400000000002530000000000000230804000000B0000000000000000000Ofi dd
000004 210021180913207700008400000000002530000000000000230804000000B0000000000000000000INWARD PAYMENT Muhammed CBA ACC
000005 210015030513207700007600000000005920000000000000230804000000B0000000000000000000MD06 20 Jun 2022 INWARD PAYMENT Muhammed
000006 3130067297ADD00000000004012308041440143361657001093240104411 230804114456 0000
000007 3130067297DEL00000000004012308041440143361657001093240104411 230804114605 0000
000008 3130067297ADD00000000008022308041440143361657001093240104411 230804114605 0000
000009 3130067297DEL00000000008332308041505143361657001093240150511 230804115255 0000
000010 3130067297ADD00000000008332308041505143361657001093240150511 230804115117 0000
000011 210015030513207700007600000000022930000000000000230804000000B0000000000000000000WBC API
000012 210015030563202700008600000000022930000000000000230804000000B0000000000000000000 PARTNERSHIP SECURITIES PTY LIMITED
000013 210010562715102700007800000007331000000000000000230804000000B0000000000000000000 FTH ODS CHS SCN001 Tania England
000014 210034530515102700007800000000079310000000000000230804000000B0000000000000000000Nazia Shaik OFI
000015 210034530513507700008800000000079310000000000000230804000000B0000000000000000000OFI 2.0
000016 3130067297ADD00000000005102308041251043361657001093240015211 230804112559 0000
000017 3130067297DEL00000000004012308041440143361657001093240104411 230804114758 0000
000018 3130067297ADD00000000009162308041440143361657001093240104411 230804114945 0000
000019 3130067297ADD00000000002112308041270343361657001093240307211 230804112841 0000
000020 3130067297ADD00000000003112308041302343361657001093240320311 230804113045 0000
000021 3130067297ADD00000000011352308041193543361657001093240539111 230804112328 0000
000022 3130067297ADD00000000003002308041234543361657001093240543211 230804112456 0000
000023 255356090513207700008500000000063290000000000000230804000000B0000000000000000000SGB CHS SCN014 OFI
000024 210021180915102700007400000000019160000000000000230804000000B0000000000000000000CH21 29Apr2022 SGB CHS SCN014 OFI
000025 3130067297ADD00000000004162308041341643361657001093240614311 230804113538 0000
000026 3130067297DEL00000000004162308041341643361657001093240614311 230804113757 0000
000027 3130067297ADD00000000005472308041341643361657001093240614311 230804113757 0000
000028 3130067297DEL00000000005472308041341643361657001093240614311 230804113921 0000
000029 3130067297ADD00000000006102308041341643361657001093240614311 230804113921 0000
000030 3130067297DEL00000000006102308041341643361657001093240614311 230804114126 0000
000031 3130067297ADD00000000009502308041341643361657001093240614311 230804114126 0000
000032 3130067297ADD00000000008562308041285643361657001093240658211 230804112934 0000
000033 9000000192
****** ****************************************************** Bottom of Data ******************************************************