View previous topic :: View next topic
|
Author |
Message |
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Hi All,
Would you please help me out .
Input-1
Code: |
TYPE-1 100
TYPE-2 200
TYPE-1 300
TYPE-2 200
TYPE-2 100
TYPE-1 300
TYPE-1 100 |
Required Output
Code: |
TYPE-1 100
TYPE-1 300
TYPE-1 300
TYPE-1 100
TYPE-2 200
TYPE-2 200
TYPE-2 100
888800040000800
999900030000500 |
in the above
888800040000800
8888-- indicates TYPE-1 related row(1 to 4 Digits)
0004-- indicates number of TYPE-1 records(5 to 8 Digits)
0000800-- indicates sum of TYPE-1 records(9 to 15 Digits)
in the above
999900030000500
9999-- indicates TYPE-2 related row (1 to 4 Digits)
0003-- indicates number of TYPE-2 records (5 to 8 Digits)
0000500--indicates sum of TYPE-2 records (9 to 15 Digits)
Many thanks for your anticipated help.
Regards,
Srini |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you post the sysout from any SORT step, so we can see your sofware level for SORT? This will tell us what functions are available on your site. |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Hi
Thanks for your post,
below are the details.
Code: |
SYNCSORT FOR Z/OS 1.4.0.1R XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXX z/OS 1.13.0 |
Regards,
Venu. |
|
Back to top |
|
|
Ronin.
New User
Joined: 28 Feb 2014 Posts: 4 Location: down in the sea
|
|
|
|
Brother,
Adding trailer on the "key field" and using COUNT and SUM option will solve the problem. But that will insert the trailer record once the key changes. So this solution may still need two steps. But I am sure wizards of mainframes present in the forum will have the solution in a step.
Ronin. |
|
Back to top |
|
|
|