=COLS> ----+----1----+----2----+----3----+----4
000001 AAAAAAAA A01023420 26 May 2024
000002 BBBBBBBB B01914562 NO PASSPHRASE
000003 CCCCCCCC C01978902 NO PASSPHRASE
000004 DDDDDDDD D01222435 23 Sep 2024
000005 EEEEEEEE Z20044447 21 Oct 2024
000006 FFFFFFFF F01045630 5 Mar 2024
000007 GGGGGGGG A00022120 1 Jan 2025
000008 HHHHHHHH H01442220 1 Jan 2025
000009 IIIIIIII I04938520 1 Jan 2025
000010 JJJJJJJJ J01982220 1 Jan 2025
000011 KKKKKKKK K01045326 1 Jan 2025
000012 LLLLLLLL L01003292 29 Oct 2024
000013 MMMMMMMM M01005826 1 Jan 2025
000014 NNNNNNNN N01005567 1 Jan 2025
000015 OOOOOOOO O01027892 21 Mar 2025
000016 PPPPPPPP P01039102 21 Mar 2025
000017 QQQQQQQQ Q01001253 21 Mar 2025
000018 RRRRRRRR R01000984 21 Mar 2025
000019 SSSSSSSS S02207635 6 Dec 2024
000020 TTTTTTTT T05829220 6 Dec 2024
000021 UUUUUUUU U20456887 18 Apr 2025
000022 VVVVVVVV V24697617 18 Apr 2025
000023 WWWWWWWW W01003333 26 May 2024
000024 XXXXXXXX X01987245 NO PASSPHRASE
000025 YYYYYYYY Y01368352 NO PASSPHRASE
000026 ZZZZZZZZ Z01934905 NO PASSPHRASE
I would like to sort the column that starts from position 21 by oldest date. Here the oldest date is 5 Mar 2024. So this record should come first and then the records belongs to 26 May 2024 and so on. I am ok with the sequence on those records that contains 'NO PASSPHRASE' at position 21
Both my input & output datasets are FB, 80, 800.
I tried the below sort option but it is not giving the desired output :
Both my input and output files are FB,80,800 Joerg.
FYI, in total my input has 86 records and I just mentioned few sample records here as input. I sense, it might be due to the below while sorting the fields :
Code:
SORT FIELDS=(81,8,AQ,A,1,8,CH,A)
Basically, the sort should happen only on third column and it is considering date(5, 6, 21, 23, 29 - irrespective of month) which is in 21st position. That's why I am getting out as mentioned in the previous post.
Since you are getting the desired output, do I need to look at any settings here?