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
 

 

Copy duplicate on more than ten fields

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

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Sun May 06, 2007 10:35 am    Post subject: Copy duplicate on more than ten fields
Reply with quote

Hi All,

I have to copy all duplicate records based on 12 fields from a file. Is there a straight way to achieve this.

My TOOLIN looks like this
//TOOLIN DD *
SELECT FROM(SORTIN) TO(SORTOUT) ON(740,20,CH) -
ON(415,03,CH) -
ON(50,08,ZD) -
ON(31,09,CH) -
ON(188,07,CH) -
ON(1112,11,CH) -
ON(1751,1,CH) -
ON(239,5,PD) -
ON(224,5,PD) -
ON(1105,5,PD) -
ON(445,5,PD) -
ON(181,5,PD) ALLDUPS
/*

When I searched the manual I found that more than 10 fields cannot be specified.

Thanks
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun May 06, 2007 11:42 am    Post subject:
Reply with quote

Without looking it up, are you allowed a chance to inrec reformat and combine some if not all of the ON fields?
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Sun May 06, 2007 1:06 pm    Post subject:
Reply with quote

Hi Wiliam,

Thats right I did it that way. But wanted to know is there any way to do it direct, without the roundabout.

Thanks.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun May 06, 2007 1:18 pm    Post subject:
Reply with quote

Maybe you will get your answer, but if the manual says that more than 10 fields cannot be specified, I doubt it will be different.....
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Sun May 06, 2007 1:22 pm    Post subject:
Reply with quote

When I tried it with 12 fields it gave me error

SYT002I "TOOLIN" INTERFACE BEING USED

SELECT FROM(SORTIN) TO(SORTOUT) ON(740,20,CH) -
ON(415,03,CH) -
ON(50,08,ZD) -
ON(31,09,CH) -
ON(188,07,CH) -
ON(1112,11,CH) -
ON(1751,1,CH) -
ON(239,5,PD) -
ON(224,5,PD) -
ON(1105,5,PD) -
ON(445,5,PD) -
ON(181,5,PD) ALLDUPS
SYT071E "SELECT" STATEMENT CONTAINS MORE THAN TEN "ON" OPERANDS
SYT030I OPERATION COMPLETED WITH RETURN CODE 12

SYT015I PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
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: Sun May 06, 2007 10:47 pm    Post subject:
Reply with quote

Hello,

Your error is rather explicit. Syncsort will not accept more than 10.

One way would be to reformat the records so that your control fields are next to each other, run the process, then reformat the output to the original format.

You could also write a bit of code to get the output you need.
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Mon May 07, 2007 11:05 am    Post subject:
Reply with quote

Hi All,

Thanks for the comments.

Abin.
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: Mon May 07, 2007 7:24 pm    Post subject:
Reply with quote

You're welcome icon_smile.gif

Have you found something that works for you?
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Tue May 08, 2007 7:32 am    Post subject:
Reply with quote

Hi,

This wil look childish. But we needed to get the duplicates for some analysis purpose so I first extracted duplicated records using

//SORTXSUM DD DSN=duplicate claims
// DISP=(NEW,CATLG,DELETE),
// UNIT=TESTDA,SPACE=(CYL,(1,10),RLSE),
// DCB=(MDLDSCB,RECFM=FB,LRECL=5000,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(740,20,CH,A, **SUBR-CONT-NO-20
415,03,CH,A, **HOME-PLAN-AND-LOB
50,08,ZD,A, **PHAR-DISPEN-DTE-8
31,09,CH,A, **PRSP-NO-9
188,07,CH,A, **SUBR-CLM-PHAR-NO-ID
1112,11,CH,A, **NATL-DRUG-CD-ID
1751,1,CH,A, **DRUG-CLM-SOURCE-CD
239,5,PD,A, **CLM-BAL-AMT
224,5,PD,A, **DRUG-ORIG-AMT
1105,5,PD,A, **CLM-PAT-SHARE-AMT
445,5,PD,A, **SUBR-COPAY-AMT
181,5,PD,A) **GNRC-BRAND-VAR-COPAY-AMT
SUM FIELDS=NONE,XSUM

and then I extracted all duplicate records using the direct value of fields.
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: Tue May 08, 2007 8:28 am    Post subject:
Reply with quote

Hello,

Hey! If it gets what you need, that wouldn't be childish icon_smile.gif

Good luck!
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 0 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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