View previous topic :: View next topic |
Author |
Message |
bsaishankar Beginner
Joined: 14 Apr 2009 Posts: 5 Topics: 2
|
Posted: Wed Jan 06, 2010 8:34 am Post subject: Count records and copy only if more than 250 records. |
|
|
How to use SYNCSORT to Create a new file only if the original file has records more or equal to 250 records. I see that the COUNT can be used but not sure if that can be used staraight in the comparsions .
This has to be done for 2 siutations.
Situation 1 file records:
Original file size is 500 bytes VBA format
There is 1 record/account.
Sampling of records will be as below
1 SZ1 AC#1 AAA..........
1 SZ1 AC#5 BBB...........
1 SZ1 AC#6 CCC....
1 SZ1 AC#2 DDD......
Situation 2 file records:
Original file size is 500 bytes VBA format
Each account will have 5 records.
There are 5 record/account, when counting they have to be grouped or if COUNT can be used,will have to divide by 5 with total count.
Sampling of records will be as below
1 SZ1 AC#1 AAA..........
1 SZ2 AC#1 ABA...........
1 SZ3 AC#1 ACA..........
1 SZ4 AC#1 ADA......
1 SZ5 AC#1 AEA.........
1 SZ1 AC#6 CCC....
1 SZ2 AC#6 CBC....
1 SZ3 AC#6 CCC....
1 SZ4 AC#6 CDC....
1 SZ5 AC#6 CEC....
1 SZ1 AC#2 DDD......
1 SZ2 AC#2 DDD......
1 SZ3 AC#2 DDD......
1 SZ4 AC#2 DDD......
1 SZ5 AC#2 DDD......
Any help is appreciated. |
|
Back to top |
|
 |
bsaishankar Beginner
Joined: 14 Apr 2009 Posts: 5 Topics: 2
|
Posted: Sat Jan 09, 2010 10:06 am Post subject: Can this be accomplished by DFSORT if not SYNCOSORT?? |
|
|
I asked if the situations can be resolved using SYNCSORT but if that is not supported, then this be resolved using DFSORT. |
|
Back to top |
|
 |
bprasanna Beginner
Joined: 05 Sep 2003 Posts: 119 Topics: 33 Location: Hyderabad
|
Posted: Sun Jan 10, 2010 1:18 pm Post subject: |
|
|
bsaishankar,
What do you want to write in the outut file when the count is greater than 250 ?
Thanks _________________ ----------------
Thanks&Regards
Bprasanna |
|
Back to top |
|
 |
bsaishankar Beginner
Joined: 14 Apr 2009 Posts: 5 Topics: 2
|
Posted: Sun Jan 10, 2010 8:43 pm Post subject: |
|
|
Just copy the original into a new file only if count is greater than 250. |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Mon Jan 11, 2010 12:12 pm Post subject: |
|
|
Please don't post on more than one Help board. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
 |
|
|