|
View previous topic :: View next topic
|
| Author |
Message |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
yes, it selects the FIRST occurrence of duplicate records without sorting
ie. SORT FIELDS=COPY
Gerry |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Your file is not actually in "collating" sequence, strictly, as seen by the trailer moving its position.
Check whether select enjoys having a sorted file. If it does, test very carefully with Gerry's solution.
The problem with the way that you have applied my second solution is that you haven't specified the full extend of the record areas for matching.
With that one you have three record areas, all the same length, all as one record. You need to compare the second and third record areas, for the entire length of your record. I suspect you can only do this in 256-byte "chunks", hence my reference to 1,256 257,256 etc, where you have to offset the starting points for the two additional record areas.
So something likse 784,256,etc with each area matching against the third record area with AND joining each togeteher
a=a1,and,b=b1,and,c=c1,and,d=d1
where a,b,c,d are the chunks from the first extension (first PUSH) and a1,b1,c1,d1 are from the second.
EDIT: I see you are OK now. |
|
| Back to top |
|
 |
vishalbshah
New User
Joined: 01 Dec 2006 Posts: 61 Location: Pune
|
|
|
|
Hi Gerry,
Where can I see different options of ICETOOL?
I mean the one which we used i.e. "FIRST" works fine for now...
I want to see which other options are available with this. |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
| In your Syncsort documentation, of course. |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
| Bill Woodger wrote: |
| In your Syncsort documentation, of course. |
Or maybe you'd better contact Syncsort if you can't find it documented... let us know, please, how you get on. |
|
| Back to top |
|
 |
nagaraj_bez
New User
.jpg)
Joined: 09 Jun 2005 Posts: 10
|
|
|
|
Hi Vishalbshah,
find below steps for removing duplicates(irrespective duplicate record position - contigious or not) with out sorting the file. Let me know the status once u tried this.
Used recod length as 80
&input = input file
&output2 = required output file
| Code: |
//COPY1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&INput ,
// DISP=SHR
//SORTOUT DD DSN=&OUTPUT1,
// DISP=(NEW,CATLG,DELETE),
// RECFM=FB,LRECL=90,
// SPACE=(TRK,(10,5),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
INREC OVERLAY=(81:SEQNUM,8,ZD)
SORT FIELDS=COPY
sum fields = none
OUTREC BUILD=(1:81,8,9:1,80)
/*
//COPY2 EXEC PGM=SORT
//SORTIN DD DSN=&OUTPUT1,
// DISP=SHR
//SORTOUT DD DSN=&OUTPUT2,
// DISP=(NEW,CATLG,DELETE),
// RECFM=FB,LRECL=99,
// SPACE=(TRK,(10,5),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,8,CH,A)
OUTREC BUILD=(1:1,89,X,91:SEQNUM,8,ZD,START=1,INCR=1,RESTART=(9,80))
/* |
|
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
TS already has a solution which actually runs and runs in only one step.
Did you test this two-step solution? What on earth were you expecting it to do, if it got through basic validation of control cards? |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|