View previous topic :: View next topic
|
Author |
Message |
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
I need to find out the duplicates alone from a file. But all my search hits a SYNCTOOL option of using ALLDUPS. I would like to know if there is any option of doing this through any SORT logic, other than using SYNCTOOL?
Input Rec
Cus1Act1
Cus2Act2
Cus2Act3
Cus3Act4
Cus4Act5
Cus4Act6
Cus4Act7
Output Rec
Cus2Act2
Cus2Act3
Cus4Act5
Cus4Act6
Cus4Act7
Thanks,
Prajesh V P |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Prajesh,
Quote: |
I would like to know if there is any option of doing this through any SORT logic, other than using SYNCTOOL |
How about ICETOOL???
Is syncsort not installed in your site? what is the reason for not using synctool? |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Aaru,
We not have DFSORT and hence ICETOOL in our site. Also, we are asked to go for COBOL code whenever there is a SYNCTOOL requirement, because of maintainability and performance reasons.
Thanks,
Prajesh v P |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
prajesh,
Quote: |
we are asked to go for COBOL code whenever there is a SYNCTOOL requirement, because of maintainability and performance reasons.
|
It's confusing. You want a COBOL code or a SORT JCL?
Even if u use PGM=SORT in your JCL, SYNCSORT would be invoked and what difference it is gng to make using SYNCTOOL or SYNCSORT?
Techies,
Will the usage of SYNCTOOL lead to performance issues? |
|
Back to top |
|
|
chinnielr
New User
Joined: 11 Jul 2005 Posts: 87
|
|
|
|
use
sum fileds= none, xsum option in sortcard and use the ddname as sortxsum, it gives only duplicates from the file |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Aaru,
I am looking for a direct SORT logic..may be using some SEQNUM or so..to identify the Duplicates alone.
Quote: |
It's confusing. You want a COBOL code or a SORT JCL? |
I might have to go for a COBOL code if SYNCTOOL is the only way out and also I am not sure on the performace save. Might have to check it out.
chinnielr,
XSUM will retain one of the duplicates in SORTOUT. My requirement is to get all the duplicate records into a single file.
Thanks,
Prajesh VP[/quote] |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
XSUM will retain one of the duplicates in SORTOUT. My requirement is to get all the duplicate records into a single file.
- XSUM normally retain (Input record - 1) entries , not only one see in your Input if you use a conrtol card like this
SORT FIELDS=(1,4,CH,A)
SUM FIELDS=NONE,XSUM
then you will get Ouput
CUS2ACT3
CUS4ACT6
CUS4ACT7. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Will the usage of SYNCTOOL lead to performance issues? |
Anything can be used to waste resources.
Done well, there is no performance issue with Syncsort - usually (when used properly) Syncsort will perform better than RYO (roll your own) code for those utility-type functions.
Quote: |
we are asked to go for COBOL code whenever there is a SYNCTOOL requirement, because of maintainability . . . |
This is the way many places operate. There are many functions available in the sort products that are not understood by most developers. Specifically excluding the use of Synctool but allowing other "code" to be implemented via the sort does not make much sense. . . |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
Anything can be used to waste resources.
Done well, there is no performance issue with Syncsort - usually (when used properly) Syncsort will perform better than RYO (roll your own) code for those utility-type functions. |
Thanks dick. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Aaru,
You're welcome
d |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Prajesh_v_p wrote: |
XSUM will retain one of the duplicates in SORTOUT. My requirement is to get all the duplicate records into a single file. |
will write one of the duplicates to SORTOUT. However, with
Code: |
SUM FIELDS=NONE,XSUM |
the records deleted by SUM processing will be written to a data set defined by the SORTXSUM DD statement.
In SyncSort for z/OS 1.3, this can also be accomplished through
Code: |
DUPKEYS FIELDS=NONE,XDUP |
with a SORTXDUP DD coded in the JCL. |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
Hi,
[quote="In SyncSort for z/OS 1.3, this can also be accomplished through
Code: |
DUPKEYS FIELDS=NONE,XDUP |
with a SORTXDUP DD coded in the JCL.[/quote]"]
for this control statement Im getting a warning msg "WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT"
fyi, we are having " SYNCSORT FOR Z/OS 1.2.2.1R " will this z/os support "DUPKEYS" ? |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI Vasukip
//STEPSORT EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP
//SORTOF01 DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP.NODUP
//SORTXSUM DD DSN=DEV2.DCPBKTDP.EXTPDP.DUP,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(50,50),RLSE),
// DCB=(RECFM=FB,LRECL=626,BLKSIZE=0)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(15,9,24,3,CH,A)
OUTFIL FILES=01
SUM FIELDS=NONE,XSUM
/*
//*
Here SORTOF1 file contains No duplictaes
SORTXSUM will contain duplicates |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
karthikr44 wrote: |
HI Vasukip
//STEPSORT EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP
//SORTOF01 DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP.NODUP
//SORTXSUM DD DSN=DEV2.DCPBKTDP.EXTPDP.DUP,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(50,50),RLSE),
// DCB=(RECFM=FB,LRECL=626,BLKSIZE=0)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(15,9,24,3,CH,A)
OUTFIL FILES=01
SUM FIELDS=NONE,XSUM
/*
//*
Here SORTOF1 file contains No duplictaes
SORTXSUM will contain duplicates |
--
Hi,
As we discussed earlier XSUM will not retain all the duplicate entries , It will retain (n-1) entries i.e, whatever the entries deleted by SUM Fields will be written in to XSUM. |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
hen u can use the follwing JCL,
//GETMATCH EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP
//OUT DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP.DUP
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,12,CH) ALLDUPS
/*
//*
INPUT:
1-------- 10---- 13-------
310789954 004 836
312520249 002 836
312929875 002 836
325807809 003 836
325807809 002 836
242293732 001 836
242293732 001 836
242293732 001 836
242293732 001 836
346685284 001 836
OUTPUT:
1-------- 10---- 13-------
242293732 001 836
242293732 001 836
242293732 001 836
242293732 001 836 [/quote] |
|
Back to top |
|
|
Vasukip Currently Banned New User
Joined: 17 Jun 2008 Posts: 48 Location: Chennai
|
|
|
|
karthikr44 wrote: |
hen u can use the follwing JCL,
//GETMATCH EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP
//OUT DD DISP=SHR,DSN=DEV2.DCPBKTDP.EXTPDP.DUP
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(1,12,CH) ALLDUPS
/*
//*
INPUT:
1-------- 10---- 13-------
310789954 004 836
312520249 002 836
312929875 002 836
325807809 003 836
325807809 002 836
242293732 001 836
242293732 001 836
242293732 001 836
242293732 001 836
346685284 001 836
OUTPUT:
1-------- 10---- 13-------
242293732 001 836
242293732 001 836
242293732 001 836
242293732 001 836 |
[/quote]
yes you are correct ! we can get all duplicates thru ALLDUPS command . This basically SYNCTOOL, can you check Prajesh request
"I need to find out the duplicates alone from a file. But all my search hits a SYNCTOOL option of using ALLDUPS. I would like to know if there is any option of doing this through any SORT logic, other than using SYNCTOOL? "
He is stating that he knows about SYNCTOOL , he asking any SORT logic , For this we can use "XDUP" , In my Z/OS it is not supporting So Im inquiring whether Z/OS 1.2.2.1R will support this "DUPKEYS FIELDS=NONE,XDUP" control Statement or not ? |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Vasukip wrote: |
Hi,
Quote: |
In SyncSort for z/OS 1.3, this can also be accomplished through
Code: |
DUPKEYS FIELDS=NONE,XDUP |
with a SORTXDUP DD coded in the JCL. |
for this control statement Im getting a warning msg "WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT"
fyi, we are having " SYNCSORT FOR Z/OS 1.2.2.1R " will this z/os support "DUPKEYS" ? |
No. |
|
Back to top |
|
|
|