Hello All,
I need a help to sort the fields based on the second word of the records,
Input:
ACHIEVEMENT UNIQUE
ACHIEVEMENT UNIQUE
ACHIEVEMENT UNIQUE1
BELL LAB
BELL LAB
BELL INC
BELL CORP
Output:
ACHIEVEMENT UNIQUE
ACHIEVEMENT UNIQUE1
BELL LAB
BELL INC
BELL CORP
Here the sort is based on the first is unique or not, if the first word is unique then we need to compare the next word, if the second word is unique we need to write in the output file, if the second word is not unique we will exclude, there is not size limit for the first and second word.
I am struck with this requirement in sortcards, please help me.
SORT the records based on the second word
-
- Posts: 1
- Joined: Wed Aug 19, 2020 1:18 pm
- Skillset: SYNCSORT,JCL,COBOL,SAS,REXX
- Referer: Google
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: SORT the records based on the second word
1. Use INREC PARSE=(%1=...,%2=...),OVERLAY=(100:%1,%2) <- RTFM!
2. Use SORT FIELDS=(100,nnn,CH,A)
3. Use OUTREC BUILD=(1,100)
2. Use SORT FIELDS=(100,nnn,CH,A)
3. Use OUTREC BUILD=(1,100)
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Create multiple records based on one record within a file.
by chillmo » Thu Aug 11, 2022 3:54 am » in Syncsort/Synctool - 5
- 7679
-
by sergeyken
View the latest post
Fri Aug 12, 2022 2:23 am
-
-
- 5
- 1193
-
by samb01
View the latest post
Mon Jun 14, 2021 7:49 pm
-
- 3
- 3706
-
by naveenkumar sudha
View the latest post
Mon May 09, 2022 10:15 pm
-
-
SUM and count of records by key, using SORT utility
by naveenkumar sudha » Mon May 09, 2022 10:11 pm » in DFSORT/ICETOOL/ICEGENER - 2
- 6529
-
by ssbylzh
View the latest post
Sat May 21, 2022 5:10 pm
-
-
-
Split file, SORT then append records.
by Esmayeelhusen » Fri Aug 04, 2023 6:37 pm » in DFSORT/ICETOOL/ICEGENER - 10
- 5098
-
by Esmayeelhusen
View the latest post
Wed Aug 09, 2023 7:39 am
-