View previous topic :: View next topic
|
Author |
Message |
jaganmoni1
New User
Joined: 31 Oct 2008 Posts: 35 Location: CANADA
|
|
|
|
Hi,
My input PS file is FB and record length of 135 bytes. The key value in the file is located from column 32 to 45 (i.e. 14 bytes).
At any time I have only two duplicate records in the input file based on the key value.
//SYSIN DD *
SORT FIELDS=(32,14,CH,A)
SUM FIELDS=NONE,XSUM
/*
//
If I use the above control card, it eliminates the second duplicate record and writes the first duplicate record in the output file.
But I want second duplicate record instead of first duplicate record in the output file. Please help me on the same... |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
jaganmoni1,
You can use the below SYNCTOOL job to achieve what you want.
Code: |
//STEP1 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN= Input file
//OUT DD DSN= Output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(32,14,CH) LAST
|
|
|
Back to top |
|
|
jaganmoni1
New User
Joined: 31 Oct 2008 Posts: 35 Location: CANADA
|
|
|
|
its working fine... Thanks a lot for your quick reply |
|
Back to top |
|
|
|