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

Syncsort to create a file which have duplicate account nos


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rmaruri

New User


Joined: 29 Jun 2005
Posts: 13
Location: USA

PostPosted: Wed Sep 23, 2009 9:29 am
Reply with quote

Hi All,

here is my requirement. I have file with 10 records.

First three records are with duplicate account number
next two records are duplicate account number
rest of the r records are unique.

I have to create a file which have duplicate account numbers. i.e in the output file I have to copy records from 1 to 5. I have to skip rest of the 5 records (because these doesn't have duplicates).

By using SUM FIELDS=NONE,XSUM I can create files with duplicate record in XSUM and no duplicate in SORTOUT.

first and 4th record in the input file should be added to XSUM file.

Please help me for this requirement.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Sep 23, 2009 10:03 am
Reply with quote

Suggest you post some sample input records, expected output from them and rules using whcih we should get the output.

Tell us the LRECL, RECFM of input and output as well.

And as your subject line talks about SyncSort -- what version of it is in use at your shop?
Back to top
View user's profile Send private message
rmaruri

New User


Joined: 29 Jun 2005
Posts: 13
Location: USA

PostPosted: Wed Sep 23, 2009 10:11 am
Reply with quote

Here are the sample records

123000101010101
123000101010102
123000101010103
145001000101011
145001000101012
149109109109109
167909090909090
189001010100202
192001010303030
194202902909209

Expected output:

123000101010101
123000101010102
123000101010103
145001000101011
145001000101012

first three bytes are key..account number.

RULES:

If the account number is same means it is duplicate. but the other fileds may vary...

the output file should consist of records with duplicates only.

Tell us the LRECL, RECFM of input and output as well.

for exp take LRECL 15 abd RECFM as FB.

Input and output files have same length and format

SYNCSORT FOR Z/OS 1.3.1.0R
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Sep 23, 2009 10:22 am
Reply with quote

rmaruri,

Hello and Welcome to the forums. icon_smile.gif

Here's a SYNCTOOL job which does what you asked for.
Code:
//STEP01   EXEC PGM=SYNCTOOL                     
//TOOLMSG  DD SYSOUT=*                           
//DFSMSG   DD SYSOUT=*                           
//IN       DD DSN= Input file  ---> (FB/LRECL=15)
//OUT      DD DSN= Output file ---> (FB/LRECL=15)
//TOOLIN   DD *                                 
 SELECT FROM(IN) TO(OUT) ON(1,3,CH) ALLDUPS     
Back to top
View user's profile Send private message
rmaruri

New User


Joined: 29 Jun 2005
Posts: 13
Location: USA

PostPosted: Wed Sep 23, 2009 10:39 am
Reply with quote

Thans a lot. it worked.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Sep 23, 2009 10:59 am
Reply with quote

You're welcome. icon_smile.gif
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top