View previous topic :: View next topic
|
Author |
Message |
rally
New User
Joined: 28 Jul 2005 Posts: 37
|
|
|
|
Hi,
Do we have some option used in ICETOOL SELECT OPERATOR?
Code: |
SELECT FROM(IN) TO(OUT) ON(1,3,CH) ALLDUPS |
Can we stop the ICETOOL in case we have any duplicate records selected?
For example, we have below records in the input file.
111
333
444
111
222
333
We need ICETOOL stop after process to record 4 since already find one duplicate record with 111. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Yes, you can use STOPAFT with SELECT, but I suspect that won't help you.
But it isn't clear what you want to do. What do you mean by "Can we stop ICETOOL in case we have any duplicate records selected"? Do you mean that you want a non-zero return code in that case, or what? If you're looking for some particular expected output records, show what you expect. Explain the "rules" for satisfying your requirement. Give the RECFM and LRECL of the input file. |
|
Back to top |
|
|
rally
New User
Joined: 28 Jul 2005 Posts: 37
|
|
|
|
I have one input SEQ file with RECFM=FB, LRECL=80. there are more than 3,000,000 records in this file.
I want to know if we have duplicate record (for the 1st 10 bytes) or not in this file. We don't want the ICETOOL to check all records if we already found the duplicate record in this file.
1111111111
3333333333
4444444444
1111111111
2222222222
3333333333
for above sample, we will find we have duplicate record when we process to the 4th records, can I stop the SELECT process and continue next STEP? we don't need to know all duplicate records since it will need more time. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Quote: |
we don't need to know all duplicate records since it will need more time. |
How much time dfsort is taking currently to process all records? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
We don't want the ICETOOL to check all records if we already found the duplicate record in this file.
...
can I stop the SELECT process and continue next STEP? |
The answer is No. In order to find the duplicate records, we must read all of them and sort them. STOPAFT operates on the input records, not the sorted records.
I suppose you could do what you want by using a COPY with an E15 to save off each record until you find a duplicate and then have the E15 pass back RC=8. But that could require a lot of storage if you have a lot of records and the first duplicate is far into the file. And depending on how big your file is, it may not save you any time since an E15 slows DFSORT down. |
|
Back to top |
|
|
rally
New User
Joined: 28 Jul 2005 Posts: 37
|
|
|
|
Thanks for your clarification for STOPAFT usage. it's very helpful for me to understand how DFSORT works. |
|
Back to top |
|
|
|