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 to create a file which have duplicate account nos

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort to create a file which have duplicate account nos
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

Senior Member


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

PostPosted: Wed Sep 23, 2009 10:03 am    Post subject:
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    Post subject:
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: 2238
Location: @my desk

PostPosted: Wed Sep 23, 2009 10:22 am    Post subject:
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    Post subject:
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: 2238
Location: @my desk

PostPosted: Wed Sep 23, 2009 10:59 am    Post subject:
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    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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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