I think the specification I made is not much clear clear.Let me explain the scenario again with example
Eg: INPUT
Code:
Key(1-62) Data(72,2) Date(74,8) Data(82-1373)
100F429A XX 20040421 AAAAAA
100F429A YY
1115A503 xx jjjjjjjjjjjjjj
1115A503 yy kkkkkkkkk
1115A588 XX 20060426 --------------
1115A588 XX -------------
1115A588 XX --------------
REQUIRED OUTPUT
Code:
Key(1-62) Data(72,2) Date(74,8) Data(82-1373)
100F429A XX 20040421 AAAAAA
100F429A YY
1115A588 XX 20060426 --------------
1115A588 XX -------------
1115A588 XX --------------
In this the number of repeated keys is unknown
I think this wud better explain the scenario required
Logic is working fine but one small clarification about splice.Keepnodups is for keeping the records that are not spliced. Then how the sort is picking only this record
Code:
1115A588 XX --------------
how this record is omitted as this is also not spliced
Code:
1115A503 yy kkkkkkkkk
Can you please explain the way splice way of working bit clearly.
NO you canNOT do that. We need 2 sequence numbers, the first sequence number is to identify the key and the next is identify the group.
Quote:
Logic is working fine
The only reason it worked for you because the omit condition is checking for not equal to space condition. Run your job removing the Include and build card on OUTFIL and you will notice how the grouping has gone wrong if you remove the seqnum.
Quote:
but one small clarification about splice.Keepnodups is for keeping the records that are not spliced. Then how the sort is picking only this record
Code:
1115A588 XX --------------
KEEPNODUPS parm is required to records which does not have a duplicate. for ex add the following record at the end and rerun the job
Code:
1115A589 zz 20060427 --------------
Without keepnodups parm SPLICE will eliminate the record, where as you need this record to be kept as the record has a valid date.
Quote:
Can you please explain the way splice way of working bit clearly.
Read the link given below. Frank has done a fantastic job explaining how splice works. Read the examples also.