IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy duplicate on more than ten fields


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Sun May 06, 2007 11:42 am
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
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: 3156
Location: Tucson AZ

PostPosted: Sun May 06, 2007 1:18 pm
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
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

Moderator Emeritus


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

PostPosted: Sun May 06, 2007 10:47 pm
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
Reply with quote

Hi All,

Thanks for the comments.

Abin.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon May 07, 2007 7:24 pm
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
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

Moderator Emeritus


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

PostPosted: Tue May 08, 2007 8:28 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top