SORT the records based on the second word



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

SORT the records based on the second word

Postby seethahexa » Wed Aug 19, 2020 1:30 pm

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.
seethahexa
 
Posts: 1
Joined: Wed Aug 19, 2020 1:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SORT the records based on the second word

Postby sergeyken » Wed Aug 19, 2020 6:08 pm

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)
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 430
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post