Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT Filter only duplicates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed Jun 18, 2008 2:15 pm    Post subject: SYNCSORT Filter only duplicates
Reply with quote

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
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jun 18, 2008 2:43 pm    Post subject: Reply to: Filter only duplicates
Reply with quote

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
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed Jun 18, 2008 2:58 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jun 18, 2008 3:12 pm    Post subject: Reply to: Filter only duplicates
Reply with quote

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
View user's profile Send private message
chinnielr

New User


Joined: 11 Jul 2005
Posts: 87

PostPosted: Wed Jun 18, 2008 3:31 pm    Post subject: Reply to: Filter only duplicates
Reply with quote

use

sum fileds= none, xsum option in sortcard and use the ddname as sortxsum, it gives only duplicates from the file
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed Jun 18, 2008 6:41 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Wed Jun 18, 2008 7:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 18, 2008 9:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Jun 19, 2008 3:30 pm    Post subject: Reply to: SYNCSORT Filter only duplicates
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 19, 2008 7:48 pm    Post subject: Reply to: SYNCSORT Filter only duplicates
Reply with quote

Hi Aaru,

You're welcome icon_smile.gif

d
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Jun 19, 2008 10:54 pm    Post subject:
Reply with quote

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.

Code:
SUM FIELDS=NONE

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
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Fri Jun 20, 2008 12:45 pm    Post subject:
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 1:11 pm    Post subject: Reply to: SYNCSORT Filter only duplicates
Reply with quote

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
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Fri Jun 20, 2008 1:15 pm    Post subject: Re: Reply to: SYNCSORT Filter only duplicates
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 1:27 pm    Post subject: Reply to: SYNCSORT Filter only duplicates
Reply with quote

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
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Fri Jun 20, 2008 2:24 pm    Post subject: Re: Reply to: SYNCSORT Filter only duplicates
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Fri Jun 20, 2008 10:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us