I have an input file with data like below:
00000009NXP00600
00000010NXP00420
00000011NXP00562
00000011NXP00572
00000011NXP00672
00000012NXP00111
00000010NXP00420
00000011NXP00562
00000011NXP00572
00000011NXP00672
00000012NXP00111
My output should contain 16 bytes. There should be no duplicates. If you see there are 3 entries where the first 8 bytes are 00000011,I want an output like below:
00000009NXP00600E
00000010NXP00420E
00000011NXP00672E
00000012NxP00111E
00000010NXP00420E
00000011NXP00672E
00000012NxP00111E
As in only the last 3 bytes which are highest in value are displayed. Here,672.
//SYSIN DD *
SORT FIELDS=(1,10,CH,A)
SUM FIELDS=NONE
INCLUDE COND=(9,3,CH,EQ,C'NXP')
OUTREC FIELDS=(1:1,8,9:9,8)
OUTFIL REMOVECC,
HEADER1=(1:'NXP ENTITLEMENT BFES'),
TRAILER1=('BFE COUNT:',COUNT=(M1,LENGTH=3))
/*
SORT FIELDS=(1,10,CH,A)
SUM FIELDS=NONE
INCLUDE COND=(9,3,CH,EQ,C'NXP')
OUTREC FIELDS=(1:1,8,9:9,8)
OUTFIL REMOVECC,
HEADER1=(1:'NXP ENTITLEMENT BFES'),
TRAILER1=('BFE COUNT:',COUNT=(M1,LENGTH=3))
/*
this code gives me the output as below:
00000009NXP00600
00000010NXP00420
00000011NXP00562
00000012NxP00111E
00000010NXP00420
00000011NXP00562
00000012NxP00111E
It is displaying the lowest number 562.
could someone tell me how to do it? Thanks!