View previous topic :: View next topic
|
Author |
Message |
rmaruri
New User
Joined: 29 Jun 2005 Posts: 13 Location: USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
rmaruri
New User
Joined: 29 Jun 2005 Posts: 13 Location: USA
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
rmaruri,
Hello and Welcome to the forums.
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 |
|
|
rmaruri
New User
Joined: 29 Jun 2005 Posts: 13 Location: USA
|
|
|
|
Thans a lot. it worked. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
You're welcome. |
|
Back to top |
|
|
|