Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2287
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: 2287
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us